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.
This commit is contained in:
@@ -538,12 +538,32 @@ void extrude_mesh(void)
|
||||
|
||||
TEST_EDITMESH
|
||||
|
||||
if(G.scene->selectmode & SCE_SELECT_VERTEX)
|
||||
nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3|Only Vertices%x4");
|
||||
else if(G.scene->selectmode & SCE_SELECT_EDGE)
|
||||
nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3");
|
||||
else
|
||||
nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2");
|
||||
if(G.scene->selectmode & SCE_SELECT_VERTEX) {
|
||||
if(G.totvertsel==0) nr= 0;
|
||||
else if(G.totvertsel==1) nr= 4;
|
||||
else if(G.totedgesel==0) nr= 4;
|
||||
else if(G.totfacesel==0)
|
||||
nr= pupmenu("Extrude %t|Only Edges%x3|Only Vertices%x4");
|
||||
else if(G.totfacesel==1)
|
||||
nr= pupmenu("Extrude %t|Region %x1|Only Edges%x3");
|
||||
else
|
||||
nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3|Only Vertices%x4");
|
||||
}
|
||||
else if(G.scene->selectmode & SCE_SELECT_EDGE) {
|
||||
if (G.totedgesel==0) nr = 0;
|
||||
else if (G.totedgesel==1) nr = 3;
|
||||
else if(G.totfacesel==0) nr = 3;
|
||||
else if(G.totfacesel==1)
|
||||
nr= pupmenu("Extrude %t|Region %x1|Only Edges%x3");
|
||||
else
|
||||
nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3");
|
||||
}
|
||||
else {
|
||||
if (G.totfacesel == 0) nr = 0;
|
||||
else if (G.totfacesel == 1) nr = 1;
|
||||
else
|
||||
nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2");
|
||||
}
|
||||
|
||||
if(nr<1) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user