Remove REST transform influence in skeleton bones
* Animations and Skeletons are now pose-only. * Rest transform is kept as reference (when it exists) and for IK * Improves 3D model compatibility (non uniform transforms will properly work, as well as all animations coming from Autodesk products).
This commit is contained in:
parent
004b44e915
commit
2dc823273e
15 changed files with 107 additions and 279 deletions
|
|
@ -455,7 +455,7 @@ void SkeletonModification3DTwoBoneIK::calculate_joint_lengths() {
|
|||
joint_two_length = 0;
|
||||
for (int i = 0; i < bone_two_children.size(); i++) {
|
||||
joint_two_length += bone_two_rest_trans.origin.distance_to(
|
||||
stack->skeleton->local_pose_to_global_pose(bone_two_children[i], stack->skeleton->get_bone_rest(bone_two_children[i])).origin);
|
||||
stack->skeleton->get_bone_global_pose(bone_two_children[i]).origin);
|
||||
}
|
||||
joint_two_length = joint_two_length / bone_two_children.size();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue