1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Remove animation 3D transform track, replace by loc/rot/scale tracks.

* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.

This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:

* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.

*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
This commit is contained in:
reduz
2021-10-11 19:20:58 -03:00
parent f9aec342dc
commit ec19ed3723
29 changed files with 1952 additions and 1419 deletions

View File

@@ -1305,7 +1305,9 @@ void Skeleton3DGizmoPlugin::set_subgizmo_transform(const EditorNode3DGizmo *p_gi
t.origin = orig + to_local.xform(sub);
// Apply transform.
skeleton->set_bone_pose(p_id, t);
skeleton->set_bone_pose_position(p_id, t.origin);
skeleton->set_bone_pose_rotation(p_id, t.basis.operator Quaternion());
skeleton->set_bone_pose_scale(p_id, t.basis.get_scale());
}
void Skeleton3DGizmoPlugin::commit_subgizmos(const EditorNode3DGizmo *p_gizmo, const Vector<int> &p_ids, const Vector<Transform3D> &p_restore, bool p_cancel) {