Edit Mesh: Poly build tool improvements
This commit changes the functionality of the Poly build tool to make it more suitable for retopology tasks: - Click and drag from a boundary edge extrudes a new quad - Click and drag on vertices tweaks the position - Ctrl + click adds geometry. There is a geometry preview in the gizmo. It also can automatically convert triangles to quads. - Shift + click deletes mesh elements (faces or vertices) - Updated preselection code. Different mesh elements take priority depending on the selected action. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D5573
This commit is contained in:
@@ -5454,11 +5454,11 @@ def km_3d_view_tool_edit_mesh_poly_build(params):
|
||||
"3D View Tool: Edit Mesh, Poly Build",
|
||||
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("mesh.polybuild_face_at_cursor_move", {"type": params.tool_mouse, "value": 'PRESS'},
|
||||
("mesh.polybuild_extrude_at_cursor_move", {"type": params.tool_mouse, "value": 'PRESS'},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
|
||||
("mesh.polybuild_split_at_cursor_move", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
|
||||
("mesh.polybuild_face_at_cursor_move", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
|
||||
("mesh.polybuild_dissolve_at_cursor", {"type": params.tool_mouse, "value": 'CLICK', "alt": True}, None),
|
||||
("mesh.polybuild_delete_at_cursor", {"type": params.tool_mouse, "value": 'CLICK', "shift": True}, None),
|
||||
]},
|
||||
)
|
||||
|
||||
|
||||
@@ -490,12 +490,17 @@ class _defs_edit_mesh:
|
||||
|
||||
@ToolDef.from_fn
|
||||
def poly_build():
|
||||
def draw_settings(context, layout, tool):
|
||||
props = tool.operator_properties("mesh.polybuild_face_at_cursor_move")
|
||||
props_macro = props.MESH_OT_polybuild_face_at_cursor
|
||||
layout.prop(props_macro, "create_quads")
|
||||
return dict(
|
||||
idname="builtin.poly_build",
|
||||
label="Poly Build",
|
||||
icon="ops.mesh.polybuild_hover",
|
||||
widget="VIEW3D_GGT_mesh_preselect_elem",
|
||||
keymap=(),
|
||||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
||||
Reference in New Issue
Block a user