-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
BoneAttachment3D serializes bone_idx after bone_name: the index is off when skeleton changes and model is reimported #64512
Comments
Actually, this problem is worse than initially described. Every time I re-save the .blend file, it seems to shuffle the bone indexes, even without modifying the skeleton. Edit: I was able to work around this with a simple script.
Seems more than just the bone indexes are getting messed up, though. I feel like the timing of my animation is off and sometimes the poses are getting jacked up, too, but I'll have to dig into that a bit to figure out what exactly is going wrong. |
Seems I can upload files in a reply, but not in the main bug???? Here are the blender files. I can't even edit the original bug to put this link in, because when I try to do that, github shows the content for another bug that I entered as the edit text instead of this one. Things seem very broken here! Bugs in the bug reporting tool! Edit: And here's a separate bug for the animation playback speed issue: #64594 |
The random bone index issue appears to be an exporter problem: #61641. I was going to close this issue, but I think it can still be a problem if the bone indexes are changed legitimately by adding/removing bones. On re-import, the bone attachments should probably update the index using the bone name. |
Hey! We believe we pushed a fix in #72162 (part of 4.0 beta16) If it's fixed, feel free to close the issue, but I'd love to hear your feedback either way. Your scene might break after the update once, since we were forced to make a breaking change in beta16 in order to ensure it remains consistent in the future. |
Ok, I misunderstood the bug report. This problem is still present, actually. The attached .blend files do not work due to referencing other Linked blend files that were not included, so it was difficult to test. But I realize the cause now. Check out how BoneAttachment3D is serialized:
See the problem? Both |
Does it actually try to get the bone index from the bone name first? If so, what's the point in serializing the bone index? |
Godot version
v4.0.alpha.custom_build [2475393]
System information
Windows 10, GLES3, NVidia RTX 3080
Issue description
If you have a BoneAttachment3D attached to a bone, on an imported .blend file, then you change the blend file to add or remove a bone such that the index of the bone it's attached to changes, the attachment will be on the incorrect bone but will display the correct bone name.
Not sure if this happens with BoneAttachment in Godot 3.
The tscn file stores both a bone_idx and bone_name, so it should be possible to, on reimport, find the correct bone by name if the bone idx doesn't match the one with the name.
Steps to reproduce
Minimal reproduction project
Here's a .blend file that reproduces the issue. Add main_character.blend to your scene, attach to "head" or "hand_r", then copy main_character_after.blend to main_character.blend and note the attachments become broken.
... well, "something went really wrong" when I tried to attach it.
Edit: After editing a comment, apparently I can edit this with the correct text (hopefully). Here's the .blend files to reproduce this.
character_bone_index_problem.zip
The text was updated successfully, but these errors were encountered: