Revision: 60084
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60084
Author:   jesterking
Date:     2013-09-12 20:43:29 +0000 (Thu, 12 Sep 2013)
Log Message:
-----------
Change the enum for CustomDataMask bits back to #defines.

enum is an int, and values from CD_PREVIEW_MLOOPCOL (32) onwards
will not give what apparently was expected.

Found with help from Oscurart in #blendercoders while trying to figure
out compile error with CMake/msvc9. Occasionally it is good to heed
the warnings given by compilers!

Modified Paths:
--------------
    trunk/blender/source/blender/makesdna/DNA_customdata_types.h

Modified: trunk/blender/source/blender/makesdna/DNA_customdata_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_customdata_types.h        
2013-09-12 20:33:02 UTC (rev 60083)
+++ trunk/blender/source/blender/makesdna/DNA_customdata_types.h        
2013-09-12 20:43:29 UTC (rev 60084)
@@ -121,49 +121,47 @@
 };
 
 /* Bits for CustomDataMask */
-enum {
-       CD_MASK_MVERT            = (1LL << CD_MVERT),
-       CD_MASK_MSTICKY          = (1LL << CD_MSTICKY),  /* DEPRECATED */
-       CD_MASK_MDEFORMVERT      = (1LL << CD_MDEFORMVERT),
-       CD_MASK_MEDGE            = (1LL << CD_MEDGE),
-       CD_MASK_MFACE            = (1LL << CD_MFACE),
-       CD_MASK_MTFACE           = (1LL << CD_MTFACE),
-       CD_MASK_MCOL             = (1LL << CD_MCOL),
-       CD_MASK_ORIGINDEX        = (1LL << CD_ORIGINDEX),
-       CD_MASK_NORMAL           = (1LL << CD_NORMAL),
-/*     CD_MASK_POLYINDEX        = (1LL << CD_POLYINDEX), */
-       CD_MASK_PROP_FLT         = (1LL << CD_PROP_FLT),
-       CD_MASK_PROP_INT         = (1LL << CD_PROP_INT),
-       CD_MASK_PROP_STR         = (1LL << CD_PROP_STR),
-       CD_MASK_ORIGSPACE        = (1LL << CD_ORIGSPACE),
-       CD_MASK_ORCO             = (1LL << CD_ORCO),
-       CD_MASK_MTEXPOLY         = (1LL << CD_MTEXPOLY),
-       CD_MASK_MLOOPUV          = (1LL << CD_MLOOPUV),
-       CD_MASK_MLOOPCOL         = (1LL << CD_MLOOPCOL),
-       CD_MASK_TANGENT          = (1LL << CD_TANGENT),
-       CD_MASK_MDISPS           = (1LL << CD_MDISPS),
-       CD_MASK_PREVIEW_MCOL     = (1LL << CD_PREVIEW_MCOL),
-       CD_MASK_CLOTH_ORCO       = (1LL << CD_CLOTH_ORCO),
-       CD_MASK_RECAST           = (1LL << CD_RECAST),
+#define CD_MASK_MVERT          (1 << CD_MVERT)
+#define CD_MASK_MSTICKY                (1 << CD_MSTICKY)  /* DEPRECATED */
+#define CD_MASK_MDEFORMVERT    (1 << CD_MDEFORMVERT)
+#define CD_MASK_MEDGE          (1 << CD_MEDGE)
+#define CD_MASK_MFACE          (1 << CD_MFACE)
+#define CD_MASK_MTFACE         (1 << CD_MTFACE)
+#define CD_MASK_MCOL           (1 << CD_MCOL)
+#define CD_MASK_ORIGINDEX      (1 << CD_ORIGINDEX)
+#define CD_MASK_NORMAL         (1 << CD_NORMAL)
+// #define CD_MASK_POLYINDEX   (1 << CD_POLYINDEX)
+#define CD_MASK_PROP_FLT       (1 << CD_PROP_FLT)
+#define CD_MASK_PROP_INT       (1 << CD_PROP_INT)
+#define CD_MASK_PROP_STR       (1 << CD_PROP_STR)
+#define CD_MASK_ORIGSPACE      (1 << CD_ORIGSPACE)
+#define CD_MASK_ORCO           (1 << CD_ORCO)
+#define CD_MASK_MTEXPOLY       (1 << CD_MTEXPOLY)
+#define CD_MASK_MLOOPUV                (1 << CD_MLOOPUV)
+#define CD_MASK_MLOOPCOL       (1 << CD_MLOOPCOL)
+#define CD_MASK_TANGENT                (1 << CD_TANGENT)
+#define CD_MASK_MDISPS         (1 << CD_MDISPS)
+#define CD_MASK_PREVIEW_MCOL   (1 << CD_PREVIEW_MCOL)
+#define CD_MASK_CLOTH_ORCO     (1 << CD_CLOTH_ORCO)
+#define CD_MASK_RECAST         (1 << CD_RECAST)
 
 /* BMESH ONLY START */
-       CD_MASK_MPOLY            = (1LL << CD_MPOLY),
-       CD_MASK_MLOOP            = (1LL << CD_MLOOP),
-       CD_MASK_SHAPE_KEYINDEX   = (1LL << CD_SHAPE_KEYINDEX),
-       CD_MASK_SHAPEKEY         = (1LL << CD_SHAPEKEY),
-       CD_MASK_BWEIGHT          = (1LL << CD_BWEIGHT),
-       CD_MASK_CREASE           = (1LL << CD_CREASE),
-       CD_MASK_ORIGSPACE_MLOOP  = (1LL << CD_ORIGSPACE_MLOOP),
-       CD_MASK_PREVIEW_MLOOPCOL = (1LL << CD_PREVIEW_MLOOPCOL),
-       CD_MASK_BM_ELEM_PYPTR    = (1LL << CD_BM_ELEM_PYPTR),
+#define CD_MASK_MPOLY          (1 << CD_MPOLY)
+#define CD_MASK_MLOOP          (1 << CD_MLOOP)
+#define CD_MASK_SHAPE_KEYINDEX (1 << CD_SHAPE_KEYINDEX)
+#define CD_MASK_SHAPEKEY       (1 << CD_SHAPEKEY)
+#define CD_MASK_BWEIGHT                (1 << CD_BWEIGHT)
+#define CD_MASK_CREASE         (1 << CD_CREASE)
+#define CD_MASK_ORIGSPACE_MLOOP        (1LL << CD_ORIGSPACE_MLOOP)
+#define CD_MASK_PREVIEW_MLOOPCOL (1LL << CD_PREVIEW_MLOOPCOL)
+#define CD_MASK_BM_ELEM_PYPTR (1LL << CD_BM_ELEM_PYPTR)
 /* BMESH ONLY END */
 
-       CD_MASK_PAINT_MASK       = (1LL << CD_PAINT_MASK),
-       CD_MASK_GRID_PAINT_MASK  = (1LL << CD_GRID_PAINT_MASK),
-       CD_MASK_MVERT_SKIN       = (1LL << CD_MVERT_SKIN),
-       CD_MASK_FREESTYLE_EDGE   = (1LL << CD_FREESTYLE_EDGE),
-       CD_MASK_FREESTYLE_FACE   = (1LL << CD_FREESTYLE_FACE),
-};
+#define CD_MASK_PAINT_MASK             (1LL << CD_PAINT_MASK)
+#define CD_MASK_GRID_PAINT_MASK        (1LL << CD_GRID_PAINT_MASK)
+#define CD_MASK_MVERT_SKIN             (1LL << CD_MVERT_SKIN)
+#define CD_MASK_FREESTYLE_EDGE (1LL << CD_FREESTYLE_EDGE)
+#define CD_MASK_FREESTYLE_FACE (1LL << CD_FREESTYLE_FACE)
 
 /* CustomData.flag */
 enum {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to