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>2015-06-11 14:46:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-06-11 14:54:06 +0300
commit41564a402ebc317304b8f063d7729d12bad76978 (patch)
tree2a3d1b3c545a84b256d1a20534d85ce537f6e53d /source/blender/bmesh/intern/bmesh_opdefines.c
parentee37de75e6edad2bdfb8b75a8c6d7cb2c0be2956 (diff)
BMesh: flatten faces operator
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_opdefines.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index ce988c6c6dd..096c307d918 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -160,6 +160,28 @@ static BMOpDefine bmo_recalc_face_normals_def = {
};
/*
+ * Planar Faces.
+ *
+ * Iteratively flatten faces.
+ */
+static BMOpDefine bmo_planar_faces_def = {
+ "planar_faces",
+ /* slots_in */
+ {{"faces", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* input geometry. */
+ {"iterations", BMO_OP_SLOT_INT},
+ {"factor", BMO_OP_SLOT_FLT}, /* planar factor */
+ {{'\0'}},
+ },
+ /* slots_out */
+ {{"geom.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}}, /* output slot, computed boundary geometry. */
+ {{'\0'}},
+ },
+ bmo_planar_faces_exec,
+ (BMO_OPTYPE_FLAG_SELECT_FLUSH |
+ BMO_OPTYPE_FLAG_SELECT_VALIDATE),
+};
+
+/*
* Region Extend.
*
* used to implement the select more/less tools.
@@ -2018,6 +2040,7 @@ const BMOpDefine *bmo_opdefines[] = {
&bmo_pointmerge_facedata_def,
&bmo_poke_def,
&bmo_recalc_face_normals_def,
+ &bmo_planar_faces_def,
&bmo_region_extend_def,
&bmo_remove_doubles_def,
&bmo_reverse_colors_def,