forked from bartvdbraak/blender
Tinsy cleanup of combo drawing Manipulators:
- translate+scale : arrow at end of axis - translate+rotate: draws axis lines now - while translate: draws the axis line too And: GCC was nagging about Martin's precious code! transform_constraints.c:745: warning: suggest parentheses around comparison in operand of & Apparently the if(a & b == c) is undefined? Whatever!
This commit is contained in:
parent
66d5a4dd63
commit
90d7da7b27
@ -742,13 +742,13 @@ void BIF_drawPropCircle()
|
||||
int isLockConstraint(TransInfo *t) {
|
||||
int mode = t->con.mode;
|
||||
|
||||
if (mode & (CON_AXIS0|CON_AXIS1) == (CON_AXIS0|CON_AXIS1))
|
||||
if ( (mode & (CON_AXIS0|CON_AXIS1)) == (CON_AXIS0|CON_AXIS1))
|
||||
return 1;
|
||||
|
||||
if (mode & (CON_AXIS1|CON_AXIS2) == (CON_AXIS1|CON_AXIS2))
|
||||
if ( (mode & (CON_AXIS1|CON_AXIS2)) == (CON_AXIS1|CON_AXIS2))
|
||||
return 1;
|
||||
|
||||
if (mode & (CON_AXIS0|CON_AXIS2) == (CON_AXIS0|CON_AXIS2))
|
||||
if ( (mode & (CON_AXIS0|CON_AXIS2)) == (CON_AXIS0|CON_AXIS2))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -1093,13 +1093,14 @@ static void draw_manipulator_translate(float mat[][4], int moving, int drawflags
|
||||
/* axis */
|
||||
glLoadName(-1);
|
||||
|
||||
// translate drawn as last, only axis when no combo
|
||||
if(combo==V3D_MANIP_TRANSLATE)
|
||||
// translate drawn as last, only axis when no combo with scale, or for ghosting
|
||||
if((combo & V3D_MANIP_SCALE)==0 || colcode==MAN_GHOST)
|
||||
draw_manipulator_axes(colcode, drawflags & MAN_TRANS_X, drawflags & MAN_TRANS_Y, drawflags & MAN_TRANS_Z);
|
||||
|
||||
|
||||
/* offset in combo mode */
|
||||
if(combo & (V3D_MANIP_ROTATE|V3D_MANIP_SCALE)) dz= 1.0f+2.0*cylen;
|
||||
/* offset in combo mode, for rotate a bit more */
|
||||
if(combo & (V3D_MANIP_ROTATE)) dz= 1.0f+2.0*cylen;
|
||||
else if(combo & (V3D_MANIP_SCALE)) dz= 1.0f+0.5*cylen;
|
||||
else dz= 1.0f;
|
||||
|
||||
/* Z Cone */
|
||||
|
Loading…
Reference in New Issue
Block a user