-
-
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
Reimport bone attachment fixes #82471
Reimport bone attachment fixes #82471
Conversation
ca4848c
to
b2224c9
Compare
b2224c9
to
cfbafc6
Compare
cfbafc6
to
8ef1cd5
Compare
I've updated this fix a bit more throughly to also have the GLTF importer assign the correct bone_idx at this stage. This needs to be done because otherwise, it doesn't get saved and we cannot derive the correct reset value from any scene which derive from it. This silences some warnings on reimport. I've also forced the bone_idx to -1 during the RECACHE notification to ensure that the idx will get properly updated. An issue remaining is that with changing the enum values, the build system warns of compat breakage with GDExtension. Since this is an enum which I imagine nobody used it was only designed to deal with bugs like this, would request information on how to proceed. |
part of #75839 |
Tested this with a build using 8ef1cd5. The main issue in ticket #82466 seems to be fixed! The armature itself no longer appears to glitch visually. But by adding a total of 6 bone attachments, and then removing 2, the lowest bone attachment in the hierarchy stays at idx 16 (incorrectly pointing to a idx associated with the armature), instead of the new correct idx which appears to be 14. |
Hmm, would it be possible to do another reproduction project for this specific instance too @slumberface? I just want to make sure I'm not making a mistake and am actually reproducing the situation as accurately as possible. |
@SaracenOne I can definitely make another reproduction that demonstrates this last situation. Do you want it made on 4.1.1 or 8ef1cd5? |
Thanks! @slumberface |
@SaracenOne I'm experiencing an issue where the Godot editor/engine itself won't compress in windows (file names that are too long??). Here is the asset folder you can drag into a 4.1.1 project. Same instructions for reproduction but this test has:
|
8ef1cd5
to
f920bf3
Compare
@slumberface Sorry for the delay in updating this. Thanks a lot for your updated MRP. I think it should be properly fix now; the issue appears to be the fact that while I added the correct IDX assignment for one part of the GLTF importer, there was another branch where it needed to be added too. With that in mind, I think the only thing remaining on this PR is knowing how to go about dealing with the BONE_RECACHE enum issue I've mentioned. |
@SaracenOne no worries on the delay and good work circling back to this! |
This notification collision also causes this: |
Do we want to just remove calling the notification for 4.2 and do an overhaul in 4.3, we have issues arising from it and close to release |
f920bf3
to
904a552
Compare
PR's been updated with a more ad-hoc fix for this bug and removed dependency on the notificiation which was discussed to potentially be undesirable. We can look into how to more universally handle notifying nodes of scene changes for 4.3 since removing the notification means that editors scripts have no awareness of when a reimport has occured. |
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.
Approving for the overall consensus and for the editor side of changes. Should be okay for now, but we will need to rework it later, of course.
Needs some clean up, and an approval from the animation team would be appreciated.
Assign bone_idx to GLTF importer to fix serialization. Notifies Skeletons and BoneAttachments when reimporting. Removes usage of NOTIFICATION_NODE_RECACHE_REQUESTED
904a552
to
4b671ee
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.
LGTM
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.
Looks good to me.
Thanks! |
Fixes an oversight of accidentally giving NOTIFICATION_NODE_RECACHE_REQUESTED the same ID as NOTIFICATION_DRAW, and adds the notification to BoneAttachment3D and Skeleton3DFixes some bugs in GLTF importing which would lead to issues when reimporting the scene. An earlier version of this PR also made use of the NOTIFICATION_NODE_RECACHE_REQUESTED notification, but discussions in RocketChat indicated that usage of this notification may not have been desirable, so for now, I've included a bespoke recursive function with special-case handling for Skeleton3Ds and BoneAttachment3Ds and removed dependency on NOTIFICATION_NODE_RECACHE_REQUESTED.
Closes #82466
Closes #82680