diff options
author | Ton Roosendaal <ton@blender.org> | 2004-09-27 14:12:45 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-09-27 14:12:45 +0400 |
commit | 061442cbd1e69ad494eb22a69a2ae89e72e9d978 (patch) | |
tree | db043e68669d8a0adc68bef0834ecb03b5178264 /source/blender/blenkernel/intern/subsurf.c | |
parent | 995826f3edccb064955bf88b36566fd4550af3b9 (diff) |
- improvement for edge/face select
- edges now sample on three locationsm gives more hits
- own version of glPolygonOffset remains cumbersome... but for select
now the selection routine gets more offset than draw.
- first attempt to clean drawobject.c and displists
- generic call for draw object in backbuf for select purposes, cleans up
a lot in the other calls.
- also to verify if we can (in future) use this for vertex/edge/face
select, but the whole drawobject code works against me... this is
for another refactory (incl. displist) and out of the focus for now
- subsurf.c: now creates new faces in order of original. Not used yet, but is
handy to recover the original order for selection/paint purposes.
Diffstat (limited to 'source/blender/blenkernel/intern/subsurf.c')
-rw-r--r-- | source/blender/blenkernel/intern/subsurf.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/subsurf.c b/source/blender/blenkernel/intern/subsurf.c index 280af7c4a53..00070fef72c 100644 --- a/source/blender/blenkernel/intern/subsurf.c +++ b/source/blender/blenkernel/intern/subsurf.c @@ -215,6 +215,7 @@ struct _HyperMesh { HyperVert *verts; HyperEdge *edges; HyperFace *faces; + HyperFace *lastface; // we add faces in same order they get delivered now (ton) Mesh *orig_me; short hasuvco, hasvcol; @@ -322,9 +323,12 @@ static HyperFace *hypermesh_add_face(HyperMesh *hme, HyperVert **verts, int nver last= v; } - f->next= hme->faces; - hme->faces= f; - + // less elegant, but for many reasons i prefer the order of faces to remain same (vpaint etc) (ton) + f->next= NULL; + if(hme->lastface) hme->lastface->next= f; + else hme->faces= f; + hme->lastface= f; + return f; } @@ -333,7 +337,7 @@ static HyperMesh *hypermesh_new(void) { hme->verts= NULL; hme->edges= NULL; - hme->faces= NULL; + hme->faces= hme->lastface= NULL; hme->orig_me= NULL; hme->hasuvco= hme->hasvcol= 0; hme->arena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE); |