-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Fix import hints breaking node paths in animations #43044
Fix import hints breaking node paths in animations #43044
Conversation
713ae75
to
e82b8d1
Compare
Slow to get to this, putting it on my todo list. |
https://github.com/godotengine/godot-tests/tree/master/tests/blend_export/blend Can you make a test case pr with the new tests? Edited: reviewing |
To clarify the (small) scope of this PR, let me note that the code that deals with empties is barely touched here (only fixing one renaming oversight). There remains a separate issue with them, namely importing them as custom collision shapes (based on the draw type) only works with files exported from Blender using ol' Better Collada: godotengine/godot-docs#4374 |
I added 43044-marker.blend to https://github.com/godotengine/godot-tests/tree/master/tests/blend_export . Currently building the engine to test that it breaks in 4.0 standard and works in your pr. Edited link. |
The original godot/editor/import/resource_importer_scene.cpp Lines 514 to 515 in c56a071
Namely, the -col suffix is not removed if it clashes with an existing name. In that case there is no need to fix animations, so the animations from the 43044-marker.blend work even on master without modifications (and in my PR, the new code is simply not triggered, and so it also works). When there is no clash with an existing name (as will be the common case, and as it was in #38809), there will be a rename that removes the -col suffix, and the code in my PR will be triggered, fixing the animations.
So, |
I wonder why Marker-col and not Marker2? That seems odd. |
The quoted If |
I will be reworking this code in the coming weeks, can probably use it as a reference but suggest review for 3.2 |
What is the current state of this? Need some help to retest master. |
This looks good, but likely needs a rebase. Any volunteers? |
Thanks for the feedback. I'll rebase today. |
e82b8d1
to
80c2dbd
Compare
67a8022
to
75b5cb8
Compare
Rebased it is. |
75b5cb8
to
88bf673
Compare
Originally this PR was doing the renaming work in the same loop as the one where tracks are being removed if they reference nodes with a |
88bf673
to
1cdad6c
Compare
I added a local variable If the original PR looked good and the (small) improvements are agreeable, then does it mean a positive review? :) |
Thanks! |
This might warrant a dedicated backport PR for |
Keep track of renamed nodes (which are processed first) so that in the animations (which are processed last) the paths can be fixed.
Fixes #38809. Importing the minimal example there now gives the following verbose output:
Small bonus: fixes the unreported bug that the
convcolonly
hint was not removed in case of an empty object with a draw type.Bugsquad Edit: