-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove REST transform influence in skeleton bones #53765
Remove REST transform influence in skeleton bones #53765
Conversation
@reduz It make to crash when selecting Skeleton in the SceneTreeDock after importing gltf assets and makeing inherited scene.
|
Previously, skin was dynamically generated when This is a patch to keep the previous behavior. diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp
index 67f4a88228..cfd90e5da0 100644
--- a/scene/3d/mesh_instance_3d.cpp
+++ b/scene/3d/mesh_instance_3d.cpp
@@ -146,11 +146,13 @@ void MeshInstance3D::_resolve_skeleton_path() {
if (!skeleton_path.is_empty()) {
Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(get_node(skeleton_path));
if (skeleton) {
- new_skin_reference = skeleton->register_skin(skin_internal);
if (skin_internal.is_null()) {
+ new_skin_reference = skeleton->register_skin(skeleton->create_skin_from_rest_transforms());
//a skin was created for us
skin_internal = new_skin_reference->get_skin();
notify_property_list_changed();
+ } else {
+ new_skin_reference = skeleton->register_skin(skin_internal);
}
}
}
|
Animation key insertion in SkeletonEditor and Inspector is broken, but this is not in the scope of this PR as it is an effect of getting rid of the previous Transform3DTrack. I will send you a PR with a fix after @reduz 's some overhauls to the animation features are done. |
Also, it seems that the InitPose and ApplyPoseToRest functions of SkeletonEditor are broken. This is the effect of this PR, but at least considering the fact that the calculation of rest in skinning is correct, it can be fixed later... |
687fd77
to
f98e5ab
Compare
@TokageItLab Regarding key insertion, I think we need to add a TRS key insertion menu in the 3D editor similar to the 2D one, also asking for using either the new TRS tracks or beziers: |
@TokageItLab alright applied your suggested patch |
Roger, for now, I'll fix the broken track assignments and work on the implementation of the transform record in a separate PR. |
* 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).
f98e5ab
to
2dc8232
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed together with @fire
Thanks! Will merge when CI completes and move on to the next task. |
Implements: godotengine/godot-proposals#3377
This is a compatibility breaking change.