From 894c240f9d007271e9d587d3c1b6f961c445b1b8 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Wed, 13 Mar 2013 06:44:43 +0000 Subject: New implementation of Freestyle edge/face marks The previous implementation of Freestyle edge/face marks was refactored based on suggestions from the latest code review by Campbell. The new implementation relies on mesh CustomData to store edge/face marks, instead of introducing extra flags in the core Mesh and BMesh data structures. The CustomData-based implementation will allow further additions of new edge/face attributes because of the independence from Mesh/BMesh. This revision is work in progress, mainly intended to address the review comments and ask for further code review in view of the trunk merger in the upcoming 2.67 release. --- source/blender/makesdna/DNA_meshdata_types.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_meshdata_types.h') diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 2323c95d8ba..b849ca28d49 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -279,6 +279,22 @@ typedef struct MVertSkin { int flag; } MVertSkin; +typedef struct FreestyleEdge { + char flag; + char pad[3]; +} FreestyleEdge; + +/* FreestyleEdge->flag */ +#define FREESTYLE_EDGE_MARK 1 + +typedef struct FreestyleFace { + char flag; + char pad[3]; +} FreestyleFace; + +/* FreestyleFace->flag */ +#define FREESTYLE_FACE_MARK 1 + /* mvert->flag (1=SELECT) */ #define ME_SPHERETEST 2 #define ME_VERT_TMP_TAG 4 @@ -296,7 +312,7 @@ typedef struct MVertSkin { /* #define ME_SEAM_LAST (1<<8) */ /* UNUSED */ #define ME_SHARP (1<<9) /* only reason this flag remains a 'short' */ /* #ifdef WITH_FREESTYLE */ -#define ME_FREESTYLE_EDGE (1<<10) +#define ME_FREESTYLE_EDGE (1<<10) /* TO BE REMOVED when the trunk merger is done */ /* #endif */ /* puno = vertexnormal (mface) */ @@ -315,7 +331,7 @@ typedef struct MVertSkin { #define ME_SMOOTH 1 #define ME_FACE_SEL 2 /* #ifdef WITH_FREESTYLE */ -#define ME_FREESTYLE_FACE 4 +#define ME_FREESTYLE_FACE 4 /* TO BE REMOVED when the trunk merger is done */ /* #endif */ /* flag ME_HIDE==16 is used here too */ -- cgit v1.2.3