Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-03-08 15:57:15 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-03-08 17:21:34 +0300
commit5a67407d5aa8800faf78f40811b703d07e8f7300 (patch)
tree3b10f385b1d26d6399d6fdaa75f5792a18384369 /release/scripts/startup/bl_ui/space_filebrowser.py
parente20b31504a2381011e60c5eadffb67f18918bc71 (diff)
File Browser: scroll selected files into view
Add operator `FILE_OT_view_selected` to the file browser (and thus also to the asset browser) that scrolls selected files into view. This includes the active file, even though it is not selected. In certain cases the active file can loose its selected state (clicking next to it, or refreshing the asset browser), but then it's still shown in the right-hand sidebar. Because of this, I found it important to take it into account when scrolling. This also includes a change to the keymaps: - Blender default: {key NUMPAD_PERIOD} is removed from the "reload" operator, and assigned to the new "view selected files" operator. The reload operator was already doubly bound, and now {key R} is the only remaining hotkey for it. - Industry compatible: {key F} is assigned to the new "view selected files" operator. This is consistent with the other "view selected" operators in other editors. Reviewed By: Severin Differential Revision: https://developer.blender.org/D10583
Diffstat (limited to 'release/scripts/startup/bl_ui/space_filebrowser.py')
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index ef4f47c9399..b236b2ee7cf 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -494,6 +494,7 @@ class FILEBROWSER_MT_view(Menu):
layout.prop(st, "show_region_toolbar", text="Source List")
layout.prop(st, "show_region_ui", text="File Path")
+ layout.operator("file.view_selected")
layout.separator()