diff options
author | Andre Susano Pinto <andresusanopinto@gmail.com> | 2008-06-21 01:36:15 +0400 |
---|---|---|
committer | Andre Susano Pinto <andresusanopinto@gmail.com> | 2008-06-21 01:36:15 +0400 |
commit | ffbe42129e0d043214daf9b07125d9d8140d1c74 (patch) | |
tree | 6c99776cfcfadd32347eacb287c69deaa1b35651 /source/blender/src/transform_constraints.c | |
parent | 824eac5095924ffdc1fea213a925054c88bf05d7 (diff) |
svn merge -r 15202:15292 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/src/transform_constraints.c')
-rw-r--r-- | source/blender/src/transform_constraints.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 769ebd2ea97..2d01c2303fc 100644 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -550,6 +550,10 @@ void setUserConstraint(TransInfo *t, int mode, const char ftext[]) { void BIF_setLocalLockConstraint(char axis, char *text) { TransInfo *t = BIF_GetTransInfo(); + if (t->total == 0) { + return; + } + switch (axis) { case 'x': setLocalConstraint(t, (CON_AXIS1|CON_AXIS2), text); @@ -566,6 +570,10 @@ void BIF_setLocalLockConstraint(char axis, char *text) { void BIF_setLocalAxisConstraint(char axis, char *text) { TransInfo *t = BIF_GetTransInfo(); + if (t->total == 0) { + return; + } + switch (axis) { case 'X': setLocalConstraint(t, CON_AXIS0, text); @@ -584,6 +592,10 @@ void BIF_setSingleAxisConstraint(float vec[3], char *text) { TransInfo *t = BIF_GetTransInfo(); float space[3][3], v[3]; + if (t->total == 0) { + return; + } + VECCOPY(space[0], vec); v[0] = vec[2]; @@ -622,6 +634,10 @@ void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text) { TransInfo *t = BIF_GetTransInfo(); float space[3][3]; + if (t->total == 0) { + return; + } + VECCOPY(space[0], vec1); VECCOPY(space[1], vec2); Crossf(space[2], space[0], space[1]); |