diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-04-16 06:31:02 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-04-16 06:31:02 +0400 |
commit | 556590fa3a9757f5ee21d923ce38471c343495b7 (patch) | |
tree | 7f6904650d4414ef0deb478a41b309365890bc8b /source/blender/makesdna | |
parent | b179647d52ae17eb9af243f0307398146ac2744d (diff) |
Dyntopo:
Store PBVH node ID in CustomData. This avoids a number of hash deletions
and checks/insertions on big hashes.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index d1844b34a0a..4869c9a74f1 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -63,9 +63,10 @@ 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[41]; /* runtime only! - maps types to indices of first layer of that type, + int typemap[42]; /* 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 pad; int totlayer, maxlayer; /* number of layers, size of layers array */ int totsize; /* in editmode, total size of all data layers */ struct BLI_mempool *pool; /* (BMesh Only): Memory pool for allocation of blocks */ @@ -119,7 +120,9 @@ enum { CD_FREESTYLE_FACE = 38, CD_MLOOPTANGENT = 39, CD_TESSLOOPNORMAL = 40, - CD_NUMTYPES = 41, + + CD_DYNTOPO_NODE = 41, + CD_NUMTYPES = 42 }; /* Bits for CustomDataMask */ @@ -167,6 +170,8 @@ enum { #define CD_MASK_MLOOPTANGENT (1LL << CD_MLOOPTANGENT) #define CD_MASK_TESSLOOPNORMAL (1LL << CD_TESSLOOPNORMAL) +#define CD_MASK_DYNTOPO_NODE (1LL << CD_DYNTOPO_NODE) + /* CustomData.flag */ enum { /* Indicates layer should not be copied by CustomData_from_template or CustomData_copy_data */ @@ -185,6 +190,8 @@ enum { #define MAX_MTFACE 8 #define MAX_MCOL 8 +#define DYNTOPO_NODE_NONE -1 + #ifdef __cplusplus } #endif |