diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-12-06 19:45:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-12-06 22:03:00 +0300 |
commit | 6ffcddc10afa07b073ce01c25884e23fc2b661df (patch) | |
tree | 86e7ddb017474083890bf16fac4876175a923e57 /release/scripts/startup/bl_ui/space_topbar.py | |
parent | 7465078e637b729e8b36a4f4b73a50a347052df4 (diff) |
Tool System: experimental fallback tool support
Implement T66304 as an experimental option,
available under the preferences "Experimental" section.
- When enabled most tools in the 3D view have a gizmo.
- Dragging outside the gizmo uses the 'fallback' tool.
- The fallback tool can be changed or disabled in the tool options
or from a pie menu (Alt-W).
Diffstat (limited to 'release/scripts/startup/bl_ui/space_topbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index dcfeb6a210f..09531cb5ef6 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -78,6 +78,23 @@ class TOPBAR_HT_upper_bar(Header): unlink="scene.view_layer_remove") +class TOPBAR_PT_tool_fallback(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'HEADER' + bl_label = "Layers" + bl_ui_units_x = 8 + + def draw(self, context): + from bl_ui.space_toolsystem_common import ToolSelectPanelHelper + layout = self.layout + + tool_settings = context.tool_settings + ToolSelectPanelHelper.draw_fallback_tool_items(layout, context) + if tool_settings.workspace_tool_type == 'FALLBACK': + tool = context.tool + ToolSelectPanelHelper.draw_active_tool_fallback(context, layout, tool) + + class TOPBAR_PT_gpencil_layers(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'HEADER' @@ -772,6 +789,7 @@ classes = ( TOPBAR_MT_render, TOPBAR_MT_window, TOPBAR_MT_help, + TOPBAR_PT_tool_fallback, TOPBAR_PT_gpencil_layers, TOPBAR_PT_gpencil_primitive, TOPBAR_PT_gpencil_fill, |