From f77bc7eb7d56239f9dfab3663b79c474f8763bbd Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 8 Jul 2004 20:38:27 +0000 Subject: Quite a large one this time... but now we have: Edges in Mesh - adds automatic when you use creases. For other situations; call the void make_edges(Mesh *me) in mesh.c. Of course, once in editmode the edges are automatically recreated. - in F9 buttons you can add/remove edges too - both for Mesh and DisplistMesh, so it speeds up drawing quite some in wireframe - render for edges can't work... edges have no material nor tface nor col.. so here still the faces are rendered in wire Creases in Subsurf - based on the code by Chris McFarlen - main changes is that now edges are used, saving quite some data in file - use SHIFT+E in editmode to set edges-sharpness. values go from 0-1 - in F9 buttons you can set draw-crease mode. It draws now blended from wire color to edge-select color (as provided in Theme) Known issue: setting sharpness on 1 cube (subdiv 2) gives weird results with some values... Chris, can you check? Further; code cleanups, changing 0 in NULL when needed, no warnings, etc etc --- source/blender/makesdna/DNA_mesh_types.h | 33 ++++++-------------------------- 1 file changed, 6 insertions(+), 27 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 b80bdf62b2c..674c144923d 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -39,6 +39,7 @@ struct Ipo; struct Key; struct Material; struct MVert; +struct MEdge; struct MCol; struct MSticky; struct Mesh; @@ -69,6 +70,7 @@ typedef struct Mesh { void *mface, *dface, *tface; struct MVert *mvert; + struct MEdge *medge; struct MDeformVert *dvert; /* __NLA */ struct MCol *mcol; struct MSticky *msticky; @@ -78,20 +80,21 @@ typedef struct Mesh { struct OcInfo *oc; /* not written in file */ void *sumohandle; - int totvert, totface; - + int totvert, totedge, totface; int texflag; + float loc[3]; float size[3]; float rot[3]; short smoothresh, flag; + short subdiv, subdivr, subdivdone; short totcol; short subsurftype; short reserved1; /* Padding */ - float cubemapsize, rtf; + float cubemapsize; } Mesh; @@ -117,25 +120,6 @@ typedef struct Mesh { #define ME_CC_SUBSURF 0 #define ME_SIMPLE_SUBSURF 1 -/* puno = vertexnormal (mface) */ -#define ME_FLIPV1 1 -#define ME_FLIPV2 2 -#define ME_FLIPV3 4 -#define ME_FLIPV4 8 -#define ME_PROJXY 16 -#define ME_PROJXZ 32 -#define ME_PROJYZ 64 - -/* edcode (mface) */ -#define ME_V1V2 1 -#define ME_V2V3 2 -#define ME_V3V1 4 -#define ME_V3V4 4 -#define ME_V4V1 8 - -/* flag (mface) */ -#define ME_SMOOTH 1 - #define TF_DYNAMIC 1 /* #define TF_INVISIBLE 2 */ @@ -169,11 +153,6 @@ typedef struct Mesh { #define TF_ALPHA 2 #define TF_SUB 3 -/* mvert->flag (1=select) */ -#define ME_SPHERETEST 2 -#define ME_SPHERETEMP 4 -#define ME_HIDE 16 - #define MESH_MAX_VERTS 2000000000L #endif -- cgit v1.2.3