diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-30 17:42:49 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-30 17:42:49 +0400 |
commit | d149a79ad10c12dd68b87fdc3af695db08635cf8 (patch) | |
tree | de97f3379cfdd49a8ccbbb52a819238f4eb87b78 /source | |
parent | 02b2fc5ec8029994efcd5c04e261db64464f5b08 (diff) |
Wybren report #1709:
Deleting only-faces from fgon still draws wires hidden in editmode.
Added extra: when mesh has no faces, it draws wire in solid view, also
doesn't draw the 'fat' outline for selection.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/drawobject.c | 27 | ||||
-rw-r--r-- | source/blender/src/editmesh_lib.c | 6 |
2 files changed, 21 insertions, 12 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 7062521c12d..a99fe621260 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -3861,19 +3861,22 @@ static void drawSolidSelect(Object *ob, ListBase *lb) if(ob->type==OB_MESH) { /* optimal draw gives ugly outline, so we temporally disable it */ Mesh *me= ob->data; - DispList *dl= me->disp.first; - DispListMesh *dlm=NULL; - short flag= 0; - if(dl && dl->mesh) { - dlm= dl->mesh; - flag= dlm->flag & ME_OPT_EDGES; - dlm->flag &= ~ME_OPT_EDGES; - } - - drawmeshwire(ob); + if(me->totface) { + DispList *dl= me->disp.first; + DispListMesh *dlm=NULL; + short flag= 0; + + if(dl && dl->mesh) { + dlm= dl->mesh; + flag= dlm->flag & ME_OPT_EDGES; + dlm->flag &= ~ME_OPT_EDGES; + } + + drawmeshwire(ob); - if(dlm && flag) dlm->flag |= flag; + if(dlm && flag) dlm->flag |= flag; + } } else drawDispListwire(lb); @@ -4197,7 +4200,7 @@ void draw_object(Base *base) if(ob_from_decimator(ob)) drawDispListwire(&ob->disp); else if(dt==OB_BOUNDBOX) draw_bounding_volume(ob); - else if(dt==OB_WIRE) drawmeshwire(ob); + else if(dt==OB_WIRE || me->totface==0) drawmeshwire(ob); else if(ma && (ma->mode & MA_HALO)) drawmeshwire(ob); else if(me->tface) { if(G.f & G_FACESELECT || G.vd->drawtype==OB_TEXTURE) { diff --git a/source/blender/src/editmesh_lib.c b/source/blender/src/editmesh_lib.c index c3f7a069de7..35c506754f8 100644 --- a/source/blender/src/editmesh_lib.c +++ b/source/blender/src/editmesh_lib.c @@ -1594,6 +1594,12 @@ void EM_fgon_flags(void) BLI_addtail(&em->faces, efa); efa= efan; } + + // remove fgon flags when edge not in fgon (anymore) + for(eed= em->edges.first; eed; eed= eed->next) { + if(eed->fgoni==0) eed->h &= ~EM_FGON; + } + } |