diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-05-29 13:21:34 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-05-29 13:21:34 +0400 |
commit | 14a3166685b23f481b7feabbfe08bfeed64a5847 (patch) | |
tree | 9c14a6e1cbbb92487f935703f2c36a84acb2a3e0 /source/blender/src/transform.c | |
parent | eeb6adffd3a88613e48cf91274d08055e77a98cf (diff) |
Push/Pull didn't do Lock Constraint correctly. Fixed.
Also added an isLockConstraint function that tells if the current constraint is a locking constraint or not.
Diffstat (limited to 'source/blender/src/transform.c')
-rwxr-xr-x | source/blender/src/transform.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index e83e55c6bc4..886607e16f2 100755 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -1988,7 +1988,14 @@ int PushPull(TransInfo *t, short mval[2]) VecSubf(vec, t->center, td->center); if (t->con.applyRot && t->con.mode & CON_APPLY) { t->con.applyRot(t, td, axis); - Projf(vec, vec, axis); + if (isLockConstraint(t)) { + float dvec[3]; + Projf(dvec, vec, axis); + VecSubf(vec, vec, dvec); + } + else { + Projf(vec, vec, axis); + } } Normalise(vec); VecMulf(vec, distance); |