fixed some more screenupdate issues and eliminated a crash
when trying tio shear/warp not visible objects. (thanks Matt)
This commit is contained in:
@@ -1522,11 +1522,8 @@ void add_primitiveArmature(int type)
|
||||
};
|
||||
|
||||
countall();
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWBUTSALL, 0);
|
||||
allqueue(REDRAWBUTSHEAD, 0);
|
||||
allqueue(REDRAWBUTSCONSTRAINT, 0);
|
||||
allqueue(REDRAWNLA, 0);
|
||||
|
||||
allqueue(REDRAWALL, 0);
|
||||
}
|
||||
|
||||
static void add_bone_input (Object *ob)
|
||||
|
@@ -3796,10 +3796,8 @@ void add_primitiveCurve(int stype)
|
||||
BLI_addtail(&editNurb, nu);
|
||||
makeDispList(G.obedit);
|
||||
|
||||
allqueue(REDRAWBUTSALL, 0);
|
||||
|
||||
countall();
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWALL, 0);
|
||||
}
|
||||
|
||||
void add_primitiveNurb(int type)
|
||||
@@ -3829,10 +3827,8 @@ void add_primitiveNurb(int type)
|
||||
BLI_addtail(&editNurb,nu);
|
||||
makeDispList(G.obedit);
|
||||
|
||||
allqueue(REDRAWBUTSALL, 0);
|
||||
|
||||
countall();
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWALL, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -626,8 +626,8 @@ void add_primitiveFont(int dummy_argument)
|
||||
cu->pos= 4;
|
||||
|
||||
make_editText();
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWBUTSALL, 0);
|
||||
|
||||
allqueue(REDRAWALL, 0);
|
||||
}
|
||||
|
||||
void to_upper(void)
|
||||
|
@@ -181,8 +181,7 @@ void add_primitiveMball(int dummy_argument)
|
||||
|
||||
lastelem= ml;
|
||||
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWBUTSALL, 0);
|
||||
allqueue(REDRAWALL, 0);
|
||||
makeDispList(G.obedit);
|
||||
}
|
||||
|
||||
|
@@ -4535,11 +4535,9 @@ void add_primitiveMesh(int type)
|
||||
|
||||
if(type!=0 && type!=10) righthandfaces(1);
|
||||
countall();
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWIPO, 0);
|
||||
allqueue(REDRAWHEADERS, 0);
|
||||
|
||||
allqueue(REDRAWINFO, 1); /* 1, because header->win==0! */
|
||||
allqueue(REDRAWBUTSALL, 0);
|
||||
allqueue(REDRAWALL, 0);
|
||||
makeDispList(G.obedit);
|
||||
|
||||
if (type==13) notice("Oooh Oooh Oooh");
|
||||
|
@@ -208,11 +208,9 @@ void add_object_draw(int type) /* for toolbox */
|
||||
}
|
||||
|
||||
redraw_test_buttons(BASACT);
|
||||
allqueue(REDRAWIPO, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
allqueue(REDRAWACTION,0);
|
||||
allqueue(REDRAWHEADERS, 0);
|
||||
allqueue(REDRAWNLA, 0);
|
||||
|
||||
allqueue(REDRAWALL, 0);
|
||||
|
||||
deselect_all_area_oops();
|
||||
set_select_flag_oops();
|
||||
allqueue(REDRAWINFO, 1); /* 1, because header->win==0! */
|
||||
|
@@ -2780,6 +2780,9 @@ static void do_info_editmenu(void *arg, int event)
|
||||
if ((ob->type==OB_LAMP) || (ob->type==OB_EMPTY) || (ob->type==OB_FONT) || (ob->type==OB_CAMERA)) {
|
||||
error("Only editable 3D objects can be sheared");
|
||||
}
|
||||
else if ((base->lay & G.vd->lay)==0) {
|
||||
error("Only objects on visible layers can be sheared");
|
||||
}
|
||||
else {
|
||||
if (!G.obedit) {
|
||||
enter_editmode();
|
||||
@@ -2805,6 +2808,9 @@ static void do_info_editmenu(void *arg, int event)
|
||||
if ((ob->type==OB_LAMP) || (ob->type==OB_EMPTY) || (ob->type==OB_FONT) || (ob->type==OB_CAMERA)) {
|
||||
error("Only editable 3D objects can be warped");
|
||||
}
|
||||
else if ((base->lay & G.vd->lay)==0) {
|
||||
error("Only objects on visible layers can be warped");
|
||||
}
|
||||
else {
|
||||
if (!G.obedit) {
|
||||
enter_editmode();
|
||||
|
@@ -567,6 +567,13 @@ void tbox_execute(void)
|
||||
unsigned short event=0;
|
||||
unsigned short qual1=0, qual2=0;
|
||||
|
||||
/* needed to check for valid selected objects */
|
||||
Base *base;
|
||||
Object *ob;
|
||||
|
||||
base= BASACT;
|
||||
ob= base->object;
|
||||
|
||||
if(tbfunc) {
|
||||
tbfunc(tbval);
|
||||
}
|
||||
@@ -590,6 +597,14 @@ void tbox_execute(void)
|
||||
}
|
||||
/* ctrl-s (Shear): switch into editmode ### */
|
||||
else if(strcmp(tbstr1, "c|s")==0) {
|
||||
/* check that a valid object is selected to prevent crash */
|
||||
if ((ob->type==OB_LAMP) || (ob->type==OB_EMPTY) || (ob->type==OB_FONT) || (ob->type==OB_CAMERA)) {
|
||||
error("Only editable 3D objects can be sheared");
|
||||
}
|
||||
else if ((base->lay & G.vd->lay)==0) {
|
||||
error("Only objects on visible layers can be warped");
|
||||
}
|
||||
else {
|
||||
if (!G.obedit) {
|
||||
enter_editmode();
|
||||
/* ### put these into a deselectall_gen() */
|
||||
@@ -602,7 +617,16 @@ void tbox_execute(void)
|
||||
qual1 = LEFTCTRLKEY;
|
||||
event = SKEY;
|
||||
}
|
||||
}
|
||||
else if(strcmp(tbstr1, "W")==0) {
|
||||
/* check that a valid object is selected to prevent crash */
|
||||
if ((ob->type==OB_LAMP) || (ob->type==OB_EMPTY) || (ob->type==OB_FONT) || (ob->type==OB_CAMERA)) {
|
||||
error("Only editable 3D objects can be warped");
|
||||
}
|
||||
else if ((base->lay & G.vd->lay)==0) {
|
||||
error("Only objects on visible layers can be warped");
|
||||
}
|
||||
else {
|
||||
if (!G.obedit) {
|
||||
enter_editmode();
|
||||
/* ### put these into a deselectall_gen() */
|
||||
@@ -615,6 +639,7 @@ void tbox_execute(void)
|
||||
qual1 = LEFTSHIFTKEY;
|
||||
event = WKEY;
|
||||
}
|
||||
}
|
||||
|
||||
else if(strlen(tbstr1)<4 || (strlen(tbstr1)==4 && tbstr1[2]=='F')) {
|
||||
|
||||
|
Reference in New Issue
Block a user