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-07-28 23:53:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-28 23:53:46 +0400
commit4f02555004575936cd0b2623af7a324128e5258c (patch)
treeb38959781e705db1736d030729f4a1dbfdb918a1 /source/blender/bmesh/intern/bmesh_opdefines.c
parentc754eaa0f9ace116250d232f806beabb27d28951 (diff)
new mesh tool for cleaning up meshes, splits up non-planar faces while they exceed a given angle threshold
(access from the 'Mesh -> Clean' menu).
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_opdefines.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index b56ed15b901..4f8a851c780 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -868,6 +868,27 @@ static BMOpDefine bmo_connect_verts_def = {
};
/*
+ * Connect Verts Across non Planer Faces.
+ *
+ * Split faces by connecting edges along non planer **faces**.
+ */
+static BMOpDefine bmo_connect_verts_nonplanar_def = {
+ "connect_verts_nonplanar",
+ /* slots_in */
+ {{"angle_limit", BMO_OP_SLOT_FLT}, /* total rotation angle (radians) */
+ {"faces", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}},
+ {{'\0'}},
+ },
+ /* slots_out */
+ {{"edges.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}},
+ {"faces.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}},
+ {{'\0'}},
+ },
+ bmo_connect_verts_nonplanar_exec,
+ BMO_OPTYPE_FLAG_UNTAN_MULTIRES | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH,
+};
+
+/*
* Connect Verts.
*
* Split faces by adding edges that connect **verts**.
@@ -1734,6 +1755,7 @@ const BMOpDefine *bmo_opdefines[] = {
&bmo_collapse_def,
&bmo_collapse_uvs_def,
&bmo_connect_verts_def,
+ &bmo_connect_verts_nonplanar_def,
&bmo_connect_vert_pair_def,
&bmo_contextual_create_def,
#ifdef WITH_BULLET