Revision: 28987
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28987
Author:   nicholasbishop
Date:     2010-05-25 21:50:15 +0200 (Tue, 25 May 2010)

Log Message:
-----------
* Added a few new customdata types:
* FACEGRID will be the new way all CustomData for multires gets stored. Its 
backing type is CustomData. It's intended to be used in the CustomData for mesh 
faces. This is similar to CD_MDISPS, except that instead of storing just 
triples of floats, we can store a grid for any type (so long as there's a 
CustomData layer for it.)
* CD_DISP will be the replacement for CD_MDISPS. It's a triple of floats.
* PAINTMASK is simply a layer of floats; will be used to describe the intensity 
of the mask at each vertex (or at each grid point for multires.)

Modified Paths:
--------------
    
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/customdata.c
    
branches/soc-2010-nicolasbishop/source/blender/makesdna/DNA_customdata_types.h

Modified: 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/customdata.c
===================================================================
--- 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/customdata.c   
    2010-05-25 19:13:37 UTC (rev 28986)
+++ 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/customdata.c   
    2010-05-25 19:50:15 UTC (rev 28987)
@@ -794,24 +794,27 @@
         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(CustomData), "CustomData", 1, "CustomData Grid", NULL, NULL, 
NULL, NULL, NULL},
+       {sizeof(float) * 3, "", 0, "Displacement", NULL, NULL, NULL, NULL, 
NULL},
+       {sizeof(float), "", 0, "Paint Mask", NULL, NULL, NULL, NULL, NULL},
 };
 
 const char *LAYERTYPENAMES[CD_NUMTYPES] = {
        "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", "CDMFace", 
"CDMTFace",
        "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags","CDMFloatProperty",
        "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco", 
"CDMTexPoly", "CDMLoopUV",
-       "CDMloopCol", "CDTangent", "CDMDisps", "CDWeightMCol", "CDClothOrco"};
+       "CDMloopCol", "CDTangent", "CDMDisps", "CDWeightMCol", "CDClothOrco", 
"CDFaceGrid", "CDDisp", "CDPaintMask"};
 
 const CustomDataMask CD_MASK_BAREMESH =
        CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE;
 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_FACEGRID;
 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_FACEGRID;
 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 |

Modified: 
branches/soc-2010-nicolasbishop/source/blender/makesdna/DNA_customdata_types.h
===================================================================
--- 
branches/soc-2010-nicolasbishop/source/blender/makesdna/DNA_customdata_types.h  
    2010-05-25 19:13:37 UTC (rev 28986)
+++ 
branches/soc-2010-nicolasbishop/source/blender/makesdna/DNA_customdata_types.h  
    2010-05-25 19:50:15 UTC (rev 28987)
@@ -84,7 +84,10 @@
 #define CD_ID_MCOL             21
 #define CD_TEXTURE_MCOL        22
 #define CD_CLOTH_ORCO  23
-#define CD_NUMTYPES            24
+#define CD_FACEGRID            24
+#define CD_DISP                        25
+#define CD_PAINTMASK           26
+#define CD_NUMTYPES            27
 
 /* Bits for CustomDataMask */
 #define CD_MASK_MVERT          (1 << CD_MVERT)
@@ -109,6 +112,9 @@
 #define CD_MASK_MDISPS         (1 << CD_MDISPS)
 #define CD_MASK_WEIGHT_MCOL    (1 << CD_WEIGHT_MCOL)
 #define CD_MASK_CLOTH_ORCO     (1 << CD_CLOTH_ORCO)
+#define CD_MASK_FACEGRID       (1 << CD_FACEGRID)
+#define CD_MASK_PAINTMASK      (1 << CD_PAINTMASK)
+#define CD_MASK_DISP           (1 << CD_DISP)
 
 /* CustomData.flag */
 


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to