Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-28 17:15:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-28 17:15:17 +0400
commit312b0803979768725041d197ca61dc8a7762c1cf (patch)
treeed1c6b15e1c1b8016331284dc386295c89bce9cc /source/blender/makesdna
parent164237b8d5b20270491cd8ac8eeb7edbfe2a5862 (diff)
initial merge of bmesh customdata layer code into trunk, ifdef'd out for now with USE_BMESH_FORWARD_COMPAT.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h36
-rw-r--r--source/blender/makesdna/DNA_defs.h2
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h2
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h21
4 files changed, 61 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index a3b735f0fe1..0b0ffb42ba8 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -29,6 +29,7 @@
* \ingroup DNA
*/
+
#ifndef DNA_CUSTOMDATA_TYPES_H
#define DNA_CUSTOMDATA_TYPES_H
@@ -36,6 +37,8 @@
extern "C" {
#endif
+#include "DNA_defs.h" /* USE_BMESH_FORWARD_COMPAT */
+
/** descriptor and storage for a custom data layer */
typedef struct CustomDataLayer {
int type; /* type of data in layer */
@@ -94,8 +97,27 @@ typedef struct CustomData {
#define CD_TEXTURE_MCOL 22
#define CD_CLOTH_ORCO 23
#define CD_RECAST 24
+
+#ifdef USE_BMESH_FORWARD_COMPAT
+
+/* BMESH ONLY START */
+#define CD_MPOLY 25
+#define CD_MLOOP 26
+#define CD_SHAPE_KEYINDEX 27
+#define CD_SHAPEKEY 28
+#define CD_BWEIGHT 29
+#define CD_CREASE 30
+#define CD_WEIGHT_MLOOPCOL 31
+/* BMESH ONLY END */
+
+#define CD_NUMTYPES 32
+
+#else
+
#define CD_NUMTYPES 25
+#endif
+
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
#define CD_MASK_MSTICKY (1 << CD_MSTICKY)
@@ -121,6 +143,20 @@ typedef struct CustomData {
#define CD_MASK_CLOTH_ORCO (1 << CD_CLOTH_ORCO)
#define CD_MASK_RECAST (1 << CD_RECAST)
+#ifdef USE_BMESH_FORWARD_COMPAT
+
+/* BMESH ONLY START */
+#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_WEIGHT_MLOOPCOL (1 << CD_WEIGHT_MLOOPCOL)
+/* BMESH ONLY END */
+
+#endif
+
/* CustomData.flag */
/* indicates layer should not be copied by CustomData_from_template or
diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h
index 25d95419605..95247daa6af 100644
--- a/source/blender/makesdna/DNA_defs.h
+++ b/source/blender/makesdna/DNA_defs.h
@@ -45,4 +45,6 @@
/* hrmf, we need a better include then this */
#include "../blenloader/BLO_sys_types.h" /* needed for int64_t only! */
+// #define USE_BMESH_FORWARD_COMPAT
+
#endif /* DNA_DEFS_H */
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 4bca7e7a77f..8e8c3b8743a 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -36,6 +36,8 @@
#include "DNA_ID.h"
#include "DNA_customdata_types.h"
+#include "DNA_defs.h" /* USE_BMESH_FORWARD_COMPAT */
+
struct DerivedMesh;
struct Ipo;
struct Key;
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 52a9a6017f7..ab4b560943f 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -72,6 +72,27 @@ typedef struct MCol {
char a, r, g, b;
} MCol;
+#ifdef USE_BMESH_FORWARD_COMPAT
+
+/*new face structure, replaces MFace, which is now
+ only used for storing tesselations.*/
+typedef struct MPoly {
+ /* offset into loop array and number of loops in the face */
+ int loopstart;
+ int totloop; /* keep signed since we need to subtract when getting the previous loop */
+ short mat_nr;
+ char flag, pad;
+} MPoly;
+
+/*the e here is because we want to move away from
+ relying on edge hashes.*/
+typedef struct MLoop {
+ unsigned int v; /*vertex index*/
+ unsigned int e; /*edge index*/
+} MLoop;
+
+#endif /* USE_BMESH_FORWARD_COMPAT */
+
/*bmesh custom data stuff*/
typedef struct MTexPoly {
struct Image *tpage;