UI: add dynamic topology toggle to sculpt menu

This wasn't available in any menus making it inaccessible from menu
search.
This commit is contained in:
Campbell Barton 2023-10-25 16:17:44 +11:00
parent dbd7c5f35a
commit 1486f4bc05
1 changed files with 6 additions and 1 deletions

View File

@ -3520,7 +3520,7 @@ class VIEW3D_MT_paint_weight(Menu):
class VIEW3D_MT_sculpt(Menu):
bl_label = "Sculpt"
def draw(self, _context):
def draw(self, context):
layout = self.layout
layout.operator("transform.translate")
@ -3613,6 +3613,11 @@ class VIEW3D_MT_sculpt(Menu):
# Rebuild BVH
layout.operator("sculpt.optimize")
layout.operator(
"sculpt.dynamic_topology_toggle",
icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT',
)
layout.separator()
layout.operator("object.transfer_mode", text="Transfer Sculpt Mode")