Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-05-29 15:20:49 +0400
committerTon Roosendaal <ton@blender.org>2005-05-29 15:20:49 +0400
commit90d7da7b27ee4032796d0552a55f1a316b1fcb67 (patch)
tree0c2e7314652f44d62dea65f8fd7bb70fdac6c123
parent66d5a4dd63a88dc23cfc9ae4056bd5d14a2d4bac (diff)
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!
-rwxr-xr-xsource/blender/src/transform_constraints.c6
-rw-r--r--source/blender/src/transform_manipulator.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c
index f231813efd8..9f45410ab7b 100755
--- a/source/blender/src/transform_constraints.c
+++ b/source/blender/src/transform_constraints.c
@@ -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;
diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c
index 9bd62e1f801..69822e2868e 100644
--- a/source/blender/src/transform_manipulator.c
+++ b/source/blender/src/transform_manipulator.c
@@ -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 */