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:
authorPablo Vazquez <pablo@blender.org>2021-11-10 04:17:24 +0300
committerPablo Vazquez <pablo@blender.org>2021-11-11 03:18:50 +0300
commite1bd4bbb6668b7fa4ac1badfe72d8904a559eb99 (patch)
treee5f1783dbd581ec64b5ace4a386d418eb6f32821 /release/scripts/startup/bl_ui/space_outliner.py
parentf1a86441213f24e5c21adf8ecc0ff0c38e6d8f5e (diff)
UI: Introduce View pie in more editors
#### Motivation The View pie menu is a convenient way to access operators such as `Frame Selected` and `Frame All` which are usually mapped to `PERIOD` or `HOME` keys on the right side of most keyboard, making it hard hard to reach with the left hand. The motivation for this patch comes from working with a 75% keyboard (no numpad). Most laptops face a similar problem. #### Implementation The View pie menu has been added to the following editors and sub-modes where applicable: * Node Editor * Video Sequencer * Dopesheet * Graph * NLA * Image * Clip * Outliner More options could definitely be added to this menu for convenience, as long as it maintains the common options in the same place (Frame Selected on the left, Frame All on the right). For positioning I went with the following layout: {F11791186, size=full} I've added `Zoom 1:1`to the Image Editor and the VSE Preview since there is no way to reset the zoom on keyboards without numpad (unless Emulate Numpad is turned on). The Outliner uses `Show Active` and `Show Hierarchy` which are the closest ones to the equivalent in other editors. Should `Show Active` be renamed to `Frame Selected`? The shortcut assigned is the same as the 3D Viewport (`ACCENT_GRAVE`). #### Screenshots Node Editor {F11778387, size=full} Dopesheet {F11778400, size=full} Graph {F11778403, size=full} Image Editor (Paint and View) {F11791113, size=full} Image Editor (Mask) {F11791114, size=full} UV Editor {F11791119, size=full} Clip Editor (Tracking) {F11791137, size=full} Clip Editor (Mask) {F11791140, size=full} Clip Editor (Graph) {F11791151, size=full} View operators are not yet implemented in Clip Editor Dopesheet mode (left a note about this in the menu poll). Reviewed By: #user_interface, campbellbarton Differential Revision: https://developer.blender.org/D13169
Diffstat (limited to 'release/scripts/startup/bl_ui/space_outliner.py')
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index 07fa2220915..d85538a37e0 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -142,6 +142,17 @@ class OUTLINER_MT_context_menu_view(Menu):
layout.operator("outliner.show_one_level", text="Hide One Level").open = False
+class OUTLINER_MT_view_pie(Menu):
+ bl_label = "View"
+
+ def draw(self, context):
+ layout = self.layout
+
+ pie = layout.menu_pie()
+ pie.operator("outliner.show_hierarchy")
+ pie.operator("outliner.show_active", icon='ZOOM_SELECTED')
+
+
class OUTLINER_MT_edit_datablocks(Menu):
bl_label = "Edit"
@@ -471,6 +482,7 @@ classes = (
OUTLINER_MT_asset,
OUTLINER_MT_context_menu,
OUTLINER_MT_context_menu_view,
+ OUTLINER_MT_view_pie,
OUTLINER_PT_filter,
)