diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-22 20:08:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-22 20:08:30 +0400 |
commit | 92c47145fde8449cd7fb0547d29dbf9491b40d97 (patch) | |
tree | 3b7077775af29a53c20c5d31a199017f4ba00d77 /source/blender/makesdna/DNA_customdata_types.h | |
parent | b06beb6f35a4e2842fa21eeb059bf1beba4a8e01 (diff) |
bmesh python api change in internal behavior.
* Only have 1 python object per bmesh, vertex, edge, loop, face.
* Store pointers back to the python data in a custom data layer so as not to use more memory for normal editing operations (when pythons not running).
* Currently this data is created and freed along with the BMesh PyObject.
* Incidentally - this fixes comparisons for bmesh elements which wasnt working before.
Diffstat (limited to 'source/blender/makesdna/DNA_customdata_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index f7f40e99617..d7358a4df1e 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -63,10 +63,9 @@ typedef struct CustomDataExternal { * layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */ typedef struct CustomData { CustomDataLayer *layers; /* CustomDataLayers, ordered by type */ - int typemap[33]; /* runtime only! - maps types to indices of first layer of that type, + int typemap[34]; /* runtime only! - maps types to indices of first layer of that type, * MUST be >= CD_NUMTYPES, but we cant use a define here. * Correct size is ensured in CustomData_update_typemap assert() */ - int pad1; int totlayer, maxlayer; /* number of layers, size of layers array */ int totsize, pad2; /* in editmode, total size of all data layers */ @@ -110,9 +109,10 @@ typedef struct CustomData { #define CD_CREASE 30 #define CD_ORIGSPACE_MLOOP 31 #define CD_WEIGHT_MLOOPCOL 32 +#define CD_BM_ELEM_PYPTR 33 /* BMESH ONLY END */ -#define CD_NUMTYPES 33 +#define CD_NUMTYPES 34 /* Bits for CustomDataMask */ #define CD_MASK_MVERT (1 << CD_MVERT) @@ -148,6 +148,7 @@ typedef struct CustomData { #define CD_MASK_CREASE (1 << CD_CREASE) #define CD_MASK_ORIGSPACE_MLOOP (1 << CD_ORIGSPACE_MLOOP) #define CD_MASK_WEIGHT_MLOOPCOL (1LL << CD_WEIGHT_MLOOPCOL) +#define CD_MASK_BM_ELEM_PYPTR (1LL << CD_BM_ELEM_PYPTR) /* BMESH ONLY END */ /* CustomData.flag */ |