forked from bartvdbraak/blender
924: Constraints (especially tracking) on objects with non uniform scaling was screwing the orientation of the object badly 983: Two or more Follow Path constraint on one object was fubar Fixing 983 enables nice tricks like this: http://www.clubinfo.bdeb.qc.ca/~theeth/Work/Path.blend URLs for both bugs: http://projects.blender.org/tracker/index.php?func=detail&aid=924&group_id=9&atid=125 http://projects.blender.org/tracker/index.php?func=detail&aid=983&group_id=9&atid=125
This commit is contained in:
parent
f5d3649d17
commit
44cf2c587d
@ -1376,7 +1376,7 @@ void solve_tracking (Object *ob, float targetmat[][4])
|
|||||||
else Mat4CpyMat4(tmat, ob->obmat);
|
else Mat4CpyMat4(tmat, ob->obmat);
|
||||||
|
|
||||||
Mat4MulMat34(ob->obmat, totmat, tmat);
|
Mat4MulMat34(ob->obmat, totmat, tmat);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void where_is_object(Object *ob)
|
void where_is_object(Object *ob)
|
||||||
@ -1480,6 +1480,8 @@ void solve_constraints (Object *ob, short obtype, void *obdata, float ctime)
|
|||||||
/* Extract the components & accumulate */
|
/* Extract the components & accumulate */
|
||||||
Mat4ToQuat(focusmat, quat);
|
Mat4ToQuat(focusmat, quat);
|
||||||
VECCOPY(loc, focusmat[3]);
|
VECCOPY(loc, focusmat[3]);
|
||||||
|
Mat3CpyMat4(mat, focusmat);
|
||||||
|
Mat3ToSize(mat, size);
|
||||||
|
|
||||||
a+=enf;
|
a+=enf;
|
||||||
tot++;
|
tot++;
|
||||||
@ -1516,7 +1518,7 @@ void solve_constraints (Object *ob, short obtype, void *obdata, float ctime)
|
|||||||
Mat3MulMat3(mat, rmat, smat);
|
Mat3MulMat3(mat, rmat, smat);
|
||||||
Mat4CpyMat3(focusmat, mat);
|
Mat4CpyMat3(focusmat, mat);
|
||||||
VECCOPY(focusmat[3], aloc);
|
VECCOPY(focusmat[3], aloc);
|
||||||
|
|
||||||
evaluate_constraint(con, ob, obtype, obdata, focusmat);
|
evaluate_constraint(con, ob, obtype, obdata, focusmat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1537,11 +1539,11 @@ void solve_constraints (Object *ob, short obtype, void *obdata, float ctime)
|
|||||||
|
|
||||||
/* Interpolate the enforcement */
|
/* Interpolate the enforcement */
|
||||||
Mat4Invert (imat, oldmat);
|
Mat4Invert (imat, oldmat);
|
||||||
Mat4MulMat4 (delta, solution, imat);
|
Mat4MulMat4 (delta, imat, solution);
|
||||||
|
|
||||||
Mat4One(identity);
|
Mat4One(identity);
|
||||||
Mat4BlendMat4(delta, identity, delta, a);
|
Mat4BlendMat4(delta, identity, delta, a);
|
||||||
Mat4MulMat4 (ob->obmat, delta, oldmat);
|
Mat4MulMat4 (ob->obmat, oldmat, delta);
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -1561,6 +1563,7 @@ void solve_constraints (Object *ob, short obtype, void *obdata, float ctime)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void what_does_parent1(Object *par, int partype, int par1, int par2, int par3)
|
void what_does_parent1(Object *par, int partype, int par1, int par2, int par3)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user