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>2012-02-28 01:33:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-28 01:33:30 +0400
commitfa38c3dbac314aa21359f684d52d15652012961e (patch)
tree395758d1d7d8e4eadd976c0218255a46cd2e6196
parentd2cab3e8b002ab5c8843190f736c883f35cd6452 (diff)
bmesh code cleanup - remove most of BKE_bmesh and remove BKE_bmeshCustomData.h.
-rw-r--r--source/blender/blenkernel/BKE_bmesh.h162
-rw-r--r--source/blender/blenkernel/BKE_bmeshCustomData.h105
-rw-r--r--source/blender/blenkernel/CMakeLists.txt1
-rw-r--r--source/blender/blenkernel/intern/modifier.c1
-rw-r--r--source/blender/blenkernel/intern/modifiers_bmesh.c1
-rw-r--r--source/blender/bmesh/intern/bmesh_newcore.c8
-rw-r--r--source/blender/bmesh/intern/bmesh_structure.c98
-rw-r--r--source/blender/bmesh/intern/bmesh_structure.h8
-rw-r--r--source/blender/editors/mesh/bmesh_utils.c6
-rw-r--r--source/blender/editors/transform/transform_conversions.c17
10 files changed, 73 insertions, 334 deletions
diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h
index 06b4df8b05c..677614e26e3 100644
--- a/source/blender/blenkernel/BKE_bmesh.h
+++ b/source/blender/blenkernel/BKE_bmesh.h
@@ -35,159 +35,8 @@
*
*/
-#include "DNA_listBase.h"
-#include "BLI_utildefines.h"
-#include "BLI_ghash.h"
-#include "BLI_mempool.h"
-#include "BLI_memarena.h"
-#include "DNA_image_types.h"
-#include "BKE_DerivedMesh.h"
-//XXX #include "transform.h"
-#include "bmesh.h"
-
-/*forward declerations*/
-struct BME_Vert;
-struct BME_Edge;
-struct BME_Poly;
-struct BME_Loop;
-
/*NOTE: this is the bmesh 1.0 code. it's completely outdated.*/
-/*Notes on further structure Cleanup:
- -Remove the tflags, they belong in custom data layers
- -Remove the eflags completely, they are mostly not used
- -Remove the selection/vis/bevel weight flag/values ect and move them to custom data
- -Remove EID member and move to custom data
- -Add a radial cycle length, disk cycle length and loop cycle length attributes to custom data and have eulers maintain/use them if present.
- -Move data such as vertex coordinates/normals to custom data and leave pointers in structures to active layer data.
- -Remove BME_CycleNode structure?
-*/
-typedef struct BME_CycleNode{
- struct BME_CycleNode *next, *prev;
- void *data;
-} BME_CycleNode;
-
-typedef struct BME_Mesh
-{
- ListBase verts, edges, polys;
- /*memory pools used for storing mesh elements*/
- struct BLI_mempool *vpool;
- struct BLI_mempool *epool;
- struct BLI_mempool *ppool;
- struct BLI_mempool *lpool;
- /*some scratch arrays used by eulers*/
- struct BME_Vert **vtar;
- struct BME_Edge **edar;
- struct BME_Loop **lpar;
- struct BME_Poly **plar;
- int vtarlen, edarlen, lparlen, plarlen;
- int totvert, totedge, totpoly, totloop; /*record keeping*/
- int nextv, nexte, nextp, nextl; /*Next element ID for verts/edges/faces/loops. Never reused*/
- struct CustomData vdata, edata, pdata, ldata; /*Custom Data Layer information*/
-} BME_Mesh;
-
-typedef struct BME_Vert
-{
- struct BME_Vert *next, *prev;
- int EID;
- float co[3];
- float no[3];
- struct BME_Edge *edge; /*first edge in the disk cycle for this vertex*/
- void *data; /*custom vertex data*/
- int eflag1, eflag2; /*reserved for use by eulers*/
- int tflag1, tflag2; /*reserved for use by tools*/
- unsigned short flag, h;
- float bweight;
-} BME_Vert;
-
-typedef struct BME_Edge
-{
- struct BME_Edge *next, *prev;
- int EID;
- struct BME_Vert *v1, *v2; /*note that order of vertex pointers means nothing to eulers*/
- struct BME_CycleNode d1, d2; /*disk cycle nodes for v1 and v2 respectivley*/
- struct BME_Loop *loop; /*first BME_Loop in the radial cycle around this edge*/
- void *data; /*custom edge data*/
- int eflag1, eflag2; /*reserved for use by eulers*/
- int tflag1, tflag2; /*reserved for use by tools*/
- unsigned short flag, h;
- float crease, bweight;
-} BME_Edge;
-
-typedef struct BME_Loop
-{
- struct BME_Loop *next, *prev; /*circularly linked list around face*/
- int EID;
- struct BME_CycleNode radial; /*circularly linked list used to find faces around an edge*/
- struct BME_Vert *v; /*vertex that this loop starts at.*/
- struct BME_Edge *e; /*edge this loop belongs to*/
- struct BME_Poly *f; /*face this loop belongs to*/
- void *data; /*custom per face vertex data*/
- int eflag1, eflag2; /*reserved for use by eulers*/
- int tflag1, tflag2; /*reserved for use by tools*/
- unsigned short flag, h;
-} BME_Loop;
-
-typedef struct BME_Poly
-{
- struct BME_Poly *next, *prev;
- int EID;
- struct BME_Loop *loopbase; /*First editloop around Polygon.*/
- unsigned int len; /*total length of the face. Eulers should preserve this data*/
- void *data; /*custom face data*/
- int eflag1, eflag2; /*reserved for use by eulers*/
- int tflag1, tflag2; /*reserved for use by tools*/
- unsigned short flag, h, mat_nr;
-} BME_Poly;
-
-/*EDGE UTILITIES*/
-int BME_verts_in_edge(struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge *e);
-int BME_vert_in_edge(struct BME_Edge *e, BME_Vert *v);
-struct BME_Vert *BME_edge_getothervert(struct BME_Edge *e, struct BME_Vert *v);
-
-/*GENERAL CYCLE*/
-int BME_cycle_length(void *h);
-
-/*DISK CYCLE*/
-struct BME_Edge *BME_disk_nextedge(struct BME_Edge *e, struct BME_Vert *v);
-struct BME_CycleNode *BME_disk_getpointer(struct BME_Edge *e, struct BME_Vert *v);
-struct BME_Edge *BME_disk_next_edgeflag(struct BME_Edge *e, struct BME_Vert *v, int eflag, int tflag);
-int BME_disk_count_edgeflag(struct BME_Vert *v, int eflag, int tflag);
-
-/*RADIAL CYCLE*/
-struct BME_Loop *BME_radial_nextloop(struct BME_Loop *l);
-int BME_radial_find_face(struct BME_Edge *e,struct BME_Poly *f);
-
-/*LOOP CYCLE*/
-struct BME_Loop *BME_loop_find_loop(struct BME_Poly *f, struct BME_Vert *v);
-
-/*MESH CREATION/DESTRUCTION*/
-struct BME_Mesh *BME_make_mesh(int allocsize[4]);
-void BME_free_mesh(struct BME_Mesh *bm);
-/*FULL MESH VALIDATION*/
-int BME_validate_mesh(struct BME_Mesh *bm, int halt);
-/*ENTER/EXIT MODELLING LOOP*/
-int BME_model_begin(struct BME_Mesh *bm);
-void BME_model_end(struct BME_Mesh *bm);
-
-/*MESH CONSTRUCTION API.*/
-/*MAKE*/
-struct BME_Vert *BME_MV(struct BME_Mesh *bm, float *vec);
-struct BME_Edge *BME_ME(struct BME_Mesh *bm, struct BME_Vert *v1, struct BME_Vert *v2);
-struct BME_Poly *BME_MF(struct BME_Mesh *bm, struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge **elist, int len);
-/*KILL*/
-int BME_KV(struct BME_Mesh *bm, struct BME_Vert *v);
-int BME_KE(struct BME_Mesh *bm, struct BME_Edge *e);
-int BME_KF(struct BME_Mesh *bm, struct BME_Poly *bply);
-/*SPLIT*/
-struct BME_Vert *BME_SEMV(struct BME_Mesh *bm, struct BME_Vert *tv, struct BME_Edge *e, struct BME_Edge **re);
-struct BME_Poly *BME_SFME(struct BME_Mesh *bm, struct BME_Poly *f, struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Loop **rl);
-/*JOIN*/
-int BME_JEKV(struct BME_Mesh *bm, struct BME_Edge *ke, struct BME_Vert *kv);
-struct BME_Poly *BME_JFKE(struct BME_Mesh *bm, struct BME_Poly *f1, struct BME_Poly *f2,struct BME_Edge *e); /*no reason to return BME_Poly pointer?*/
-/*NORMAL FLIP(Is its own inverse)*/
-int BME_loop_reverse(struct BME_Mesh *bm, struct BME_Poly *f);
-
/* bevel tool defines */
/* element flags */
#define BME_BEVEL_ORIG 1
@@ -214,8 +63,8 @@ int BME_loop_reverse(struct BME_Mesh *bm, struct BME_Poly *f);
#define BME_BEVEL_DIST (1<<12) /* same as above */
typedef struct BME_TransData {
- BMesh *bm; /* the bmesh the vert belongs to */
- BMVert *v; /* pointer to the vert this tdata applies to */
+ struct BMesh *bm; /* the bmesh the vert belongs to */
+ struct BMVert *v; /* pointer to the vert this tdata applies to */
float co[3]; /* the original coordinate */
float org[3]; /* the origin */
float vec[3]; /* a directional vector; always, always normalize! */
@@ -230,13 +79,13 @@ typedef struct BME_TransData {
} BME_TransData;
typedef struct BME_TransData_Head {
- GHash *gh; /* the hash structure for element lookup */
- MemArena *ma; /* the memory "pool" we will be drawing individual elements from */
+ struct GHash *gh; /* the hash structure for element lookup */
+ struct MemArena *ma; /* the memory "pool" we will be drawing individual elements from */
int len;
} BME_TransData_Head;
typedef struct BME_Glob { /* stored in Global G for Transform() purposes */
- BMesh *bm;
+ struct BMesh *bm;
BME_TransData_Head *td;
struct TransInfo *Trans; /* a pointer to the global Trans struct */
int imval[2]; /* for restoring original mouse co when initTransform() is called multiple times */
@@ -246,7 +95,6 @@ typedef struct BME_Glob { /* stored in Global G for Transform() purposes */
struct BME_TransData *BME_get_transdata(struct BME_TransData_Head *td, struct BMVert *v);
void BME_free_transdata(struct BME_TransData_Head *td);
-float *BME_bevel_calc_polynormal(struct BME_Poly *f, struct BME_TransData_Head *td);
struct BMesh *BME_bevel(struct BMEditMesh *em, float value, int res, int options, int defgrp_index, float angle, BME_TransData_Head **rtd);
#endif
diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h
deleted file mode 100644
index bbdc6f39cff..00000000000
--- a/source/blender/blenkernel/BKE_bmeshCustomData.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2004 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): Geoffrey Bantle.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-
-#ifndef __BKE_BMESHCUSTOMDATA_H__
-#define __BKE_BMESHCUSTOMDATA_H__
-
-/** \file BKE_bmeshCustomData.h
- * \ingroup bke
- * \since January 2007
- * \brief BMesh modeler structure and functions - custom data.
- */
-
-struct BLI_mempool;
-
-/*Custom Data Types and defines
- Eventual plan is to move almost everything to custom data and let caller
- decide when making the mesh what layers they want to store in the mesh
-
- This stuff should probably go in a seperate file....
-*/
-
-#define BME_CD_FACETEX 0 /*Image texture/texface*/
-#define BME_CD_LOOPTEX 1 /*UV coordinates*/
-#define BME_CD_LOOPCOL 2 /*Vcolors*/
-#define BME_CD_DEFORMVERT 3 /*Vertex Group/Weights*/
-#define BME_CD_NUMTYPES 4
-
-typedef struct BME_CustomDataLayer {
- int type; /* type of data in layer */
- int offset; /* offset of layer in block */
- int active; /* offset of active layer*/
- char name[32]; /* layer name */
-} BME_CustomDataLayer;
-
-typedef struct BME_CustomData {
- struct BME_CustomDataLayer *layers; /*Custom Data Layers*/
- struct BLI_mempool *pool; /*pool for alloc of blocks*/
- int totlayer, totsize; /*total layers and total size in bytes of each block*/
-} BME_CustomData;
-
-typedef struct BME_CustomDataInit{
- int layout[BME_CD_NUMTYPES];
- int active[BME_CD_NUMTYPES];
- int totlayers;
- char *nametemplate;
-} BME_CustomDataInit;
-
-/*Custom data types*/
-typedef struct BME_DeformWeight {
- int def_nr;
- float weight;
-} BME_DeformWeight;
-
-typedef struct BME_DeformVert {
- struct BME_DeformWeight *dw;
- int totweight;
-} BME_DeformVert;
-
-typedef struct BME_facetex{
- struct Image *tpage;
- char flag, transp;
- short mode, tile, unwrap;
-}BME_facetex;
-
-typedef struct BME_looptex{
- float u, v;
-}BME_looptex;
-
-typedef struct BME_loopcol{
- char r, g, b, a;
-}BME_loopcol;
-
-/*CUSTOM DATA API*/
-void BME_CD_Create(struct BME_CustomData *data, struct BME_CustomDataInit *init, int initalloc);
-void BME_CD_Free(struct BME_CustomData *data);
-void BME_CD_free_block(struct BME_CustomData *data, void **block);
-void BME_CD_copy_data(const struct BME_CustomData *source, struct BME_CustomData *dest, void *src_block, void **dest_block);
-void BME_CD_set_default(struct BME_CustomData *data, void **block);
-
-#endif
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 16ef8fecd1d..38946a465b6 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -154,7 +154,6 @@ set(SRC
BKE_armature.h
BKE_blender.h
BKE_bmesh.h
- BKE_bmeshCustomData.h
BKE_bmfont.h
BKE_bmfont_types.h
BKE_boids.h
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 911d303b4cf..9a67260ded4 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -55,7 +55,6 @@
#include "BLI_linklist.h"
#include "BLI_string.h"
-#include "BKE_bmesh.h"
#include "BKE_cloth.h"
#include "BKE_key.h"
#include "BKE_multires.h"
diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c
index 2fdf0e0bb70..6bca40be1e2 100644
--- a/source/blender/blenkernel/intern/modifiers_bmesh.c
+++ b/source/blender/blenkernel/intern/modifiers_bmesh.c
@@ -36,6 +36,7 @@
#include "BLI_array.h"
+#include "BKE_DerivedMesh.h"
#include "BKE_bmesh.h"
#include "BKE_tessmesh.h"
diff --git a/source/blender/bmesh/intern/bmesh_newcore.c b/source/blender/bmesh/intern/bmesh_newcore.c
index 0d1475aaec4..8b1693cba95 100644
--- a/source/blender/bmesh/intern/bmesh_newcore.c
+++ b/source/blender/bmesh/intern/bmesh_newcore.c
@@ -1126,7 +1126,7 @@ static BMFace *bmesh_addpolylist(BMesh *bm, BMFace *UNUSED(example))
* A BMFace pointer
*/
BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
- BMLoop **rl,
+ BMLoop **r_l,
#ifdef USE_BMESH_HOLES
ListBase *holes,
#endif
@@ -1207,7 +1207,7 @@ BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
f->len = f1len;
- if (rl) *rl = f2loop;
+ if (r_l) *r_l = f2loop;
#ifdef USE_BMESH_HOLES
if (holes) {
@@ -1245,7 +1245,7 @@ BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
*
*/
-BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **re)
+BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e)
{
BMLoop *nextl;
BMEdge *ne;
@@ -1400,7 +1400,7 @@ BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **re)
BM_CHECK_ELEMENT(bm, e);
BM_CHECK_ELEMENT(bm, tv);
- if (re) *re = ne;
+ if (r_e) *r_e = ne;
return nv;
}
diff --git a/source/blender/bmesh/intern/bmesh_structure.c b/source/blender/bmesh/intern/bmesh_structure.c
index 0180257e1b0..5dd2537400a 100644
--- a/source/blender/bmesh/intern/bmesh_structure.c
+++ b/source/blender/bmesh/intern/bmesh_structure.c
@@ -226,18 +226,16 @@ static BMEdge *bmesh_disk_prevedge(BMEdge *e, BMVert *v)
BMEdge *bmesh_disk_edge_exists(BMVert *v1, BMVert *v2)
{
- BMEdge *curedge, *startedge;
+ BMEdge *e_iter, *e_first;
if (v1->e) {
- startedge = v1->e;
- curedge = startedge;
+ e_first = e_iter= v1->e;
+
do {
- if (bmesh_verts_in_edge(v1, v2, curedge)) {
- return curedge;
+ if (bmesh_verts_in_edge(v1, v2, e_iter)) {
+ return e_iter;
}
-
- curedge = bmesh_disk_edge_next(curedge, v1);
- } while (curedge != startedge);
+ } while ((e_iter = bmesh_disk_edge_next(e_iter, v1)) != e_first);
}
return NULL;
@@ -245,48 +243,45 @@ BMEdge *bmesh_disk_edge_exists(BMVert *v1, BMVert *v2)
int bmesh_disk_count(struct BMVert *v)
{
- BMEdge *e = v->e;
- int i = 0;
-
- if (!e) {
- return 0;
- }
-
- do {
- if (!e) {
- return 0;
- }
+ if (v->e) {
+ BMEdge *e_first, *e_iter;
+ int count = 0;
- e = bmesh_disk_edge_next(e, v);
+ e_iter = e_first = v->e;
- if (i >= (1 << 20)) {
- printf("bmesh error: infinite loop in disk cycle!\n");
- return 0;
- }
-
- i++;
- } while (e != v->e);
+ do {
+ if (!e_iter) {
+ return 0;
+ }
- return i;
+ if (count >= (1 << 20)) {
+ printf("bmesh error: infinite loop in disk cycle!\n");
+ return 0;
+ }
+ count++;
+ } while ((e_iter = bmesh_disk_edge_next(e_iter, v)) != e_first);
+ return count;
+ }
+ else {
+ return 0;
+ }
}
int bmesh_disk_validate(int len, BMEdge *e, BMVert *v)
{
- BMEdge *e2;
+ BMEdge *e_iter;
if (!BM_vert_in_edge(e, v))
return FALSE;
if (bmesh_disk_count(v) != len || len == 0)
return FALSE;
- e2 = e;
+ e_iter = e;
do {
- if (len != 1 && bmesh_disk_prevedge(e2, v) == e2) {
+ if (len != 1 && bmesh_disk_prevedge(e_iter, v) == e_iter) {
return FALSE;
}
-
- e2 = bmesh_disk_edge_next(e2, v);
- } while (e2 != e);
+ } while ((e_iter = bmesh_disk_edge_next(e_iter, v)) != e);
return TRUE;
}
@@ -302,21 +297,23 @@ int bmesh_disk_validate(int len, BMEdge *e, BMVert *v)
int bmesh_disk_facevert_count(BMVert *v)
{
- BMEdge *curedge;
- int count = 0;
-
/* is there an edge on this vert at all */
- if (!v->e)
- return count;
-
- /* first, loop around edge */
- curedge = v->e;
- do {
- if (curedge->l) count += bmesh_radial_facevert_count(curedge->l, v);
- curedge = bmesh_disk_edge_next(curedge, v);
- } while (curedge != v->e);
+ if (v->e) {
+ BMEdge *e_first, *e_iter;
+ int count = 0;
- return count;
+ /* first, loop around edge */
+ e_first = e_iter = v->e;
+ do {
+ if (e_iter->l) {
+ count += bmesh_radial_facevert_count(e_iter->l, v);
+ }
+ } while ((e_iter = bmesh_disk_edge_next(e_iter, v)) != e_first);
+ return count;
+ }
+ else {
+ return 0;
+ }
}
/*
@@ -336,9 +333,7 @@ struct BMEdge *bmesh_disk_faceedge_find_first(struct BMEdge *e, struct BMVert *v
if (searchedge->l && bmesh_radial_facevert_count(searchedge->l, v)) {
return searchedge;
}
-
- searchedge = bmesh_disk_edge_next(searchedge, v);
- } while (searchedge != e);
+ } while ((searchedge = bmesh_disk_edge_next(searchedge, v)) != e);
return NULL;
}
@@ -351,8 +346,7 @@ struct BMEdge *bmesh_disk_faceedge_find_next(struct BMEdge *e, struct BMVert *v)
if (searchedge->l && bmesh_radial_facevert_count(searchedge->l, v)) {
return searchedge;
}
- searchedge = bmesh_disk_edge_next(searchedge, v);
- } while (searchedge != e);
+ } while ((searchedge = bmesh_disk_edge_next(searchedge, v)) != e);
return e;
}
diff --git a/source/blender/bmesh/intern/bmesh_structure.h b/source/blender/bmesh/intern/bmesh_structure.h
index a4fa2a0168f..67bb87ef1f8 100644
--- a/source/blender/bmesh/intern/bmesh_structure.h
+++ b/source/blender/bmesh/intern/bmesh_structure.h
@@ -70,10 +70,10 @@ BMVert *bmesh_edge_other_vert_get(BMEdge *e, BMVert *v);
BMEdge *bmesh_disk_edge_exists(BMVert *v1, BMVert *v2);
int bmesh_disk_validate(int len, BMEdge *e, BMVert *v);
-/*EULER API - For modifying structure*/
-BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **re);
+/* EULER API - For modifying structure */
+BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e);
BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1,
- BMVert *v2, BMLoop **rl,
+ BMVert *v2, BMLoop **r_l,
#ifdef USE_BMESH_HOLES
ListBase *holes,
#endif
@@ -81,7 +81,7 @@ BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1,
);
BMEdge *bmesh_jekv(BMesh *bm, BMEdge *ke, BMVert *kv, const short check_edge_splice);
-int bmesh_loop_reverse(BMesh *bm, BMFace *f);
+int bmesh_loop_reverse(BMesh *bm, BMFace *f);
BMFace *bmesh_jfke(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e);
BMVert *bmesh_urmv(BMesh *bm, BMFace *sf, BMVert *sv);
diff --git a/source/blender/editors/mesh/bmesh_utils.c b/source/blender/editors/mesh/bmesh_utils.c
index 96ef8b98bf8..f311402aaea 100644
--- a/source/blender/editors/mesh/bmesh_utils.c
+++ b/source/blender/editors/mesh/bmesh_utils.c
@@ -34,11 +34,12 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
+#include "BKE_DerivedMesh.h"
+#include "BKE_bmesh.h"
#include "BKE_context.h"
-#include "BKE_library.h"
#include "BKE_key.h"
+#include "BKE_library.h"
#include "BKE_mesh.h"
-#include "BKE_bmesh.h"
#include "BKE_report.h"
#include "BKE_tessmesh.h"
@@ -48,6 +49,7 @@
#include "ED_mesh.h"
#include "ED_util.h"
+
void EDBM_RecalcNormals(BMEditMesh *em)
{
BM_mesh_normals_update(em->bm, TRUE);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index fe4574921ca..39a89940e17 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -56,30 +56,31 @@
#include "MEM_guardedalloc.h"
+#include "BKE_DerivedMesh.h"
#include "BKE_action.h"
#include "BKE_armature.h"
+#include "BKE_bmesh.h"
+#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_curve.h"
-#include "BKE_constraint.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
-#include "BKE_gpencil.h"
#include "BKE_global.h"
+#include "BKE_gpencil.h"
#include "BKE_key.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
+#include "BKE_movieclip.h"
#include "BKE_nla.h"
+#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_particle.h"
-#include "BKE_sequencer.h"
#include "BKE_pointcache.h"
-#include "BKE_bmesh.h"
-#include "BKE_tessmesh.h"
-#include "BKE_scene.h"
#include "BKE_report.h"
+#include "BKE_scene.h"
+#include "BKE_sequencer.h"
+#include "BKE_tessmesh.h"
#include "BKE_tracking.h"
-#include "BKE_movieclip.h"
-#include "BKE_node.h"
#include "ED_anim_api.h"