diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-03-08 15:57:15 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-03-08 17:21:34 +0300 |
commit | 5a67407d5aa8800faf78f40811b703d07e8f7300 (patch) | |
tree | 3b10f385b1d26d6399d6fdaa75f5792a18384369 /source/blender/editors/space_file/file_intern.h | |
parent | e20b31504a2381011e60c5eadffb67f18918bc71 (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 'source/blender/editors/space_file/file_intern.h')
-rw-r--r-- | source/blender/editors/space_file/file_intern.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h index deb32812f44..309b280177c 100644 --- a/source/blender/editors/space_file/file_intern.h +++ b/source/blender/editors/space_file/file_intern.h @@ -75,6 +75,7 @@ void FILE_OT_rename(struct wmOperatorType *ot); void FILE_OT_smoothscroll(struct wmOperatorType *ot); void FILE_OT_filepath_drop(struct wmOperatorType *ot); void FILE_OT_start_filter(struct wmOperatorType *ot); +void FILE_OT_view_selected(struct wmOperatorType *ot); void file_directory_enter_handle(bContext *C, void *arg_unused, void *arg_but); void file_filename_enter_handle(bContext *C, void *arg_unused, void *arg_but); |