From 337d397d09c8b130f85e0fbd43afb467dd6c5593 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Dec 2011 09:11:11 +0000 Subject: merge in customdata changes from BMesh - biggest change is caching the layer index values in a typemap. --- source/blender/makesdna/DNA_customdata_types.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 128bd6b6653..a3b735f0fe1 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -59,6 +59,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[32]; /* 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 totlayer, maxlayer; /* number of layers, size of layers array */ int totsize, pad; /* in editmode, total size of all data layers */ void *pool; /* Bmesh: Memory pool for allocation of blocks */ -- cgit v1.2.3