[Bf-blender-cvs] [c3c723e] hair_immediate_fixes: New customdata type for mesh surface samples.

Lukas Tönne noreply at git.blender.org
Thu Nov 27 19:21:37 CET 2014


Commit: c3c723ea54dcfa18b28034d666c088b77438848c
Author: Lukas Tönne
Date:   Thu Nov 27 09:35:54 2014 +0100
Branches: hair_immediate_fixes
https://developer.blender.org/rBc3c723ea54dcfa18b28034d666c088b77438848c

New customdata type for mesh surface samples.

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

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 b1c9498..bde8f45 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1213,6 +1213,8 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
 	{sizeof(HairEditCurve), "HairEditCurve", 1, NULL, NULL, NULL, NULL, NULL, NULL},
 	/* 43: CD_HAIR_VERT */
 	{sizeof(HairEditVertex), "HairEditVertex", 1, NULL, NULL, NULL, NULL, NULL, NULL},
+	/* 44: CD_MESH_SAMPLE */
+	{sizeof(MSurfaceSample), "MSurfaceSample", 1, NULL, NULL, NULL, NULL, NULL, NULL},
 };
 
 /* note, numbers are from trunk and need updating for bmesh */
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 48b67d7..fa7dc86 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[44]; int pad;     /* runtime only! - maps types to indices of first layer of that type,
+	int typemap[45];              /* 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 */
@@ -124,7 +124,9 @@ enum {
 	CD_HAIR_CURVE       = 42,
 	CD_HAIR_VERT        = 43,
 
-	CD_NUMTYPES         = 44
+	CD_MESH_SAMPLE      = 44,
+
+	CD_NUMTYPES         = 45
 };
 
 /* Bits for CustomDataMask */
@@ -176,6 +178,8 @@ enum {
 #define CD_MASK_HAIR_CURVE      (1LL << CD_HAIR_CURVE)
 #define CD_MASK_HAIR_VERT       (1LL << CD_HAIR_VERT)
 
+#define CD_MASK_MESH_SAMPLE     (1LL << CD_MESH_SAMPLE)
+
 /* CustomData.flag */
 enum {
 	/* Indicates layer should not be copied by CustomData_from_template or CustomData_copy_data */




More information about the Bf-blender-cvs mailing list