diff options
author | Ton Roosendaal <ton@blender.org> | 2005-05-07 19:50:09 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-05-07 19:50:09 +0400 |
commit | 9a41ac4f70fb85490d0c4e259ba1873a4fd1c5dd (patch) | |
tree | f6b616c501569e365507bbd52d4e930db14520b5 /source/blender/src/edit.c | |
parent | 71c2d1e9d6bf38e41e77981dd4eef88d44cca4fa (diff) |
Patch from Tom Musgrove to bypass extrude popup on singular selections...
Implementation had some issues though, since:
a) Blender has no stats available that tells amount of selected edges
b) Bypassing the popup should be 100% accurate
b) Once you do that, the popup should actually only show possible
choices as well.
So! I've added a G.totedge and G.totedgesel, also being printed in the
info header. Using this variable the extrude popups could be limited too.
Also: made 'normal alignment' for edge-only selections work when the
normal wasn't pointing OK. Now it aligns the Z axis with the edge itself
Exact algorithm for choosing a 'normal' and 'plane' still is weak.
Diffstat (limited to 'source/blender/src/edit.c')
-rw-r--r-- | source/blender/src/edit.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index 003b4b10365..def75b4c6c1 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -561,30 +561,31 @@ void countall() BezTriple *bezt; BPoint *bp; MetaElem *ml; - struct EditVert *eve; - struct EditFace *efa; struct EditBone *ebo; int a; - G.totvert= G.totvertsel= G.totfacesel= G.totface= G.totobj= + G.totvert= G.totvertsel= G.totedge= G.totedgesel= G.totfacesel= G.totface= G.totobj= G.totmesh= G.totlamp= G.totcurve= G.totobjsel= 0; if(G.obedit) { if(G.obedit->type==OB_MESH) { EditMesh *em = G.editMesh; - eve= em->verts.first; - while(eve) { + EditVert *eve; + EditEdge *eed; + EditFace *efa; + + for(eve= em->verts.first; eve; eve= eve->next) { G.totvert++; if(eve->f & SELECT) G.totvertsel++; - eve= eve->next; } - - efa= em->faces.first; - while(efa) { + for(eed= em->edges.first; eed; eed= eed->next) { + G.totedge++; + if(eed->f & SELECT) G.totedgesel++; + } + for(efa= em->faces.first; efa; efa= efa->next) { G.totface++; if(efa->f & SELECT) G.totfacesel++; - efa= efa->next; } } else if (G.obedit->type==OB_ARMATURE){ |