Added SkinNode DNA and customdata.
[blender.git] / source / blender / blenkernel / intern / customdata.c
index 8d19322c0db5b7355df04251fc6ef11fdbef3aaf..1f18c78d0706bed9cfd2f983ade4b3341b1c7f21 100644 (file)
@@ -805,7 +805,15 @@ static void layerDefault_mcol(void *data, int count)
                mcol[i] = default_mcol;
 }
 
-
+static void layerDefault_skin(void *data, int count)
+{
+       SkinNode *n = data;
+       int i;
+       
+       for(i = 0; i < count; i++) {
+               n[i].radius = 1;
+       }
+}
 
 static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
        {sizeof(MVert), "MVert", 1, NULL, NULL, NULL, NULL, NULL, NULL},
@@ -843,7 +851,8 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
         layerSwap_mcol, layerDefault_mcol},
         {sizeof(MCol)*4, "MCol", 4, "TexturedCol", NULL, NULL, layerInterp_mcol,
         layerSwap_mcol, layerDefault_mcol},
-       {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL}
+       {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
+       {sizeof(SkinNode), "SkinNode", 1, "Skin", NULL, NULL, NULL, NULL, layerDefault_skin}
 };
 
 static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
@@ -851,7 +860,7 @@ static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
        /*   5-9 */ "CDMTFace", "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags",
        /* 10-14 */ "CDMFloatProperty", "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco",
        /* 15-19 */ "CDMTexPoly", "CDMLoopUV", "CDMloopCol", "CDTangent", "CDMDisps",
-       /* 20-23 */"CDWeightMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco"
+       /* 20-24 */ "CDWeightMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco", "CDSkinNode"
 };
 
 const CustomDataMask CD_MASK_BAREMESH =
@@ -859,10 +868,12 @@ const CustomDataMask CD_MASK_BAREMESH =
 const CustomDataMask CD_MASK_MESH =
        CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE |
        CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL |
-       CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS;
+       CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS |
+       CD_MASK_SKIN_NODE;
 const CustomDataMask CD_MASK_EDITMESH =
        CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE |
-       CD_MASK_MCOL|CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS;
+       CD_MASK_MCOL|CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS |
+       CD_MASK_SKIN_NODE;
 const CustomDataMask CD_MASK_DERIVEDMESH =
        CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE |
        CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_CLOTH_ORCO |