Page MenuHome

UI: Add View pie to File Browser
ClosedPublic

Authored by Fynn Grotehans (TheFynn) on Jan 19 2022, 5:35 PM.

Details

Summary

Adds a pie menu to the File Browser for convenient switching between vertical list, horizontal list and thumbnail view.

Uses the same shortcut as other View pie menus (ACCENT_GRAVE).

Diff Detail

Repository
rB Blender

Event Timeline

Fynn Grotehans (TheFynn) requested review of this revision.Jan 19 2022, 5:35 PM
Fynn Grotehans (TheFynn) created this revision.
Ethan Hall (Ethan1080) added inline comments.
release/scripts/presets/keyconfig/keymap_data/blender_default.py
2176

Using 'ACCENT_GRAVE' by default (instead of 'TAB') would be be more consistent with the other view pie menus.

Fynn Grotehans (TheFynn) edited the summary of this revision. (Show Details)

While accent grave is difficult with some keyboard layouts it's definetly more consistend so I updated the keymap to use 'ACCENT_GRAVE' instead of 'TAB'.

It might be worth noting that thumbnail size / directory view in most used file browsers (Windows & Linux) are bound to [Ctrl] + {Mouse scroll].
I'm not against view pie menu in that context, but areas that overlap with generally used software i.e. OS' should be consistent if possible, otherwise it might look like reinventing the wheel.

Hm, wasn't aware of these shortcut actually. there we have a consistency problem, on MacOS it's command + 1/2/3/4. in addition the MacOS colum view dosnt exist in Blender unfortunately but 1/2/3 would still have the sam name at least. We clould go the blender way only and everytjing beyond that needs to be done by the individual user, or we implement both OS shortcuts. I personaly would like to be consistend with everything, but having 3 shortcuts for the same thing is also not great. Is there a general "Blender way" for that kind of problems?

Is there a general "Blender way" for that kind of problems?

It would be good to have OS specific keymaps with File Browser shortcuts integrated with the OS.
But I have no idea how hard it would be to implement and maintain. I'm just a user.

It might be worth noting that thumbnail size / directory view in most used file browsers (Windows & Linux) are bound to [Ctrl] + {Mouse scroll].
I'm not against view pie menu in that context, but areas that overlap with generally used software i.e. OS' should be consistent if possible, otherwise it might look like reinventing the wheel.

As far as I can tell, adding this pie menu would not interfere with that feature.
Therefore, implementing the scroll behavior is is a separate feature request, and is not a problem for this patch.

Hmm, wasn't aware of these shortcuts actually. There we have a consistency problem. On MacOS, it's command + 1/2/3/4. In addition, the MacOS column view doesn't exist in Blender unfortunately, but 1/2/3 would still have the same name at least. We could go the Blender way only and everything beyond that needs to be done by the individual user, or we implement both OS shortcuts. I personally would like to be consistent with everything, but having 3 shortcuts for the same thing is also not great. Is there a general "Blender way" for those kind of problems?

Having multiple shortcuts is not a bad thing, so long as the keymap has enough space for all useful hotkeys.
Items in pie menus often have direct hotkeys.

Personally I think this is fine, @Pablo Vazquez (pablovazquez) what do you think?

release/scripts/startup/bl_ui/space_filebrowser.py
581–583

Doesn't just pie.prop(view.params, "display_type") work?

Unfortunately dosen't work

release/scripts/startup/bl_ui/space_filebrowser.py
581–583

That dosen't work, you get a drop down menu inside the pie with the 3 options

Fynn Grotehans (TheFynn) marked an inline comment as done.Apr 30 2022, 1:56 PM

Looks good. Thanks!

This revision is now accepted and ready to land.Aug 16 2022, 6:07 PM
Pablo Vazquez (pablovazquez) retitled this revision from Filebrowser View pie to UI: Add View pie to File Browser.Aug 16 2022, 6:09 PM
Pablo Vazquez (pablovazquez) edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.