Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-22 21:25:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-22 21:25:02 +0400
commite4bb9135103f404d7af0f95d1effab208f0a8a15 (patch)
tree04f6a225c32cb90b1287c169dcace2a6901d8b9c /source/blender/bmesh/intern/bmesh_opdefines.c
parent240fb6fa26674b8fefeed2a226352ab4c31cfe74 (diff)
Extend existing editmesh connect tool so it can connect across multiple faces.
only use this when 2 vertices are selected, otherwise use the same behavior as before. This works a little like a fast knife tool, but it only cuts straight lines and doesnt depend on the view-port. Examples: - http://www.graphicall.org/ftp/ideasman42/mesh_connect_pair.png - http://www.graphicall.org/ftp/ideasman42/mesh_connect_pair_curve.png
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_opdefines.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index c66e886bfa9..7e4d5e06100 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -841,6 +841,26 @@ static BMOpDefine bmo_connect_verts_def = {
};
/*
+ * Connect Verts.
+ *
+ * Split faces by adding edges that connect **verts**.
+ */
+static BMOpDefine bmo_connect_vert_pair_def = {
+ "connect_vert_pair",
+ /* slots_in */
+ {{"verts", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}},
+ {{'\0'}},
+ },
+ /* slots_out */
+ {{"edges.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}},
+ {{'\0'}},
+ },
+ bmo_connect_vert_pair_exec,
+ BMO_OPTYPE_FLAG_UNTAN_MULTIRES | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH,
+};
+
+
+/*
* Extrude Faces.
*
* Extrude operator (does not transform)
@@ -1685,6 +1705,7 @@ const BMOpDefine *bmo_opdefines[] = {
&bmo_collapse_def,
&bmo_collapse_uvs_def,
&bmo_connect_verts_def,
+ &bmo_connect_vert_pair_def,
&bmo_contextual_create_def,
#ifdef WITH_BULLET
&bmo_convex_hull_def,