Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d_toolbar.py
| Show First 20 Lines • Show All 726 Lines • ▼ Show 20 Lines | |||||
| class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): | class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): | ||||
| bl_context = ".sculpt_mode" # dot on purpose (access from topbar) | bl_context = ".sculpt_mode" # dot on purpose (access from topbar) | ||||
| bl_label = "Dyntopo" | bl_label = "Dyntopo" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| bl_ui_units_x = 12 | bl_ui_units_x = 12 | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.sculpt_object and context.tool_settings.sculpt) | paint_settings = cls.paint_settings(context) | ||||
| return (context.sculpt_object and context.tool_settings.sculpt and paint_settings) | |||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| is_popover = self.is_popover | is_popover = self.is_popover | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.operator( | layout.operator( | ||||
| "sculpt.dynamic_topology_toggle", | "sculpt.dynamic_topology_toggle", | ||||
| icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT', | icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT', | ||||
| text="", | text="", | ||||
| ▲ Show 20 Lines • Show All 1,484 Lines • Show Last 20 Lines | |||||