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:
authorMartin Poirier <theeth@yahoo.com>2005-04-22 05:14:15 +0400
committerMartin Poirier <theeth@yahoo.com>2005-04-22 05:14:15 +0400
commitc1a7b8b7a10428e6d50119fb51ef2c0c8efd3309 (patch)
tree869a495d9c35da96c21dc00189d521f65efa91de /source/blender/src/transform_constraints.c
parent589ce4a005ce16c5a628cd51819e20623a23c891 (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-xsource/blender/src/transform_constraints.c58
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;
+ }
}
}
}