code cleanup: redundant includes and add minor comments.
This commit is contained in:
@@ -151,8 +151,6 @@
|
|||||||
(void)&(_##var##_type); \
|
(void)&(_##var##_type); \
|
||||||
} (void)0
|
} (void)0
|
||||||
|
|
||||||
#include "BLI_alloca.h"
|
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
#endif /* __BLI_LINKLIST_STACK_H__ */
|
#endif /* __BLI_LINKLIST_STACK_H__ */
|
||||||
|
@@ -2282,7 +2282,8 @@ BMVert *bmesh_urmv(BMesh *bm, BMFace *f_sep, BMVert *v_sep)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Avoid calling this where possible,
|
* 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)
|
void bmesh_face_swap_data(BMesh *bm, BMFace *f_a, BMFace *f_b)
|
||||||
{
|
{
|
||||||
|
@@ -30,8 +30,6 @@
|
|||||||
|
|
||||||
#include "DNA_listBase.h"
|
#include "DNA_listBase.h"
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
|
|
||||||
#include "BLI_alloca.h"
|
#include "BLI_alloca.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_memarena.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);
|
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);
|
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) {
|
if (use_tag) {
|
||||||
BM_elem_flag_enable(l_new->e, BM_ELEM_TAG);
|
BM_elem_flag_enable(l_new->e, BM_ELEM_TAG);
|
||||||
BM_elem_flag_enable(f, 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);
|
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) {
|
if (r_faces_new && sf_tri->prev) {
|
||||||
r_faces_new[nf_i++] = f_new;
|
r_faces_new[nf_i++] = f_new;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sf_ctx.fillfacebase.first) {
|
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);
|
bmesh_face_swap_data(bm, f, f_new);
|
||||||
BM_face_kill(bm, f_new);
|
BM_face_kill(bm, f_new);
|
||||||
|
|
||||||
|
@@ -26,8 +26,6 @@
|
|||||||
* Connect verts across faces (splits faces) and bridge tool.
|
* Connect verts across faces (splits faces) and bridge tool.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
|
@@ -26,8 +26,6 @@
|
|||||||
* Connect verts across faces (splits faces).
|
* Connect verts across faces (splits faces).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_alloca.h"
|
#include "BLI_alloca.h"
|
||||||
|
@@ -26,8 +26,6 @@
|
|||||||
* Connect verts non-planer faces iteratively (splits faces).
|
* Connect verts non-planer faces iteratively (splits faces).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_alloca.h"
|
#include "BLI_alloca.h"
|
||||||
|
@@ -26,8 +26,6 @@
|
|||||||
* Duplicate, Split, Split operators.
|
* Duplicate, Split, Split operators.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_alloca.h"
|
#include "BLI_alloca.h"
|
||||||
|
|
||||||
|
@@ -28,13 +28,8 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_listbase.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_array.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.h"
|
||||||
#include "bmesh_tools.h"
|
#include "bmesh_tools.h"
|
||||||
|
@@ -27,8 +27,6 @@
|
|||||||
* Fill in geometry with the attributes of their adjacent data.
|
* Fill in geometry with the attributes of their adjacent data.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_linklist_stack.h"
|
#include "BLI_linklist_stack.h"
|
||||||
|
|
||||||
|
@@ -26,8 +26,6 @@
|
|||||||
* Fill boundary edge loop(s) with faces.
|
* Fill boundary edge loop(s) with faces.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "bmesh.h"
|
#include "bmesh.h"
|
||||||
|
@@ -31,7 +31,6 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_array.h"
|
|
||||||
#include "BLI_alloca.h"
|
#include "BLI_alloca.h"
|
||||||
#include "BLI_memarena.h"
|
#include "BLI_memarena.h"
|
||||||
#include "BKE_customdata.h"
|
#include "BKE_customdata.h"
|
||||||
|
@@ -26,9 +26,6 @@
|
|||||||
* Makes the mesh symmetrical by splitting along an axis and duplicating the geometry.
|
* Makes the mesh symmetrical by splitting along an axis and duplicating the geometry.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
|
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
* Triangulate faces, also defines triangle fill.
|
* Triangulate faces, also defines triangle fill.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
|
||||||
#include "DNA_listBase.h"
|
#include "DNA_listBase.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_heap.h"
|
|
||||||
#include "BLI_alloca.h"
|
#include "BLI_alloca.h"
|
||||||
|
|
||||||
#include "BKE_customdata.h"
|
#include "BKE_customdata.h"
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_particle_types.h"
|
#include "DNA_particle_types.h"
|
||||||
|
|
||||||
|
#include "BLI_alloca.h"
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
|
Reference in New Issue
Block a user