[Bf-blender-cvs] [687cb3a] wiggly-widgets: Add space for facegroup storage

Antony Riakiotakis noreply at git.blender.org
Wed Oct 15 15:45:31 CEST 2014


Commit: 687cb3ab86d355199333fa96badace948aa9ac9e
Author: Antony Riakiotakis
Date:   Wed Oct 15 10:49:58 2014 +0200
Branches: wiggly-widgets
https://developer.blender.org/rB687cb3ab86d355199333fa96badace948aa9ac9e

Add space for facegroup storage

===================================================================

M	source/blender/blenkernel/intern/customdata.c
M	source/blender/makesdna/DNA_customdata_types.h

===================================================================

diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 63eb3b3..28caebf 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1192,6 +1192,8 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
 	{sizeof(float[4]), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
 	/* 40: CD_TESSLOOPNORMAL */
 	{sizeof(short[4][3]), "", 0, NULL, NULL, NULL, NULL, layerSwap_flnor, NULL},
+    /* 41: CD_MASK_FACEGROUP */
+	{sizeof(int), "", 1, NULL, NULL, NULL, NULL, NULL, NULL},
 };
 
 /* note, numbers are from trunk and need updating for bmesh */
@@ -1207,7 +1209,7 @@ static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
 	/* 25-29 */ "CDMPoly", "CDMLoop", "CDShapeKeyIndex", "CDShapeKey", "CDBevelWeight",
 	/* 30-34 */ "CDSubSurfCrease", "CDOrigSpaceLoop", "CDPreviewLoopCol", "CDBMElemPyPtr", "CDPaintMask",
 	/* 35-36 */ "CDGridPaintMask", "CDMVertSkin",
-	/* 37-40 */ "CDFreestyleEdge", "CDFreestyleFace", "CDMLoopTangent", "CDTessLoopNormal",
+	/* 37-41 */ "CDFreestyleEdge", "CDFreestyleFace", "CDMLoopTangent", "CDTessLoopNormal", "CDFaceGroup",
 };
 
 
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 70dc436..11f8946 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -63,7 +63,7 @@ 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]; int pad;     /* 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 */
@@ -119,8 +119,9 @@ enum {
 	CD_FREESTYLE_FACE   = 38,
 	CD_MLOOPTANGENT     = 39,
 	CD_TESSLOOPNORMAL   = 40,
+	CD_FACEGROUP        = 41, /* exclusive face group, each face can only be part of one */
 
-	CD_NUMTYPES         = 41
+	CD_NUMTYPES         = 42
 };
 
 /* Bits for CustomDataMask */
@@ -167,6 +168,7 @@ enum {
 #define CD_MASK_FREESTYLE_FACE	(1LL << CD_FREESTYLE_FACE)
 #define CD_MASK_MLOOPTANGENT    (1LL << CD_MLOOPTANGENT)
 #define CD_MASK_TESSLOOPNORMAL  (1LL << CD_TESSLOOPNORMAL)
+#define CD_MASK_FACEGROUP       (1LL << CD_FACEGROUP)
 
 /* CustomData.flag */
 enum {




More information about the Bf-blender-cvs mailing list