From ff0079b40abee35904707b8c8b12985a8429404a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Jul 2016 21:40:59 +1000 Subject: [PATCH] UI: move dyntopo button to header This looks a bit odd, but being able to see if dyntopo is enabled when the panel is collapsed is handy. --- .../scripts/startup/bl_ui/space_view3d_toolbar.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 49c7600c055..ca1ab4c37dd 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1532,6 +1532,15 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): def poll(cls, context): return (context.sculpt_object and context.tool_settings.sculpt) + def draw_header(self, context): + layout = self.layout + layout.operator( + "sculpt.dynamic_topology_toggle", + icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT', + text="", + emboss=False, + ) + def draw(self, context): layout = self.layout @@ -1540,11 +1549,6 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): settings = self.paint_settings(context) brush = settings.brush - if context.sculpt_object.use_dynamic_topology_sculpting: - layout.operator("sculpt.dynamic_topology_toggle", icon='X', text="Disable Dyntopo") - else: - layout.operator("sculpt.dynamic_topology_toggle", icon='SCULPT_DYNTOPO', text="Enable Dyntopo") - col = layout.column() col.active = context.sculpt_object.use_dynamic_topology_sculpting sub = col.column(align=True)