Page MenuHome

UI: Add OneDrive to System List for Windows
ClosedPublic

Authored by Harley Acheson (harley) on May 1 2021, 2:05 AM.

Details

Summary

This patch adds a "OneDrive" icon to the File Manager System list for
Windows (only!).


Now that we have this patch (D11101) in - which fixes slowdowns when viewing offline files - then we should consider adding a shortcut icon for "OneDrive" to the "System" list for Windows users.

Blender, when running on Windows, already knows about this path and will mark it with a special icon if you bookmark (favorite) it. This patch just adds the icon to the System List. At the bottom of the list though.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.May 1 2021, 2:05 AM
Harley Acheson (harley) created this revision.
Harley Acheson (harley) edited the summary of this revision. (Show Details)
Harley Acheson (harley) edited the summary of this revision. (Show Details)May 19 2021, 9:33 PM
Harley Acheson (harley) edited the summary of this revision. (Show Details)

Seems like a UI choice to me, I see no technical obstacles

This revision is now accepted and ready to land.May 27 2021, 4:46 AM

I've privately done similar work for iCloud Drive and OneDrive over on the macOS side. As far as I know iCloud Drive is always located at a fixed file location (~/Library/Mobile Documents/com~apple~CloudDocs), so this is easy. OneDrive on macOS can be installed at an arbitrary location. That location can be obtained by inspecting a config INI files in ~/Library/Containers/com.microsoft.OneDrive-mac/Data/Library/Application Support/OneDrive/settings/Personal. I have some logic for that too, but needs to be made more robust. Also the OneDrive sync root folder has the com.apple.fileutil.SyncRoot extended file attribute added that you can use to identify it. But technically those attributes can be added to arbitrary folders, so they seem a less reliable way to identify the OneDrive folder.

@Leon Zandman (lzandman) - ...OneDrive on macOS can be installed at an arbitrary location. That location can be obtained by...

Yes, if you want to propose doing something similar to this patch for Mac, best place to start is to look at blender\editors\space_file\fsmenu.c and look for the defined(__APPLE__) sections. You'll see how some folders are given special decorators and how the items on the System List are populated,.

Yes, if you want to propose doing something similar to this patch for Mac, best place to start is to look at blender\editors\space_file\fsmenu.c and look for the defined(__APPLE__) sections.

I already found that code. As I've said if got an experimental build on my machine that already includes iCloud Drive support. It adds the iCloud Drive shortcut to the Volumes section (though it's just as easy to add it to the System section). There are some things I'd like to see improved:

  • The location/path bar on at the top of the file dialog shows the actual iCloud Drive location, which is rather terrible. Apple tends to hide this actual location from users too. Maybe better to show it as "iCloud Drive" instead. Also, I think always showing all iCloud Drive files is a better experience. Currently iCloud Drive placeholder files aren't shown as they are hidden and even get renamed (test.blend becomes .test.blend.icloud). However, the Finder does show them using their real filename. This all requires some rework on the Blender file enumeration code.

Here's a screenshot of the file dialog of my current experimental build. I've added two cloud icons using Photoshop that show how I think it could look.

Here's that same folder shown in macOS Finder (I obviously stole the cloud design; Blender would have to use its own cloud icons, I guess).

Harley Acheson (harley) edited the summary of this revision. (Show Details)

Updating to current state of master.

is there a patch for 3D objects folder in windows?

Is there a use for it? I know we have that new Special Folder location but assumed it would just be the default location for their 3D Builder tool. I worried that having an icon and link to “3D Objects” in the blender System list would be confusing. Am I thinking about it wrong?

Can't say for everyone else, but I like to save most of my 3d files there.

Not sure about the icon, ideally we'd have a dedicated one. But right now we don't, and this is descriptive enough.

@Julian Eisel (Severin)

This is literally the icon we have been using for OneDrive - and potentially other cloud-storage service - folders for as long as we’ve had icons in there. While browsing it shows that icon on the folder, and if I bookmark it then it appears just like in this patch but in the “Bookmarks” list. Of course all icons can be improved at any time, but is a separate issue that is addressed by a different person.

Edit - OMG I totally misread your comment and replied strangely. Sorry about that.