Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-05-27 21:04:09 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-05-27 21:04:46 +0300
commitd7282537f0165b957efc6b0dc16208906f0202a8 (patch)
tree27fe0ef36f948ffe6a2fab2311b758eb8f62d412 /source/blender/makesdna
parent80d6421f28474eff0ac491d6a873cdaa9c34db5b (diff)
CD_PROP_COL datalayer
This implements a generic color datalayer and its functions. Based on D5975. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7838
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h8
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h4
2 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index e99d7fd5609..ef3b2015758 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -76,7 +76,8 @@ typedef struct CustomData {
* MUST be >= CD_NUMTYPES, but we cant use a define here.
* Correct size is ensured in CustomData_update_typemap assert().
*/
- int typemap[47];
+ int typemap[48];
+ char _pad[4];
/** Number of layers, size of layers array. */
int totlayer, maxlayer;
/** In editmode, total size of all data layers. */
@@ -153,7 +154,9 @@ typedef enum CustomDataType {
CD_HAIRCURVE = 45,
CD_HAIRMAPPING = 46,
- CD_NUMTYPES = 47,
+ CD_PROP_COLOR = 47,
+
+ CD_NUMTYPES = 48,
} CustomDataType;
/* Bits for CustomDataMask */
@@ -202,6 +205,7 @@ typedef enum CustomDataType {
#define CD_MASK_TESSLOOPNORMAL (1LL << CD_TESSLOOPNORMAL)
#define CD_MASK_CUSTOMLOOPNORMAL (1LL << CD_CUSTOMLOOPNORMAL)
#define CD_MASK_SCULPT_FACE_SETS (1LL << CD_SCULPT_FACE_SETS)
+#define CD_MASK_PROP_COLOR (1LL << CD_PROP_COLOR)
/** Data types that may be defined for all mesh elements types. */
#define CD_MASK_GENERIC_DATA (CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR)
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index f48024cd55a..04deecde43e 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -344,6 +344,10 @@ typedef struct MLoopCol {
unsigned char r, g, b, a;
} MLoopCol;
+typedef struct MPropCol {
+ float col[4];
+} MPropCol;
+
/** Multi-Resolution loop data. */
typedef struct MDisps {
/* Strange bug in SDNA: if disps pointer comes first, it fails to see totdisp */