-
-
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
Fix custom tracks causing issues on reimport #39968
Conversation
dca95c6
to
567289e
Compare
That PR must've been what broke it. I think they were calling |
Hey thank you for cc ing me and sorry if my PR caused any issues... Just to understand your issue, you imported a scene with animation to external files, modified existing tracks and/or added new ones, and finally saved said animation. Then when pressing reimport what happened? Here's what I just tested on my side and what happens in both cases :
old behaviour (before my pr):
new behaviour (with my pr):
This is where the merge happens : godot/editor/import/resource_importer_scene.cpp Lines 959 to 971 in 73262c0
The snippet above adds any track that isn't marked as imported from the old file to the new file, so that's why. Maybe the operation shouldn't be a copy but a replace? If the track exists, replace it if its not imported. Can you confirm that this is the behaviour you were having? |
Yes, that's the issue I was having. I don't think it should replace the tracks either, if it did you would have to lose your custom tracks every time you want to change your animations, which defeats the purpose. I believe that calling |
Fixes #39959 |
Thank you for the change and sorry again for the trouble. |
Don't be sorry, it's no trouble! |
567289e
to
ba42ac2
Compare
As someone doing a lot of reiterating and reimporting of 3D models with animations, I agree with this 100%. Thank you to the both of you. Hope this gets merged soon ^-^ I'm still a bit new here, should I close this issue: #39959 ? Or should I wait until it gets merged into master? |
I tweaked this a little and it should be ready now. @CowKeyMan I think wait until it gets merged into master. I'm also wondering if there's a good way to hide the imported tracks warning when keep_custom_tracks is enabled. It's a little misleading when it displays and the user already has that enabled. Does anyone know if there's a way to check a resource's import settings through the editor? If not the only way I can think of is storing that flag from the importer in each animation, but I don't think that's a very elegant way to handle it. |
There's also sometimes another weird bug that appears, where if you reimport while godot is open, you either need restart godot or else double click the .glb/.gltf file (havent tried it with others yet) and open 'new inherited scene' before the new glb/gltf file actually takes effect. During this state, if you try to create new custom animation tracks or edit previous one, the changes end up getting lost. I'll put a more detailed description of this in an issue soon, gonna check if it still happens in 3.2.2 after this merge. That said, thank you very much once again for the fix! Note: the bug Im referring to was in 3.2.1 as well, in case that wasn't clear |
@CowKeyMan No problem. I'm hoping this can be backported, the issue is the same on 3.2. |
ba42ac2
to
0d5bef8
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.
Since these changes are small, this could probably be squashed down to 1 commit.
0d5bef8
to
4313a7b
Compare
Thanks! And congrats for your first merged PR :) |
Cherry-picked for 3.2.3. |
Upon importing a scene with custom tracks enabled, the importer was treating all of the tracks as custom tracks, meaning that when reimported it would overwrite the tracks with the previously imported ones. I just deleted the bit of code that did that.
Also fixed an issue with copy_track in which it would try to copy a value track's update mode even if it wasn't a value track, which led to it printing a ton of error messages each time you reimported a scene.
(This is my first time contributing here by the way, let me know if I'm doing anything wrong)
Bugsquad edit: Fixes #39959.