Sculpt-dev: split automasking into its own panel
Also replaced texture dropdown in sculpt header with automasking.
This commit is contained in:
parent
9f7f437af7
commit
33586f16fc
|
@ -86,16 +86,16 @@ class VIEW3D_HT_tool_header(Header):
|
|||
|
||||
layout.popover("VIEW3D_PT_tools_brush_stroke")
|
||||
|
||||
if tool_mode == 'SCULPT':
|
||||
layout.popover("VIEW3D_PT_sculpt_automasking")
|
||||
|
||||
sub = layout.row()
|
||||
sub.ui_units_x = 5
|
||||
sub.popover("VIEW3D_PT_tools_brush_falloff_popover")
|
||||
|
||||
# why show this in the header? it takes up space - joeedh
|
||||
# why show this in the header? it takes up too much space - joeedh
|
||||
#layout.popover("VIEW3D_PT_tools_brush_display")
|
||||
|
||||
if tool_mode == 'SCULPT':
|
||||
layout.popover("VIEW3D_PT_tools_brush_texture")
|
||||
|
||||
# Note: general mode options should be added to 'draw_mode_settings'.
|
||||
if tool_mode == 'SCULPT':
|
||||
if is_valid_context:
|
||||
|
|
|
@ -1300,32 +1300,7 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
|
|||
smoothbrush,
|
||||
"dyntopo_disabled", ui_editing=False, text="Disable Dyntopo For Smooth")
|
||||
"""
|
||||
|
||||
col.separator()
|
||||
|
||||
UnifiedPaintPanel.channel_unified(layout.column(),
|
||||
context,
|
||||
brush,
|
||||
"automasking", toolsettings_only=True, expand=True, ui_editing=False)
|
||||
UnifiedPaintPanel.channel_unified(layout.column(),
|
||||
context,
|
||||
brush,
|
||||
"automasking_boundary_edges_propagation_steps",
|
||||
ui_editing=False)
|
||||
UnifiedPaintPanel.channel_unified(layout.column(),
|
||||
context,
|
||||
brush,
|
||||
"concave_mask_factor",
|
||||
ui_editing=False, slider=True, show_mappings=True)
|
||||
|
||||
"""
|
||||
col = layout.column(heading="Auto-Masking", align=True)
|
||||
col.prop(sculpt, "use_automasking_topology", text="Topology")
|
||||
col.prop(sculpt, "use_automasking_face_sets", text="Face Sets")
|
||||
col.prop(sculpt, "use_automasking_boundary_edges", text="Mesh Boundary")
|
||||
col.prop(sculpt, "use_automasking_boundary_face_sets", text="Face Sets Boundary")
|
||||
"""
|
||||
|
||||
|
||||
col.separator()
|
||||
|
||||
UnifiedPaintPanel.channel_unified(layout.column(),
|
||||
|
@ -1345,6 +1320,43 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
|
|||
col.operator("sculpt.set_limit_surface")
|
||||
|
||||
|
||||
# TODO, move to space_view3d.py
|
||||
class VIEW3D_PT_sculpt_automasking(Panel, View3DPaintPanel):
|
||||
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
||||
bl_label = "Automasking"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
bl_ui_units_x = 12
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.sculpt_object and context.tool_settings.sculpt)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
tool_settings = context.tool_settings
|
||||
sculpt = tool_settings.sculpt
|
||||
brush = sculpt.brush
|
||||
|
||||
UnifiedPaintPanel.channel_unified(layout.column(),
|
||||
context,
|
||||
brush,
|
||||
"automasking", toolsettings_only=True, expand=True,
|
||||
ui_editing=False, text="Automasking (global)")
|
||||
UnifiedPaintPanel.channel_unified(layout.column(),
|
||||
context,
|
||||
brush,
|
||||
"automasking_boundary_edges_propagation_steps",
|
||||
ui_editing=False)
|
||||
UnifiedPaintPanel.channel_unified(layout.column(),
|
||||
context,
|
||||
brush,
|
||||
"concave_mask_factor",
|
||||
ui_editing=False, slider=True, show_mappings=True)
|
||||
|
||||
|
||||
class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel):
|
||||
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
||||
bl_parent_id = "VIEW3D_PT_sculpt_options"
|
||||
|
@ -2699,6 +2711,7 @@ classes = (VIEW3D_MT_brush_context_menu,
|
|||
VIEW3D_PT_sculpt_symmetry_for_topbar,
|
||||
VIEW3D_PT_sculpt_options,
|
||||
VIEW3D_PT_sculpt_options_gravity,
|
||||
VIEW3D_PT_sculpt_automasking,
|
||||
|
||||
VIEW3D_PT_tools_weightpaint_symmetry,
|
||||
VIEW3D_PT_tools_weightpaint_symmetry_for_topbar,
|
||||
|
|
Loading…
Reference in New Issue