Add MeshInstance3D upgrade code#112607
Hidden character warning
Conversation
|
My main gripe with this approach is that new projects, or upgraded projects, will have this setting explicitly written in |
34b22aa to
708e173
Compare
|
Ok, I did the opposite. The setting still defaults to |
708e173 to
bd0b9d9
Compare
Mickeon
left a comment
There was a problem hiding this comment.
We should test the demos involving Skeleton3D with this PR to ensure nothing goes wrong again.
bd0b9d9 to
f8a938d
Compare
f8a938d to
251746a
Compare
|
Code changes look fine to me. I'm trying to first reproduce the issue to validate the PR, but it seems I get it in 4.6-dev3 and dev4 official builds, but not with my local dev build from Edit: Seems like the symptoms on the TPS demo were fixed somehow between 4.6-dev4 (bd2ca13) and Edit 2: So I bisected the change to afd12e3, but... nevermind, this is just a change to how animations are imported, so my Edit 3: So my testing confusion comes from the fact that the glTF importer will set the skeleton path based on the information in the glTF. For the player in the TPS demo, it happens to be a structure with MeshInstance3Ds under the Skeleton3D, so when you import with 4.6-dev2 or earlier (before the compat breakage), it doesn't save the value for But we still need to restore compatibility for manually created Skeleton/MeshInstance hierarchies, which can't be solved by simply re-importing. |
|
So uh, do I need to change anything? How to test it? |
|
No change needed for now, I just got a better understanding of what cases should be tested. The gltf import probably doesn't need any compat in the end, as the skeleton is looked up in the gltf nodes directly so the hierarchy is defined by the spec (I believe). So it's mostly for Godot authored Skeleton/MeshInstance scenes that we need compat, and not ones imported from gltf. We should check that the compat doesn't break the latter but I don't expect it to. |
akien-mga
left a comment
There was a problem hiding this comment.
Tested with a couple projects and I confirm that it fixes the issues:
- MRP from #112655 (which this PR thus fixes), which has an imported gltf scene converted to a Godot scene, so just reimporting the glb wouldn't fix the paths. This PR fixes it.
- TPS demo (only imported glb, but with this PR it's no longer needed to reimport the glb to fix the issue).
|
Thanks! |
Follow-up to #112267
Supersedes #112605
Bugsquad edit:
MeshInstance3Dis not automatically assigned to aSkeleton3Dafter 4.6 dev3 #112655Forcing no skeleton path has caused problems as expected, so this PR takes a bit different approach.
featuressetting),default_parent_skeleton_in_mesh_instance_3dis set to trueThis takes away some advantages of #112267, as users need to be aware of the compat option to make use of it (unless they create a new project). I added a note in the docs and we should probably make a prominent note in the update blog post for next version.
Please test and provide a reproduction project if there are still problems. I got some weird results when testing this (although it seems to fix the problem).