code cleanup: move bmesh inline funcs to headers (avoids compiling the C files).
This commit is contained in:
parent
0c898514f0
commit
3c11379e26
|
@ -36,13 +36,6 @@
|
|||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "BKE_cdderivedmesh.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_paint.h"
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_tessmesh.h"
|
||||
|
||||
#include "BLI_scanfill.h"
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
|
@ -57,7 +50,8 @@
|
|||
#include "BKE_global.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_paint.h"
|
||||
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_tessmesh.h"
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
|
|
|
@ -38,21 +38,21 @@ extern "C" {
|
|||
#define __BLI_MATH_INLINE_H__
|
||||
|
||||
#ifdef __BLI_MATH_INLINE_H__
|
||||
#ifdef _MSC_VER
|
||||
#define MINLINE static __forceinline
|
||||
#define MALWAYS_INLINE MINLINE
|
||||
# ifdef _MSC_VER
|
||||
# define MINLINE static __forceinline
|
||||
# define MALWAYS_INLINE MINLINE
|
||||
# else
|
||||
# define MINLINE static inline
|
||||
# if (defined(__APPLE__) && defined(__ppc__))
|
||||
/* static inline __attribute__ here breaks osx ppc gcc42 build */
|
||||
# define MALWAYS_INLINE static __attribute__((always_inline))
|
||||
# else
|
||||
# define MALWAYS_INLINE static inline __attribute__((always_inline))
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
#define MINLINE static inline
|
||||
#if (defined(__APPLE__) && defined(__ppc__))
|
||||
/* static inline __attribute__ here breaks osx ppc gcc42 build */
|
||||
#define MALWAYS_INLINE static __attribute__((always_inline))
|
||||
#else
|
||||
#define MALWAYS_INLINE static inline __attribute__((always_inline))
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define MINLINE
|
||||
#define MALWAYS_INLINE
|
||||
# define MINLINE
|
||||
# define MALWAYS_INLINE
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -60,4 +60,3 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#endif /* __BLI_MATH_INLINE_H__ */
|
||||
|
||||
|
|
|
@ -56,12 +56,12 @@ set(SRC
|
|||
intern/bmesh_construct.h
|
||||
intern/bmesh_core.c
|
||||
intern/bmesh_core.h
|
||||
intern/bmesh_inline.c
|
||||
intern/bmesh_inline.h
|
||||
intern/bmesh_interp.c
|
||||
intern/bmesh_interp.h
|
||||
intern/bmesh_iterators.c
|
||||
intern/bmesh_iterators.h
|
||||
intern/bmesh_iterators_inline.c
|
||||
intern/bmesh_iterators_inline.h
|
||||
intern/bmesh_marking.c
|
||||
intern/bmesh_marking.h
|
||||
intern/bmesh_mesh.c
|
||||
|
@ -73,7 +73,7 @@ set(SRC
|
|||
intern/bmesh_mods.c
|
||||
intern/bmesh_mods.h
|
||||
intern/bmesh_opdefines.c
|
||||
intern/bmesh_operator_api_inline.c
|
||||
intern/bmesh_operator_api_inline.h
|
||||
intern/bmesh_operators.c
|
||||
intern/bmesh_operators.h
|
||||
intern/bmesh_operators_private.h
|
||||
|
|
|
@ -198,11 +198,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_customdata_types.h"
|
||||
#include "DNA_listBase.h" /* selection history uses */
|
||||
#include "DNA_customdata_types.h" /* BMesh struct in bmesh_class.h uses */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "BLI_utildefines.h"
|
||||
// #include "BLI_utildefines.h"
|
||||
|
||||
#include "bmesh_class.h"
|
||||
|
||||
|
@ -224,8 +224,7 @@ extern "C" {
|
|||
#include "intern/bmesh_queries.h"
|
||||
#include "intern/bmesh_walkers.h"
|
||||
|
||||
#include "intern/bmesh_inline.c"
|
||||
#include "intern/bmesh_operator_api_inline.c"
|
||||
#include "intern/bmesh_inline.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -20,16 +20,14 @@
|
|||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file blender/bmesh/intern/bmesh_inline.c
|
||||
/** \file blender/bmesh/intern/bmesh_inline.h
|
||||
* \ingroup bmesh
|
||||
*
|
||||
* BM Inline functions.
|
||||
*/
|
||||
|
||||
#ifndef __BMESH_INLINE_C__
|
||||
#define __BMESH_INLINE_C__
|
||||
|
||||
#include "bmesh.h"
|
||||
#ifndef __BMESH_INLINE_H__
|
||||
#define __BMESH_INLINE_H__
|
||||
|
||||
/* stuff for dealing with header flags */
|
||||
#define BM_elem_flag_test( ele, hflag) _bm_elem_flag_test (&(ele)->head, hflag)
|
||||
|
@ -113,4 +111,4 @@ BLI_INLINE int _bm_elem_index_get(const BMHeader *head)
|
|||
return head->index;
|
||||
}
|
||||
|
||||
#endif /* __BMESH_INLINE_C__ */
|
||||
#endif /* __BMESH_INLINE_H__ */
|
|
@ -28,6 +28,7 @@
|
|||
* See: bmesh_iterators_inlin.c too, some functions are here for speed reasons.
|
||||
*/
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
#include "intern/bmesh_private.h"
|
||||
|
|
|
@ -143,6 +143,6 @@ void *bmiter__edge_of_face_step(struct BMIter *iter);
|
|||
void bmiter__loop_of_face_begin(struct BMIter *iter);
|
||||
void *bmiter__loop_of_face_step(struct BMIter *iter);
|
||||
|
||||
#include "intern/bmesh_iterators_inline.c"
|
||||
#include "intern/bmesh_iterators_inline.h"
|
||||
|
||||
#endif /* __BMESH_ITERATORS_H__ */
|
||||
|
|
|
@ -20,16 +20,14 @@
|
|||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file blender/bmesh/intern/bmesh_iterators_inline.c
|
||||
/** \file blender/bmesh/intern/bmesh_iterators_inline.h
|
||||
* \ingroup bmesh
|
||||
*
|
||||
* BMesh inline iterator functions.
|
||||
*/
|
||||
|
||||
#ifndef __BMESH_ITERATORS_INLINE_C__
|
||||
#define __BMESH_ITERATORS_INLINE_C__
|
||||
|
||||
#include "bmesh.h"
|
||||
#ifndef __BMESH_ITERATORS_INLINE_H__
|
||||
#define __BMESH_ITERATORS_INLINE_H__
|
||||
|
||||
/* inline here optimizes out the switch statement when called with
|
||||
* constant values (which is very common), nicer for loop-in-loop situations */
|
||||
|
@ -189,4 +187,4 @@ BLI_INLINE void *BM_iter_new(BMIter *iter, BMesh *bm, const char itype, void *da
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* __BMESH_ITERATORS_INLINE_C__ */
|
||||
#endif /* __BMESH_ITERATORS_INLINE_H__ */
|
|
@ -26,16 +26,14 @@
|
|||
* BM mesh conversion functions.
|
||||
*/
|
||||
|
||||
|
||||
#include "bmesh.h"
|
||||
#include "intern/bmesh_private.h" /* for element checking */
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_array.h"
|
||||
#include "BLI_math_vector.h"
|
||||
|
@ -46,7 +44,8 @@
|
|||
#include "BKE_global.h" /* ugh - for looping over all objects */
|
||||
#include "BKE_main.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
#include "bmesh.h"
|
||||
#include "intern/bmesh_private.h" /* for element checking */
|
||||
|
||||
/* Mesh -> BMesh */
|
||||
void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
/* debug builds only */
|
||||
#ifdef DEBUG
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "bmesh_mesh_validate.h"
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
#include "intern/bmesh_private.h"
|
||||
|
||||
|
|
|
@ -20,17 +20,14 @@
|
|||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file blender/bmesh/intern/bmesh_operator_api_inline.c
|
||||
/** \file blender/bmesh/intern/bmesh_operator_api_inline.h
|
||||
* \ingroup bmesh
|
||||
*
|
||||
* BMesh inline operator functions.
|
||||
*/
|
||||
|
||||
#ifndef __BMESH_OPERATOR_API_INLINE_C__
|
||||
#define __BMESH_OPERATOR_API_INLINE_C__
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#ifndef __BMESH_OPERATOR_API_INLINE_H__
|
||||
#define __BMESH_OPERATOR_API_INLINE_H__
|
||||
|
||||
/* tool flag API. never, ever ever should tool code put junk in
|
||||
* header flags (element->head.flag), nor should they use
|
||||
|
@ -146,4 +143,4 @@ BLI_INLINE void *BMO_slot_map_ptr_get(BMesh *bm, BMOperator *op, const char *slo
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* __BMESH_OPERATOR_API_INLINE_C__ */
|
||||
#endif /* __BMESH_OPERATOR_API_INLINE_H__ */
|
|
@ -94,4 +94,6 @@ void BM_mesh_esubdivideflag(struct Object *obedit, BMesh *bm, int flag, float sm
|
|||
float fractal, int beauty, int numcuts, int seltype,
|
||||
int cornertype, int singleedge, int gridfill, int seed);
|
||||
|
||||
#include "intern/bmesh_operator_api_inline.h"
|
||||
|
||||
#endif /* __BMESH_OPERATORS_H__ */
|
||||
|
|
|
@ -31,11 +31,11 @@
|
|||
* Low level routines for manipulating the BM structure.
|
||||
*/
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
#include "intern/bmesh_private.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/**
|
||||
* MISC utility functions.
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h> /* for memcpy */
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_listbase.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
|
|
|
@ -26,11 +26,13 @@
|
|||
* BMesh Walker Code.
|
||||
*/
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_customdata.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
#include "intern/bmesh_private.h"
|
||||
#include "bmesh_walkers_private.h"
|
||||
#include "intern/bmesh_walkers_private.h"
|
||||
|
||||
/**
|
||||
* Shell Walker:
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_array.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#define VERT_INPUT 1
|
||||
#define EDGE_OUT 1
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "intern/bmesh_operators_private.h" /* own include */
|
||||
|
|
|
@ -33,14 +33,15 @@
|
|||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_tessmesh.h"
|
||||
#include "BKE_bmesh.h"
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_ghash.h"
|
||||
#include "BLI_memarena.h"
|
||||
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_tessmesh.h"
|
||||
#include "BKE_bmesh.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
#include "intern/bmesh_private.h"
|
||||
|
||||
|
|
|
@ -56,6 +56,12 @@
|
|||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_array.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_smallhash.h"
|
||||
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_armature.h"
|
||||
|
@ -103,12 +109,6 @@
|
|||
|
||||
#include "UI_view2d.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_array.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_smallhash.h"
|
||||
|
||||
#include "RNA_access.h"
|
||||
|
||||
#include "transform.h"
|
||||
|
|
|
@ -50,6 +50,11 @@
|
|||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_movieclip_types.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_rand.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "RNA_access.h"
|
||||
|
||||
//#include "BIF_screen.h"
|
||||
|
@ -91,11 +96,6 @@
|
|||
|
||||
//#include "BDR_unwrapper.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_rand.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "WM_types.h"
|
||||
#include "WM_api.h"
|
||||
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
#include "DNA_scene_types.h"
|
||||
#include "DNA_view3d_types.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "RNA_access.h"
|
||||
|
||||
#include "BKE_action.h"
|
||||
|
@ -63,9 +66,6 @@
|
|||
#include "BKE_pointcache.h"
|
||||
#include "BKE_tessmesh.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BIF_gl.h"
|
||||
|
||||
#include "WM_api.h"
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
#include "DNA_screen_types.h"
|
||||
#include "DNA_view3d_types.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_armature.h"
|
||||
#include "BKE_curve.h"
|
||||
|
@ -45,10 +48,6 @@
|
|||
#include "BKE_tessmesh.h"
|
||||
#include "BKE_report.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLF_translation.h"
|
||||
|
||||
//#include "BIF_editmesh.h"
|
||||
|
|
|
@ -38,15 +38,15 @@
|
|||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_math.h"
|
||||
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_multires.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_tessmesh.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_math.h"
|
||||
|
||||
#include "ED_util.h"
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#include "DNA_scene_types.h"
|
||||
#include "DNA_meta_types.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_tessmesh.h"
|
||||
#include "BKE_group.h" /* needed for object_in_group() */
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
#include <Python.h>
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "bmesh_py_types.h"
|
||||
|
@ -40,8 +42,6 @@
|
|||
|
||||
#include "bmesh_py_utils.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_tessmesh.h"
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
|
|
|
@ -35,14 +35,14 @@
|
|||
|
||||
#include <Python.h>
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_listbase.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "bmesh_py_types.h"
|
||||
#include "bmesh_py_types_select.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_listbase.h"
|
||||
|
||||
#include "BKE_tessmesh.h"
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "bmesh_py_types.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "bmesh_py_types.h"
|
||||
|
||||
#include "bmesh_py_utils.h" /* own include */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue