diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-22 13:06:30 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-22 13:06:30 +0400 |
commit | 389b06c91e10b34c48fe048f59cea6ee236287bb (patch) | |
tree | d8e52b5c4b382a5b9db1ef98ec6305ff87bb35c3 /source/blender/blenkernel/intern/subsurf.c | |
parent | 26698cfa3fc56e901a3d2e4c6c102d50796ed41c (diff) |
More fixes in object drawing:
- transparent faces in editmode don't write in zbuffer anymore (prevents
drawing errors) but still read (so behind the subsurf faces for example)
- improved drawing 'handles' for subsurf editing
- going in editmode to Solid view, will draw extra wire always, including
transparent faces when set
- works in all combos... http://www.blender.org/docs/ton/subsurf.html
- fixed error; padplus/padminus didnt work in buttonswindow anymore
- improved buttonswin: when dragging window edge, the buttons dont
rescale, but stay same size
Diffstat (limited to 'source/blender/blenkernel/intern/subsurf.c')
-rw-r--r-- | source/blender/blenkernel/intern/subsurf.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/subsurf.c b/source/blender/blenkernel/intern/subsurf.c index 7ca60982d5d..bc1ea3fc478 100644 --- a/source/blender/blenkernel/intern/subsurf.c +++ b/source/blender/blenkernel/intern/subsurf.c @@ -697,7 +697,8 @@ static int hypermesh_get_nhidden(HyperMesh *hme) { return count; } -static DispList *hypermesh_to_displist(HyperMesh *hme) { +/* flag is me->flag, for handles and 'optim' */ +static DispList *hypermesh_to_displist(HyperMesh *hme, short flag) { int nverts= hypermesh_get_nverts(hme); int nfaces= hypermesh_get_nfaces(hme) + hypermesh_get_nlines(hme) - hypermesh_get_nhidden(hme); DispList *dl= MEM_callocN(sizeof(*dl), "dl"); @@ -720,7 +721,7 @@ static DispList *hypermesh_to_displist(HyperMesh *hme) { } /* added: handles for editmode */ - if (hme->orig_me==NULL) { + if (hme->orig_me==NULL && (flag & ME_OPT_EDGES)) { handles= hypermesh_get_nverts_handles(hme); } @@ -885,7 +886,8 @@ static DispList *hypermesh_to_displist(HyperMesh *hme) { return dl; } -static DispList *subsurf_subdivide_to_displist(HyperMesh *hme, short subdiv) { +/* flag is me->flag, for handles and 'optim' */ +static DispList *subsurf_subdivide_to_displist(HyperMesh *hme, short subdiv, short flag) { DispList *dl; int i; @@ -901,7 +903,7 @@ static DispList *subsurf_subdivide_to_displist(HyperMesh *hme, short subdiv) { hme= tmp; } - dl= hypermesh_to_displist(hme); + dl= hypermesh_to_displist(hme, flag); hypermesh_free(hme); return dl; @@ -915,7 +917,7 @@ void subsurf_make_editmesh(Object *ob) { HyperMesh *hme= hypermesh_from_editmesh(G.edve.first, G.eded.first, G.edvl.first); free_displist_by_type(&me->disp, DL_MESH); - BLI_addtail(&me->disp, subsurf_subdivide_to_displist(hme, me->subdiv)); + BLI_addtail(&me->disp, subsurf_subdivide_to_displist(hme, me->subdiv, me->flag)); dl= me->disp.first; if(dl && dl->mesh) dl->mesh->flag= me->flag; @@ -930,7 +932,7 @@ void subsurf_make_mesh(Object *ob, short subdiv) { HyperMesh *hme= hypermesh_from_mesh(me, find_displist(&ob->disp, DL_VERTS)); free_displist_by_type(&me->disp, DL_MESH); - BLI_addtail(&me->disp, subsurf_subdivide_to_displist(hme, subdiv)); + BLI_addtail(&me->disp, subsurf_subdivide_to_displist(hme, subdiv, me->flag)); } } @@ -939,7 +941,7 @@ void subsurf_to_mesh(Object *oldob, Mesh *me) { if (oldme->totface) { HyperMesh *hme= hypermesh_from_mesh(oldme, NULL); - DispList *dl= subsurf_subdivide_to_displist(hme, oldme->subdiv); + DispList *dl= subsurf_subdivide_to_displist(hme, oldme->subdiv, oldme->flag); DispListMesh *dlm= dl->mesh; MFace *mfaces; int i; @@ -980,7 +982,7 @@ DispList* subsurf_mesh_to_displist(Mesh *me, DispList *dl, short subdiv) hme= hypermesh_from_mesh(me, dl); - return subsurf_subdivide_to_displist(hme, subdiv); + return subsurf_subdivide_to_displist(hme, subdiv, me->flag); } void subsurf_calculate_limit_positions(Mesh *me, float (*positions_r)[3]) |