hotkey for changing a mesh to a subsurface and back again: shift+o

hotkey for changing display resolution for subdiv: ctrl+1 or 2 or 3 or 4
written by Green
This commit is contained in:
2003-05-07 19:27:29 +00:00
parent cb2d8c7225
commit f28516e7b0
4 changed files with 92 additions and 8 deletions

View File

@@ -610,12 +610,53 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case ONEKEY:
do_layer_buttons(0); break;
ob= OBACT;
if(G.qual & LR_CTRLKEY) {
if(G.obedit) {
flip_subdivison(G.obedit, 1);
}
else if(ob->type == OB_MESH) {
flip_subdivison(ob, 1);
}
}
else
do_layer_buttons(0); break;
case TWOKEY:
do_layer_buttons(1); break;
ob= OBACT;
if(G.qual & LR_CTRLKEY) {
if(G.obedit) {
flip_subdivison(G.obedit, 2);
}
else if(ob->type == OB_MESH) {
flip_subdivison(ob, 2);
}
}
else
do_layer_buttons(1);
break;
case THREEKEY:
ob= OBACT;
if(G.qual & LR_CTRLKEY) {
if(G.obedit) {
flip_subdivison(G.obedit, 3);
}
else if(ob->type == OB_MESH) {
flip_subdivison(ob, 3);
}
}
else
do_layer_buttons(2); break;
case FOURKEY:
ob= OBACT;
if(G.qual & LR_CTRLKEY) {
if(G.obedit) {
flip_subdivison(G.obedit, 4);
}
else if(ob->type == OB_MESH) {
flip_subdivison(ob, 4);
}
}
else
do_layer_buttons(3); break;
case FIVEKEY:
do_layer_buttons(4); break;
@@ -860,7 +901,16 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
}
break;
case OKEY:
if(G.qual & LR_ALTKEY) clear_object('o');
ob= OBACT;
if(G.qual & LR_SHIFTKEY) {
if(G.obedit) {
flip_subdivison(G.obedit, 0);
}
else if(ob->type == OB_MESH) {
flip_subdivison(ob, 0);
}
}
else if(G.qual & LR_ALTKEY) clear_object('o');
else if(G.obedit) {
extern int prop_mode;