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-03-27 11:54:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-27 11:54:11 +0400
commitd358458a8d3bc37c4ea5418fa6e6c9c259704f51 (patch)
tree1d76b4fc9d486eaf44741fe26494f78aa46d5fe7 /source/blender/bmesh/intern/bmesh_opdefines.c
parent31eee77a4503ac38c3d9d96a5f77df86648c700c (diff)
fix for mesh face filling when a valid edge-loop was selected but unselected connecting geometry existed inside the loop.
In this case edgenet_fill operator failed and it would fallback to filling as unordered vertices which was mostly fine but failed on some concave loops. Add a new bmesh operator 'edgeloop_fill' fills in closed loops even if they don't make a valid edge-net.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_opdefines.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 869c894b66c..7583332c4db 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -527,6 +527,30 @@ static BMOpDefine bmo_bridge_loops_def = {
};
/*
+ * Edge Loop Fill.
+ *
+ * Create faces defined by one or more non overlapping edge loops.
+ */
+static BMOpDefine bmo_edgeloop_fill_def = {
+ "edgeloop_fill",
+ /* slots_in */
+ {{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* input edges */
+ /* restricts edges to groups. maps edges to integer */
+ {"mat_nr", BMO_OP_SLOT_INT}, /* material to use */
+ {"use_smooth", BMO_OP_SLOT_BOOL}, /* smooth state to use */
+ {{'\0'}},
+ },
+ /* slots_out */
+ /* maps new faces to the group numbers they came from */
+ {{"faces.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* new faces */
+ {{'\0'}},
+ },
+ bmo_edgeloop_fill_exec,
+ 0,
+};
+
+
+/*
* Edge Net Fill.
*
* Create faces defined by enclosed edges.
@@ -541,7 +565,7 @@ static BMOpDefine bmo_edgenet_fill_def = {
{"use_fill_check", BMO_OP_SLOT_BOOL},
{"exclude_faces", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* list of faces to ignore for manifold check */
{"mat_nr", BMO_OP_SLOT_INT}, /* material to use */
- {"use_smooth", BMO_OP_SLOT_BOOL}, /* material to use */
+ {"use_smooth", BMO_OP_SLOT_BOOL}, /* smooth state to use */
{{'\0'}},
},
/* slots_out */
@@ -1615,6 +1639,7 @@ const BMOpDefine *bmo_opdefines[] = {
&bmo_dissolve_limit_def,
&bmo_dissolve_verts_def,
&bmo_duplicate_def,
+ &bmo_edgeloop_fill_def,
&bmo_edgenet_fill_def,
&bmo_edgenet_prepare_def,
&bmo_extrude_discrete_faces_def,