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:
Pablo Dobarro
2019-08-27 16:19:25 +02:00
parent 2a2fd75ef9
commit d8baafd693
9 changed files with 599 additions and 128 deletions

View File

@@ -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