Tools: Add Shrink/Fatten to Curve Edit Toolbar

This commit is contained in:
William Reynish 2019-03-03 12:37:18 +01:00
parent 16406eb6a8
commit 65a3fe46b5
4 changed files with 22 additions and 0 deletions

Binary file not shown.

View File

@ -5663,6 +5663,17 @@ def km_3d_view_tool_edit_curve_tilt(params):
)
def km_3d_view_tool_edit_curve_shrink_fatten(params):
return (
"3D View Tool: Edit Curve, Shrink/Fatten",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
{"items": [
("transform.transform", {"type": params.tool_tweak, "value": 'ANY'},
{"properties": [("mode", 'CURVE_SHRINKFATTEN'),("release_confirm", True)]}),
]},
)
def km_3d_view_tool_edit_curve_extrude(params):
return (
"3D View Tool: Edit Curve, Extrude",
@ -6133,6 +6144,7 @@ def generate_keymaps(params=None):
km_3d_view_tool_edit_mesh_rip_region(params),
km_3d_view_tool_edit_mesh_rip_edge(params),
km_3d_view_tool_edit_curve_draw(params),
km_3d_view_tool_edit_curve_shrink_fatten(params),
km_3d_view_tool_edit_curve_tilt(params),
km_3d_view_tool_edit_curve_extrude(params),
km_3d_view_tool_edit_curve_extrude_cursor(params),

View File

@ -802,6 +802,14 @@ class _defs_edit_curve:
keymap=(),
)
@ToolDef.from_fn
def curve_shrink_fatten():
return dict(
text="Shrink/Fatten",
icon="ops.curve.shrink_fatten",
widget=None,
keymap=(),
)
class _defs_pose:
@ -1591,6 +1599,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
'EDIT_CURVE': [
*_tools_default,
None,
_defs_edit_curve.curve_shrink_fatten,
_defs_edit_curve.tilt,
_defs_edit_curve.draw,
(

View File

@ -668,6 +668,7 @@ set_property(GLOBAL PROPERTY ICON_GEOM_NAMES
ops.curve.draw
ops.curve.extrude_cursor
ops.curve.extrude_move
ops.curve.shrink_fatten
ops.generic.cursor
ops.generic.select
ops.generic.select_box