From 18e4224142261cd8a1086c5872efb406b82f8330 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 13 Apr 2014 12:18:51 +0200 Subject: Split Normals I (1/5): basis for split normals (nearly nothing user-visible here): * Add a new calcLoopNormals function to DerivedMesh struct, and implement it for CDDM and CCGDM (subsurf). EditDerivedBMesh (edit mode DM) only gets a dummy one in this commit. * Add a tessellated version of CD_LOOPNORMAL layer (CD_TESSLOOPNORMAL), with relevant code to handle it (tessellation, rna access, etc.). * Change auto_smooth options of Mesh (angle now in radian internaly, and toggle is now used to enable/disable split normals in DM creation process). Note BI render code is not touched here, hence its behavior regarding this option is now incoherent, will be addressed in a separate commit. Reviewers: campbellbarton CC: brecht Differential Revision: https://developer.blender.org/D365 --- source/blender/makesdna/DNA_mesh_types.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_mesh_types.h') diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index b942197e52c..e535e6012b3 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -116,8 +116,9 @@ typedef struct Mesh { float rot[3]; int drawflag; - short texflag, pad2[3]; - short smoothresh, flag; + short texflag, flag; + float smoothresh; + int pad2; /* customdata flag, for bevel-weight and crease, which are now optional */ char cd_flag, pad; @@ -212,6 +213,9 @@ typedef struct TFace { /* draw stats */ #define ME_DRAW_STATVIS (1 << 17) +/* draw loop normals */ +#define ME_DRAW_LNORMALS (1 << 18) + /* Subsurf Type */ #define ME_CC_SUBSURF 0 #define ME_SIMPLE_SUBSURF 1 -- cgit v1.2.3