diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-30 01:55:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-30 02:00:39 +0300 |
commit | add923f98a75f11200056c83d7f766304bb6b29b (patch) | |
tree | 1dff069a9ea796cd48615ce7b6dbaf0ccd4113be /release/scripts/startup/bl_ui/space_topbar.py | |
parent | 6fa7fa6671c9e7cf9baad54b0f0861755b43f2b1 (diff) |
UI: add active tool panel to tool settings
Diffstat (limited to 'release/scripts/startup/bl_ui/space_topbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index b6a68f06785..3395889cf82 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -614,6 +614,26 @@ class TOPBAR_MT_workspace_menu(Menu): layout.operator("workspace.delete", text="Delete") +class TOPBAR_PT_active_tool(Panel): + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_category = "" + bl_context = ".active_tool" # dot on purpose (access from tool settings) + bl_label = "Active Tool" + + def draw(self, context): + layout = self.layout + + # Panel display of topbar tool settings. + # currently displays in tool settings, keep here since the same functionality is used for the topbar. + + layout.use_property_split = True + layout.use_property_decorate = False + + from .space_toolsystem_common import ToolSelectPanelHelper + ToolSelectPanelHelper.draw_active_tool_header(context, layout, show_tool_name=True) + + classes = ( TOPBAR_HT_upper_bar, TOPBAR_HT_lower_bar, @@ -630,6 +650,7 @@ classes = ( TOPBAR_MT_render, TOPBAR_MT_window, TOPBAR_MT_help, + TOPBAR_PT_active_tool, ) if __name__ == "__main__": # only for live edit. |