UI: show steps for spin tool
This commit is contained in:
@@ -612,6 +612,10 @@ class _defs_edit_mesh:
|
|||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
def spin():
|
def spin():
|
||||||
|
def draw_settings(context, layout, tool):
|
||||||
|
props = tool.operator_properties("mesh.spin")
|
||||||
|
layout.prop(props, "steps")
|
||||||
|
|
||||||
return dict(
|
return dict(
|
||||||
text="Spin",
|
text="Spin",
|
||||||
icon="ops.mesh.spin",
|
icon="ops.mesh.spin",
|
||||||
@@ -620,18 +624,24 @@ class _defs_edit_mesh:
|
|||||||
("mesh.spin", dict(),
|
("mesh.spin", dict(),
|
||||||
dict(type='EVT_TWEAK_A', value='ANY')),
|
dict(type='EVT_TWEAK_A', value='ANY')),
|
||||||
),
|
),
|
||||||
|
draw_settings=draw_settings,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
def spin_duplicate():
|
def spin_duplicate():
|
||||||
|
def draw_settings(context, layout, tool):
|
||||||
|
props = tool.operator_properties("mesh.spin")
|
||||||
|
layout.prop(props, "steps")
|
||||||
|
|
||||||
return dict(
|
return dict(
|
||||||
text="Spin (Duplicate)",
|
text="Spin (Duplicate)",
|
||||||
icon="ops.mesh.spin.duplicate",
|
icon="ops.mesh.spin.duplicate",
|
||||||
widget=None,
|
widget=None,
|
||||||
keymap=(
|
keymap=(
|
||||||
("mesh.spin", dict(dupli=True),
|
("mesh.spin", dict(dupli=True),
|
||||||
dict(type='ACTIONMOUSE', value='PRESS')),
|
dict(type='EVT_TWEAK_A', value='ANY')),
|
||||||
),
|
),
|
||||||
|
draw_settings=draw_settings,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
|
|||||||
Reference in New Issue
Block a user