diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-01 14:40:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-01 14:44:31 +0300 |
commit | ff0079b40abee35904707b8c8b12985a8429404a (patch) | |
tree | eb4dbcea0b1ac4fbd7fcc19061b22d44bf47d39e /release | |
parent | 85bdbd76537a239f2f146f6390ffd9963d25d87c (diff) |
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.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 14 |
1 files 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) |