forked from bartvdbraak/blender
- Fix for #1726, the convex() function is smarter now, checking on valid
trias to test in quad PLus: - Add undo-push after 'assign material' in curve editmode, plus redraw to reflect material change - Added tooltips for opengl light buttons in user presets - Added correct buttons window redraw for armature selecting in editmode
This commit is contained in:
parent
6d672eee9a
commit
c66741510c
@ -457,9 +457,6 @@ void do_common_editbuts(unsigned short event) // old name, is a mix of object an
|
||||
efa->mat_nr= G.obedit->actcol-1;
|
||||
efa= efa->next;
|
||||
}
|
||||
allqueue(REDRAWVIEW3D_Z, 0);
|
||||
makeDispList(G.obedit);
|
||||
BIF_undo_push("Assign material index");
|
||||
}
|
||||
else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) {
|
||||
nu= editNurb.first;
|
||||
@ -469,6 +466,9 @@ void do_common_editbuts(unsigned short event) // old name, is a mix of object an
|
||||
nu= nu->next;
|
||||
}
|
||||
}
|
||||
allqueue(REDRAWVIEW3D_Z, 0);
|
||||
makeDispList(G.obedit);
|
||||
BIF_undo_push("Assign material index");
|
||||
}
|
||||
break;
|
||||
case B_MATSEL:
|
||||
|
@ -423,6 +423,7 @@ void selectconnected_armature(void)
|
||||
|
||||
countall();
|
||||
allqueue (REDRAWVIEW3D, 0);
|
||||
allqueue (REDRAWBUTSEDIT, 0);
|
||||
allqueue(REDRAWOOPS, 0);
|
||||
|
||||
}
|
||||
@ -460,6 +461,7 @@ void selectconnected_posearmature(void)
|
||||
|
||||
countall();
|
||||
allqueue (REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
allqueue (REDRAWACTION, 0);
|
||||
allqueue(REDRAWOOPS, 0);
|
||||
}
|
||||
@ -696,7 +698,7 @@ void delete_armature(void)
|
||||
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
allqueue(REDRAWBUTSOBJECT, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
allqueue(REDRAWOOPS, 0);
|
||||
countall();
|
||||
}
|
||||
@ -742,7 +744,6 @@ void remake_editArmature(void)
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWOOPS, 0);
|
||||
allqueue(REDRAWBUTSHEAD, 0);
|
||||
allqueue(REDRAWBUTSOBJECT, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
}
|
||||
|
||||
@ -2234,7 +2235,7 @@ void mousepose_armature(void)
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWACTION, 0);
|
||||
allqueue(REDRAWIPO, 0); /* To force action ipo update */
|
||||
allqueue(REDRAWBUTSOBJECT, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
allqueue(REDRAWOOPS, 0);
|
||||
|
||||
rightmouse_transform();
|
||||
@ -2459,6 +2460,7 @@ void deselectall_posearmature (int test){
|
||||
for (curBone=get_armature(ob)->bonebase.first; curBone; curBone=curBone->next)
|
||||
deselect_bonechildren (ob, curBone, selectmode);
|
||||
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWOOPS, 0);
|
||||
allqueue(REDRAWACTION, 0);
|
||||
|
@ -1489,9 +1489,24 @@ float convex(float *v1, float *v2, float *v3, float *v4)
|
||||
float cross[3], test[3];
|
||||
float inpr;
|
||||
|
||||
CalcNormFloat(v1, v2, v3, cross);
|
||||
CalcNormFloat(v1, v3, v4, test);
|
||||
|
||||
/* make sure we do not test a (close to) zero sized tria in quad */
|
||||
test[0]= AreaT3Dfl(v1, v2, v3);
|
||||
test[1]= AreaT3Dfl(v2, v3, v4);
|
||||
test[2]= AreaT3Dfl(v3, v4, v1);
|
||||
|
||||
if(test[0]<test[1] && test[0]<test[2]) {
|
||||
CalcNormFloat(v2, v3, v4, cross);
|
||||
CalcNormFloat(v2, v4, v1, test);
|
||||
}
|
||||
else if(test[1]<test[0] && test[1]<test[2]) {
|
||||
CalcNormFloat(v3, v4, v1, cross);
|
||||
CalcNormFloat(v3, v1, v2, test);
|
||||
}
|
||||
else {
|
||||
CalcNormFloat(v4, v1, v2, cross);
|
||||
CalcNormFloat(v4, v2, v3, test);
|
||||
}
|
||||
|
||||
inpr= cross[0]*test[0]+cross[1]*test[1]+cross[2]*test[2];
|
||||
|
||||
return inpr;
|
||||
|
@ -2570,18 +2570,18 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
||||
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||
uiDefButI(block, TOG|BIT|0, B_RECALCLIGHT, "On",
|
||||
xpos+edgsp+2*mpref/6, y2, mpref/6, buth,
|
||||
&U.light[cur_light].flag, 0.0, 0.0, 0, 0, "");
|
||||
&U.light[cur_light].flag, 0.0, 0.0, 0, 0, "Enable this OpenGL light in Solid draw mode");
|
||||
|
||||
uiBlockSetCol(block, TH_AUTO);
|
||||
uiDefButS(block, ROW, B_REDR, "Vec",
|
||||
xpos+edgsp+3*mpref/6, y2, mpref/6, buth,
|
||||
&cur_light_var, 123.0, 0.0, 0, 0, "");
|
||||
&cur_light_var, 123.0, 0.0, 0, 0, "Lamp vector for OpenGL light");
|
||||
uiDefButS(block, ROW, B_REDR, "Col",
|
||||
xpos+edgsp+4*mpref/6, y2, mpref/6, buth,
|
||||
&cur_light_var, 123.0, 1.0, 0, 0, "");
|
||||
&cur_light_var, 123.0, 1.0, 0, 0, "Diffuse Color for OpenGL light");
|
||||
uiDefButS(block, ROW, B_REDR, "Spec",
|
||||
xpos+edgsp+5*mpref/6, y2, mpref/6, buth,
|
||||
&cur_light_var, 123.0, 2.0, 0, 0, "");
|
||||
&cur_light_var, 123.0, 2.0, 0, 0, "Specular color for OpenGL light");
|
||||
|
||||
if(cur_light_var==1) {
|
||||
uiDefButF(block, NUM, B_RECALCLIGHT, "R ",
|
||||
|
Loading…
Reference in New Issue
Block a user