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.
This commit is contained in:
2005-04-22 01:14:15 +00:00
parent 589ce4a005
commit c1a7b8b7a1
4 changed files with 41 additions and 33 deletions

View File

@@ -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;
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_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;
}
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;
}
}
}
}