Quad Adjacent edge subdivide type moved to Mesh Tools panel rather than pupmenu on all subdiv calls. This is a session value like beauty and will revert to path each time you load blender.

This commit is contained in:
Johnny Matthews 2005-08-23 14:13:00 +00:00
parent 056a33ac69
commit 2540ca88e8
2 changed files with 14 additions and 13 deletions

@ -155,6 +155,7 @@ static short degr= 90, step= 9, turn= 1;
static float extr_offs= 1.0;
static float editbutweight=1.0;
short editbutflag= 1;
short cornertype = 0;
float doublimit= 0.001, editbutvweight=1;
float uv_calc_radius= 1.0, uv_calc_cubesize= 1.0;
short uv_calc_mapdir= 1, uv_calc_mapalign= 1, facesel_draw_edges= 0;
@ -2528,11 +2529,15 @@ static void editing_panel_mesh_tools(Object *ob, Mesh *me)
uiDefButBitS(block, TOG, B_BEAUTY_SHORT, 0, "Short", 50,195,40,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters using Short Edges");
uiDefBut(block, BUT,B_SUBDIV,"Subdivide", 90,195,80,19, 0, 0, 0, 0, 0, "Splits selected faces into halves or quarters");
uiDefBut(block, BUT,B_FRACSUBDIV, "Fract Subd", 170,195,85,19, 0, 0, 0, 0, 0, "Subdivides selected faces with a random factor");
uiDefBut(block, BUT,B_VERTEXNOISE,"Noise", 10,175,80,19, 0, 0, 0, 0, 0, "Use vertex coordinate as texture coordinate");
uiDefBut(block, BUT,B_HASH,"Hash", 90,175,80,19, 0, 0, 0, 0, 0, "Randomizes selected vertice sequence data");
uiDefBut(block, BUT,B_XSORT,"Xsort", 170,175,85,19, 0, 0, 0, 0, 0, "Sorts selected vertice data in the X direction");
uiDefButS(block, MENU, B_DIFF, "Corner Cut Type %t|Path %x0|Innervert %x1|Fan %x2",
170, 195, 85, 19, &cornertype, 0, 0, 0, 0, "Choose Quad Corner Cut Type");
uiDefBut(block, BUT,B_VERTEXNOISE,"Noise", 10,175,60,19, 0, 0, 0, 0, 0, "Use vertex coordinate as texture coordinate");
uiDefBut(block, BUT,B_HASH,"Hash", 70,175,60,19, 0, 0, 0, 0, 0, "Randomizes selected vertice sequence data");
uiDefBut(block, BUT,B_XSORT,"Xsort", 130,175,60,19, 0, 0, 0, 0, 0, "Sorts selected vertice data in the X direction");
uiDefBut(block, BUT,B_FRACSUBDIV, "Fractal", 190,175,65,19, 0, 0, 0, 0, 0, "Subdivides selected faces with a random factor");
uiDefBut(block, BUT,B_TOSPHERE,"To Sphere", 10,155,80,19, 0, 0, 0, 0, 0, "Moves selected vertices outwards into a spherical shape");
uiDefBut(block, BUT,B_VERTEXSMOOTH,"Smooth", 90,155,80,19, 0, 0, 0, 0, 0, "Flattens angles of selected faces");

@ -2288,9 +2288,8 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
struct GHash *gh;
int i,j,edgecount,facetype,hold;
float length[4];
short cornerval=1;
extern short cornertype;
cornerval = pupmenu("Quad Corners%t|Path%x1|Innervert%x2|Fan%x3");
//Set faces f1 to 0 cause we need it later
for(ef=em->faces.first;ef;ef = ef->next){
@ -2368,9 +2367,6 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
}
}
gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
// If we are knifing, We only need the selected edges that were cut, so deselect if it was not cut
@ -2431,10 +2427,10 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
(ef->e2->f & flag && ef->e4->f & flag)){
fill_quad_double_op(ef, gh, numcuts);
}else{
switch(cornerval){
case 1: fill_quad_double_adj_path(ef, gh, numcuts); break;
case 2: fill_quad_double_adj_inner(ef, gh, numcuts); break;
case 3: fill_quad_double_adj_fan(ef, gh, numcuts); break;
switch(cornertype){
case 0: fill_quad_double_adj_path(ef, gh, numcuts); break;
case 1: fill_quad_double_adj_inner(ef, gh, numcuts); break;
case 2: fill_quad_double_adj_fan(ef, gh, numcuts); break;
}
}