Apply animation mirror to bone translation of all keyframes

Armin Burgmeier 2011-10-12 20:50:27 +02:00
parent 1f78d57516
commit 801b10881b
1 changed files with 3 additions and 7 deletions

View File

@ -195,18 +195,14 @@ namespace
void MirrorKeyFrame(StdMeshKeyFrame& frame, const StdMeshTransformation& old_bone_transformation, const StdMeshTransformation& new_inverse_bone_transformation)
{
// frame was a keyframe of a track for old_bone and was now transplanted to new_bone.
//frame.Transformation.rotate.x = -frame.Transformation.rotate.x;
frame.Transformation.rotate.y = -frame.Transformation.rotate.y;
frame.Transformation.rotate.z = -frame.Transformation.rotate.z;
// We might also want to do something like this... need to get feedback
// from modelers...
#if 0
StdMeshVector d = old_bone_transformation.scale * (old_bone_transformation.rotate * frame.Transformation.translate);
//d.x = -d.x;
d.x = -d.x;
frame.Transformation.translate = new_inverse_bone_transformation.rotate * (new_inverse_bone_transformation.scale * d);
#endif
// TODO: scale
}
bool MirrorName(StdStrBuf& buf)