UI: Merge Spin and spin duplicate tools
Both tools calls the same operator, only difference is "dupli" bool property value. So expose the property in tool settings and remove the spin duplicate tool Resolves #98094 Pull Request: https://projects.blender.org/blender/blender/pulls/117880
This commit is contained in:
committed by
Pratik Borhade
parent
6729a3f77d
commit
8250502b77
Binary file not shown.
@@ -803,6 +803,7 @@ class _defs_edit_mesh:
|
||||
def draw_settings(_context, layout, tool):
|
||||
props = tool.operator_properties("mesh.spin")
|
||||
layout.prop(props, "steps")
|
||||
layout.prop(props, "dupli")
|
||||
props = tool.gizmo_group_properties("MESH_GGT_spin")
|
||||
layout.prop(props, "axis")
|
||||
|
||||
@@ -815,23 +816,6 @@ class _defs_edit_mesh:
|
||||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def spin_duplicate():
|
||||
def draw_settings(_context, layout, tool):
|
||||
props = tool.operator_properties("mesh.spin")
|
||||
layout.prop(props, "steps")
|
||||
props = tool.gizmo_group_properties("MESH_GGT_spin")
|
||||
layout.prop(props, "axis")
|
||||
|
||||
return dict(
|
||||
idname="builtin.spin_duplicates",
|
||||
label="Spin Duplicates",
|
||||
icon="ops.mesh.spin.duplicate",
|
||||
widget="MESH_GGT_spin",
|
||||
keymap=(),
|
||||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def inset():
|
||||
def draw_settings(_context, layout, tool):
|
||||
@@ -2996,10 +2980,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
|
||||
_defs_edit_mesh.bisect,
|
||||
),
|
||||
_defs_edit_mesh.poly_build,
|
||||
(
|
||||
_defs_edit_mesh.spin,
|
||||
_defs_edit_mesh.spin_duplicate,
|
||||
),
|
||||
_defs_edit_mesh.spin,
|
||||
(
|
||||
_defs_edit_mesh.vertex_smooth,
|
||||
_defs_edit_mesh.vertex_randomize,
|
||||
|
||||
@@ -855,7 +855,6 @@ set_property(GLOBAL PROPERTY ICON_GEOM_NAMES
|
||||
ops.mesh.rip
|
||||
ops.mesh.rip_edge
|
||||
ops.mesh.spin
|
||||
ops.mesh.spin.duplicate
|
||||
ops.mesh.vertices_smooth
|
||||
ops.node.links_cut
|
||||
ops.paint.eyedropper_add
|
||||
|
||||
Reference in New Issue
Block a user