diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_toolbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 75 |
1 files changed, 53 insertions, 22 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 2c3108e0a11..2391678b99b 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -124,12 +124,12 @@ class _defs_view3d_generic: kmi_remove = None return tip_( "Measure distance and angles.\n" - "\u2022 {} anywhere for new measurement.\n" + "\u2022 %s anywhere for new measurement.\n" "\u2022 Drag ruler segment to measure an angle.\n" - "\u2022 {} to remove the active ruler.\n" + "\u2022 %s to remove the active ruler.\n" "\u2022 Ctrl while dragging to snap.\n" "\u2022 Shift while dragging to measure surface thickness" - ).format( + ) % ( kmi_to_string_or_none(kmi_add), kmi_to_string_or_none(kmi_remove), ) @@ -482,7 +482,7 @@ class _defs_view3d_add: return dict( idname="builtin.primitive_cone_add", label="Add Cone", - icon="ops.mesh.primitive_cube_add_gizmo", + icon="ops.mesh.primitive_cone_add_gizmo", description=( "Add cone to mesh interactively" ), @@ -738,27 +738,40 @@ class _defs_edit_mesh: def bevel(): def draw_settings(context, layout, tool, *, extra=False): props = tool.operator_properties("mesh.bevel") - region_type = context.region.type + + region_is_header = context.region.type == 'TOOL_HEADER' if not extra: - if region_type == 'TOOL_HEADER': + if region_is_header: layout.prop(props, "offset_type", text="") else: layout.prop(props, "offset_type") layout.prop(props, "segments") - layout.prop(props, "profile", slider=True) - if region_type == 'TOOL_HEADER': + row = layout.row() + row.prop(props, "profile_type", text="" if region_is_header else None) + if props.profile_type == 'SUPERELLIPSE': + layout.prop(props, "profile", text="Shape", slider=True) + + if region_is_header: layout.popover("TOPBAR_PT_tool_settings_extra", text="...") else: extra = True - if extra or region_type != 'TOOL_HEADER': - layout.prop(props, "vertex_only") - layout.prop(props, "clamp_overlap") - layout.prop(props, "loop_slide") - layout.prop(props, "harden_normals") + if extra: + layout.use_property_split = True + layout.use_property_decorate = False + + if props.profile_type == 'CUSTOM': + layout.prop(props, "profile", text="Miter Shape", slider=True) + + col = layout.column() + col.prop(props, "vertex_only") + col.prop(props, "clamp_overlap") + col.prop(props, "loop_slide") + col.prop(props, "harden_normals") + col = layout.column(heading="Mark") col.prop(props, "mark_seam", text="Seam") col.prop(props, "mark_sharp", text="Sharp") @@ -770,8 +783,7 @@ class _defs_edit_mesh: if props.miter_inner == 'ARC': layout.prop(props, "spread") - layout.prop(props, "use_custom_profile") - if props.use_custom_profile: + if props.profile_type == 'CUSTOM': tool_settings = context.tool_settings layout.template_curveprofile(tool_settings, "custom_bevel_profile_preset") @@ -802,14 +814,14 @@ class _defs_edit_mesh: ) @ToolDef.from_fn - def extrude_dissolve_and_intersect(): + def extrude_manifold(): return dict( - idname="builtin.extrude_dissolve_and_intersect", - label="Extrude Dissolve and Intersect", + idname="builtin.extrude_manifold", + label="Extrude Manifold", description=( "Extrude, dissolves edges whose faces form a flat surface and intersect new edges" ), - icon="none", + icon="ops.mesh.extrude_manifold", widget="VIEW3D_GGT_tool_generic_handle_normal", keymap=(), ) @@ -1212,10 +1224,10 @@ class _defs_sculpt: layout.prop(props, "strength") layout.prop(props, "deform_axis") layout.prop(props, "use_face_sets") - if (props.type == "SURFACE_SMOOTH"): + if props.type == 'SURFACE_SMOOTH': layout.prop(props, "surface_smooth_shape_preservation", expand=False) layout.prop(props, "surface_smooth_current_vertex", expand=False) - if (props.type == "SHARPEN"): + elif props.type == 'SHARPEN': layout.prop(props, "sharpen_smooth_ratio", expand=False) return dict( @@ -1246,6 +1258,24 @@ class _defs_sculpt: draw_settings=draw_settings, ) + @ToolDef.from_fn + def color_filter(): + def draw_settings(_context, layout, tool): + props = tool.operator_properties("sculpt.color_filter") + layout.prop(props, "type", expand=False) + if props.type == 'FILL': + layout.prop(props, "fill_color", expand=False) + layout.prop(props, "strength") + + return dict( + idname="builtin.color_filter", + label="Color Filter", + icon="ops.sculpt.color_filter", + widget=None, + keymap=(), + draw_settings=draw_settings, + ) + class _defs_vertex_paint: @@ -2327,7 +2357,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): None, ( _defs_edit_mesh.extrude, - _defs_edit_mesh.extrude_dissolve_and_intersect, + _defs_edit_mesh.extrude_manifold, _defs_edit_mesh.extrude_normals, _defs_edit_mesh.extrude_individual, _defs_edit_mesh.extrude_cursor, @@ -2421,6 +2451,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): None, _defs_sculpt.mesh_filter, _defs_sculpt.cloth_filter, + _defs_sculpt.color_filter, None, _defs_transform.translate, _defs_transform.rotate, |