Page MenuHome

Asset Browser: Adjust header pulldowns to be Asset Browser specific
ClosedPublic

Authored by Julian Eisel (Severin) on Jul 28 2021, 3:24 PM.

Details

Summary

So far the Asset Browser just showed the same menus as the File Browser.
Not all of their entries made sense for the Asset Browser though. I
decided to just give them entirely different classes to avoid confusing
if-else checks everywhere. I think the code duplication this adds is a
minor issue, it's better to keep things seperated clearly IMO.

  • View menu: Add "Asset Details" toggle for the sidebar region.
  • View menu: Remove recursion sub-menu
  • View menu: Remove "File Path" region toggle, which doesn't apply for the Asset Browser.

Diff Detail

Repository
rB Blender
Branch
temp-asset-browser-menus-cleanup (branched from master)
Build Status
Buildable 16091
Build 16091: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) requested review of this revision.Jul 28 2021, 3:24 PM
Julian Eisel (Severin) created this revision.

Agree on this granularity adding new classes makes sense.

release/scripts/startup/bl_ui/space_filebrowser.py
491

Perhaps move closer to the asset menus to reduce searching.

  • Minor cleanup: Move class around, remove section heading
Julian Eisel (Severin) marked an inline comment as done.Jul 28 2021, 3:56 PM
release/scripts/startup/bl_ui/space_filebrowser.py
585

Is an inline import really needed? Would prefer header only imports.

release/scripts/startup/bl_ui/space_filebrowser.py
585

To my knowledge these inline imports are preferred since they are then not executed at startup/registration time, but only when actually calling the function.

Jeroen Bakker (jbakker) added inline comments.
release/scripts/startup/bl_ui/space_filebrowser.py
585

Is done to reduce startup time what has more prio for blender than having a small (is already loaded) several times per sec.

This revision is now accepted and ready to land.Aug 2 2021, 11:33 AM