diff options
Diffstat (limited to 'source/blender/bmesh/bmesh_class.h')
-rw-r--r-- | source/blender/bmesh/bmesh_class.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index 9d797c1e602..845785a26d7 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -45,7 +45,7 @@ struct Object; * pointers. this is a requirement of mempool's method of * iteration. * - * hrm. it doesn't but stull works ok, remove the comment above? - campbell. + * hrm. it doesn't but still works ok, remove the comment above? - campbell. */ // #pragma GCC diagnostic error "-Wpadded" @@ -184,11 +184,12 @@ typedef struct BMesh { * BM_LOOP isn't handled so far. */ char elem_index_dirty; - /*element pools*/ + /* element pools */ struct BLI_mempool *vpool, *epool, *lpool, *fpool; - /*operator api stuff*/ - struct BLI_mempool *toolflagpool; + /* operator api stuff (must be all NULL or all alloc'd) */ + struct BLI_mempool *vtoolflagpool, *etoolflagpool, *ftoolflagpool; + int stackdepth; struct BMOperator *currentop; @@ -204,7 +205,7 @@ typedef struct BMesh { * Only use when the edit mesh cant be accessed - campbell */ short selectmode; - /*ID of the shape key this bmesh came from*/ + /* ID of the shape key this bmesh came from */ int shapenr; int walkers, totflags; @@ -251,7 +252,21 @@ enum { * not have functions clobber them */ }; +struct BPy_BMGeneric; +extern void bpy_bm_generic_invalidate(struct BPy_BMGeneric *self); + /* defines */ +#define BM_ELEM_CD_GET_VOID_P(ele, offset) \ + (assert(offset != -1), (void *)((char *)(ele)->head.data + (offset))) + +#define BM_ELEM_CD_SET_FLOAT(ele, offset, f) \ + { assert(offset != -1); *((float *)((char *)(ele)->head.data + (offset))) = (f); } (void)0 + +#define BM_ELEM_CD_GET_FLOAT(ele, offset) \ + (assert(offset != -1), *((float *)((char *)(ele)->head.data + (offset)))) + +#define BM_ELEM_CD_GET_FLOAT_AS_UCHAR(ele, offset) \ + (assert(offset != -1), (unsigned char)(BM_ELEM_CD_GET_FLOAT(ele, offset) * 255.0f)) /*forward declarations*/ @@ -276,5 +291,6 @@ enum { * but should not error on valid cases */ #define BM_LOOP_RADIAL_MAX 10000 #define BM_NGON_MAX 100000 +#define BM_OMP_LIMIT 10000 /* setting zero so we can catch bugs in OpenMP/BMesh */ #endif /* __BMESH_CLASS_H__ */ |