diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-04-22 05:14:15 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-04-22 05:14:15 +0400 |
commit | c1a7b8b7a10428e6d50119fb51ef2c0c8efd3309 (patch) | |
tree | 869a495d9c35da96c21dc00189d521f65efa91de /source/blender/src/transform_constraints.c | |
parent | 589ce4a005ce16c5a628cd51819e20623a23c891 (diff) |
Local axis constraints for pose mode. Added
Camera rotation fix (was off centered because it used persinv instead of viewinv. Now rotation center is always center screen in camera mode. (Still need to fix the helpline not showing)
Numinput constraint function was no good, didn't check if a constraint was even on... Fixed.
Rotation was missing constraint text in header print. Fixed.
Diffstat (limited to 'source/blender/src/transform_constraints.c')
-rwxr-xr-x | source/blender/src/transform_constraints.c | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 9e3104f9b72..6908e6c8f96 100755 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -114,36 +114,38 @@ void getConstraintMatrix(TransInfo *t); void constraintNumInput(TransInfo *t, float vec[3]) { int mode = t->con.mode; - float nval = (t->flag & T_NULL_ONE)?1.0f:0.0f; + if (mode & CON_APPLY) { + float nval = (t->flag & T_NULL_ONE)?1.0f:0.0f; - if (getConstraintSpaceDimension(t) == 2) { - if (mode & (CON_AXIS0|CON_AXIS1)) { - vec[2] = nval; - } - else if (mode & (CON_AXIS1|CON_AXIS2)) { - vec[2] = vec[1]; - vec[1] = vec[0]; - vec[0] = nval; - } - else if (mode & (CON_AXIS0|CON_AXIS2)) { - vec[2] = vec[1]; - vec[1] = nval; - } - } - else if (getConstraintSpaceDimension(t) == 1) { - if (mode & CON_AXIS0) { - vec[1] = nval; - vec[2] = nval; - } - else if (mode & CON_AXIS1) { - vec[1] = vec[0]; - vec[0] = nval; - vec[2] = nval; + if (getConstraintSpaceDimension(t) == 2) { + if (mode & (CON_AXIS0|CON_AXIS1)) { + vec[2] = nval; + } + else if (mode & (CON_AXIS1|CON_AXIS2)) { + vec[2] = vec[1]; + vec[1] = vec[0]; + vec[0] = nval; + } + else if (mode & (CON_AXIS0|CON_AXIS2)) { + vec[2] = vec[1]; + vec[1] = nval; + } } - else if (mode & CON_AXIS2) { - vec[2] = vec[0]; - vec[0] = nval; - vec[1] = nval; + else if (getConstraintSpaceDimension(t) == 1) { + if (mode & CON_AXIS0) { + vec[1] = nval; + vec[2] = nval; + } + else if (mode & CON_AXIS1) { + vec[1] = vec[0]; + vec[0] = nval; + vec[2] = nval; + } + else if (mode & CON_AXIS2) { + vec[2] = vec[0]; + vec[0] = nval; + vec[1] = nval; + } } } } |