diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/BLI_linklist_stack.h | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_core.c | 3 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_polygon.c | 10 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_bridge.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_connect.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_connect_nonplanar.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_dupe.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_edgenet.c | 5 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_fill_attribute.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_fill_holes.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_inset.c | 1 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_symmetrize.c | 3 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_triangulate.c | 1 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_utils.c | 1 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 1 |
15 files changed, 6 insertions, 33 deletions
diff --git a/source/blender/blenlib/BLI_linklist_stack.h b/source/blender/blenlib/BLI_linklist_stack.h index ca050883018..c9fb00ecdf5 100644 --- a/source/blender/blenlib/BLI_linklist_stack.h +++ b/source/blender/blenlib/BLI_linklist_stack.h @@ -151,8 +151,6 @@ (void)&(_##var##_type); \ } (void)0 -#include "BLI_alloca.h" - /** \} */ #endif /* __BLI_LINKLIST_STACK_H__ */ diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index 0b14cf22276..8441a6ec75f 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -2282,7 +2282,8 @@ BMVert *bmesh_urmv(BMesh *bm, BMFace *f_sep, BMVert *v_sep) /** * Avoid calling this where possible, - * low level function for swapping faces. + * low level function so both face pointers remain intact but point to swapped data. + * \note must be from the same bmesh. */ void bmesh_face_swap_data(BMesh *bm, BMFace *f_a, BMFace *f_b) { diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index d11ae82b3d2..1dfd2535913 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -30,8 +30,6 @@ #include "DNA_listBase.h" -#include "MEM_guardedalloc.h" - #include "BLI_alloca.h" #include "BLI_math.h" #include "BLI_memarena.h" @@ -833,10 +831,6 @@ void BM_face_triangulate(BMesh *bm, BMFace *f, f_new = BM_face_split(bm, f, l_first->v, l_first->next->next->v, &l_new, NULL, false); copy_v3_v3(f_new->no, f->no); - if (UNLIKELY(!l_new || !f_new)) { - fprintf(stderr, "%s: triangulator failed to split face! (bmesh internal error)\n", __func__); - } - if (use_tag) { BM_elem_flag_enable(l_new->e, BM_ELEM_TAG); BM_elem_flag_enable(f, BM_ELEM_TAG); @@ -905,13 +899,15 @@ void BM_face_triangulate(BMesh *bm, BMFace *f, BM_elem_flag_enable(l_new->e, BM_ELEM_TAG); } + /* add all but the last face which is swapped and removed (below) */ if (r_faces_new && sf_tri->prev) { r_faces_new[nf_i++] = f_new; } } if (sf_ctx.fillfacebase.first) { - /* we can't delete the real face, so swap data and delete */ + /* we can't delete the real face, because some of the callers expect it to remain valid. + * so swap data and delete the last created tri */ bmesh_face_swap_data(bm, f, f_new); BM_face_kill(bm, f_new); diff --git a/source/blender/bmesh/operators/bmo_bridge.c b/source/blender/bmesh/operators/bmo_bridge.c index 9dfbf951fc0..10d15d93995 100644 --- a/source/blender/bmesh/operators/bmo_bridge.c +++ b/source/blender/bmesh/operators/bmo_bridge.c @@ -26,8 +26,6 @@ * Connect verts across faces (splits faces) and bridge tool. */ -#include "MEM_guardedalloc.h" - #include "BLI_math.h" #include "BLI_utildefines.h" #include "BLI_listbase.h" diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index b3a42ba533e..d0f64eb2892 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -26,8 +26,6 @@ * Connect verts across faces (splits faces). */ -#include "MEM_guardedalloc.h" - #include "BLI_math.h" #include "BLI_utildefines.h" #include "BLI_alloca.h" diff --git a/source/blender/bmesh/operators/bmo_connect_nonplanar.c b/source/blender/bmesh/operators/bmo_connect_nonplanar.c index 61085596acc..bd7a625406c 100644 --- a/source/blender/bmesh/operators/bmo_connect_nonplanar.c +++ b/source/blender/bmesh/operators/bmo_connect_nonplanar.c @@ -26,8 +26,6 @@ * Connect verts non-planer faces iteratively (splits faces). */ -#include "MEM_guardedalloc.h" - #include "BLI_math.h" #include "BLI_utildefines.h" #include "BLI_alloca.h" diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index bd2485b92fb..a5c34f7623b 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -26,8 +26,6 @@ * Duplicate, Split, Split operators. */ -#include "MEM_guardedalloc.h" - #include "BLI_math.h" #include "BLI_alloca.h" diff --git a/source/blender/bmesh/operators/bmo_edgenet.c b/source/blender/bmesh/operators/bmo_edgenet.c index fdee80b9505..de41bc7937d 100644 --- a/source/blender/bmesh/operators/bmo_edgenet.c +++ b/source/blender/bmesh/operators/bmo_edgenet.c @@ -28,13 +28,8 @@ #include "MEM_guardedalloc.h" -#include "BLI_listbase.h" #include "BLI_math.h" #include "BLI_array.h" -#include "BLI_alloca.h" -#include "BLI_smallhash.h" -#include "BLI_rand.h" -#include "BLI_heap.h" #include "bmesh.h" #include "bmesh_tools.h" diff --git a/source/blender/bmesh/operators/bmo_fill_attribute.c b/source/blender/bmesh/operators/bmo_fill_attribute.c index f53b4536e44..fa77e6b509c 100644 --- a/source/blender/bmesh/operators/bmo_fill_attribute.c +++ b/source/blender/bmesh/operators/bmo_fill_attribute.c @@ -27,8 +27,6 @@ * Fill in geometry with the attributes of their adjacent data. */ -#include "MEM_guardedalloc.h" - #include "BLI_utildefines.h" #include "BLI_linklist_stack.h" diff --git a/source/blender/bmesh/operators/bmo_fill_holes.c b/source/blender/bmesh/operators/bmo_fill_holes.c index 8160d28d7a7..eadfbdb1aa8 100644 --- a/source/blender/bmesh/operators/bmo_fill_holes.c +++ b/source/blender/bmesh/operators/bmo_fill_holes.c @@ -26,8 +26,6 @@ * Fill boundary edge loop(s) with faces. */ -#include "MEM_guardedalloc.h" - #include "BLI_utildefines.h" #include "bmesh.h" diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index 20cd828af1e..e20556a830d 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -31,7 +31,6 @@ #include "MEM_guardedalloc.h" #include "BLI_math.h" -#include "BLI_array.h" #include "BLI_alloca.h" #include "BLI_memarena.h" #include "BKE_customdata.h" diff --git a/source/blender/bmesh/operators/bmo_symmetrize.c b/source/blender/bmesh/operators/bmo_symmetrize.c index 4b538dccb4e..74f880906c0 100644 --- a/source/blender/bmesh/operators/bmo_symmetrize.c +++ b/source/blender/bmesh/operators/bmo_symmetrize.c @@ -26,9 +26,6 @@ * Makes the mesh symmetrical by splitting along an axis and duplicating the geometry. */ - -#include "MEM_guardedalloc.h" - #include "BLI_utildefines.h" #include "BLI_math.h" diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c index 590b5ea97c4..ca45289520b 100644 --- a/source/blender/bmesh/operators/bmo_triangulate.c +++ b/source/blender/bmesh/operators/bmo_triangulate.c @@ -26,7 +26,6 @@ * Triangulate faces, also defines triangle fill. */ -#include "MEM_guardedalloc.h" #include "DNA_listBase.h" #include "BLI_math.h" diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index e23358bf4ff..c89fee71cbc 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -32,7 +32,6 @@ #include "DNA_meshdata_types.h" #include "BLI_math.h" -#include "BLI_heap.h" #include "BLI_alloca.h" #include "BKE_customdata.h" diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 82454baae78..b0d884568ca 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -47,6 +47,7 @@ #include "DNA_scene_types.h" #include "DNA_particle_types.h" +#include "BLI_alloca.h" #include "BLI_array.h" #include "BLI_math.h" #include "BLI_blenlib.h" |