Bugfix for FBX export for animations

in 2.48 constant interpolations meant that wasnt a problem but since it now uses linear interp. you can notice errors with animated characters because the 2 eulers are not compatible.

Added optional euler_compat argument to matrix.toEuler(eul) and quat.toEuler(eul) so when getting the euler rotations from a list of matrices the animation curve will be continues.
Also added euler.makeCompatible(euler).

- warning silenced for imagepaint.c
This commit is contained in:
2009-05-18 04:11:54 +00:00
parent 9a40f4d2a6
commit 5a16f0b60c
9 changed files with 100 additions and 20 deletions

View File

@@ -617,6 +617,12 @@ class Euler:
@rtype: Quaternion object
@return: Quaternion representation of the euler.
"""
def makeCompatible(eul_compat):
"""
Make this euler compatible with another, so interpolating between them works as expected.
@rtype: Euler object
@return: an instance of itself
"""
class Quaternion:
"""
@@ -718,9 +724,11 @@ class Quaternion:
@return: an instance of itself
"""
def toEuler():
def toEuler(eul_compat):
"""
Return Euler representation of the quaternion.
@type eul_compat: L{Euler}
@param eul_compat: Optional euler argument the new euler will be made compatible with (no axis flipping between them). Useful for converting a series of matrices to animation curves.
@rtype: Euler object
@return: Euler representation of the quaternion.
"""
@@ -870,9 +878,11 @@ class Matrix:
@return: an instance of itself.
"""
def toEuler():
def toEuler(eul_compat):
"""
Return an Euler representation of the rotation matrix (3x3 or 4x4 matrix only).
@type eul_compat: L{Euler}
@param eul_compat: Optional euler argument the new euler will be made compatible with (no axis flipping between them). Useful for converting a series of matrices to animation curves.
@rtype: Euler object
@return: Euler representation of the rotation matrix.
"""