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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-02-21 05:40:04 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-02-21 05:40:04 +0400
commit69289c978eace478bf992517473960d540895815 (patch)
tree493d2c9bec32f761468b082fbbb015c748b71685 /source/blender/makesdna/DNA_meshdata_types.h
parent5f093d6a5867a365900158fcca71296852787aac (diff)
parentbe674afdadaa1ab966147755e224e8bbda6807db (diff)
Merged changes in the trunk up to revision 44266 (including BMesh).
Freestyle edge/face marks were ported to BMesh. Conflicts resolved: source/blender/editors/mesh/editface.c source/blender/editors/space_view3d/drawobject.c source/blender/makesdna/DNA_meshdata_types.h source/blender/blenkernel/intern/editderivedmesh.c
Diffstat (limited to 'source/blender/makesdna/DNA_meshdata_types.h')
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h46
1 files changed, 38 insertions, 8 deletions
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index e0a793f3371..53f9ff101a3 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -38,6 +38,7 @@
struct Bone;
struct Image;
+/*tesselation face, see MLoop/MPoly for the real face data*/
typedef struct MFace {
unsigned int v1, v2, v3, v4;
short mat_nr;
@@ -67,14 +68,13 @@ typedef struct MVert {
char flag, bweight;
} MVert;
-/* at the moment alpha is abused for vertex painting
- * and not used for transperency, note that red and blue are swapped */
+/* tesselation vertex color data.
+ * at the moment alpha is abused for vertex painting
+ * and not used for transparency, note that red and blue are swapped */
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 {
@@ -92,19 +92,35 @@ typedef struct MLoop {
unsigned int e; /*edge index*/
} MLoop;
-#endif /* USE_BMESH_FORWARD_COMPAT */
-
-/*bmesh custom data stuff*/
typedef struct MTexPoly {
struct Image *tpage;
char flag, transp;
short mode,tile,unwrap;
} MTexPoly;
+/* can copy from/to MTexPoly/MTFace */
+#define ME_MTEXFACE_CPY(dst, src) \
+{ \
+ (dst)->tpage = (src)->tpage; \
+ (dst)->flag = (src)->flag; \
+ (dst)->transp = (src)->transp; \
+ (dst)->mode = (src)->mode; \
+ (dst)->tile = (src)->tile; \
+ (dst)->unwrap = (src)->unwrap; \
+}
+
typedef struct MLoopUV {
float uv[2];
+ int flag;
} MLoopUV;
+/*mloopuv->flag*/
+#define MLOOPUV_EDGESEL 1
+#define MLOOPUV_VERTSEL 2
+#define MLOOPUV_PINNED 4
+
+/* at the moment alpha is abused for vertex painting
+ * and not used for transparency, note that red and blue are swapped */
typedef struct MLoopCol {
char a, r, g, b;
} MLoopCol;
@@ -118,6 +134,7 @@ typedef struct MSelect {
int type; /* EDITVERT/EDITEDGE/EDITFACE */
} MSelect;
+/*tesselation uv face data*/
typedef struct MTFace {
float uv[4][2];
struct Image *tpage;
@@ -140,6 +157,10 @@ typedef struct OrigSpaceFace {
float uv[4][2];
} OrigSpaceFace;
+typedef struct OrigSpaceLoop {
+ float uv[2];
+} OrigSpaceLoop;
+
typedef struct MDisps {
/* Strange bug in SDNA: if disps pointer comes first, it fails to see totdisp */
int totdisp;
@@ -233,7 +254,16 @@ typedef struct MRecast {
#define ME_SMOOTH 1
#define ME_FACE_SEL 2
#define ME_FREESTYLE_FACE 4
- /* flag ME_HIDE==16 is used here too */
+/* flag ME_HIDE==16 is used here too */
+
+#define ME_POLY_LOOP_PREV(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + (mp)->totloop - 1) % (mp)->totloop)])
+#define ME_POLY_LOOP_NEXT(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + 1) % (mp)->totloop)])
+
+/* mselect->type */
+#define ME_VSEL 0
+#define ME_ESEL 1
+#define ME_FSEL 2
+
/* mtface->flag */
#define TF_SELECT 1 /* use MFace hide flag (after 2.43), should be able to reuse after 2.44 */
#define TF_ACTIVE 2 /* deprecated! */