forked from bartvdbraak/blender
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.
This commit is contained in:
parent
85bdbd7653
commit
ff0079b40a
@ -1532,6 +1532,15 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return (context.sculpt_object and context.tool_settings.sculpt)
|
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):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
@ -1540,11 +1549,6 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
|
|||||||
settings = self.paint_settings(context)
|
settings = self.paint_settings(context)
|
||||||
brush = settings.brush
|
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 = layout.column()
|
||||||
col.active = context.sculpt_object.use_dynamic_topology_sculpting
|
col.active = context.sculpt_object.use_dynamic_topology_sculpting
|
||||||
sub = col.column(align=True)
|
sub = col.column(align=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user