I have a bunch of glb files containing each containing a single animation. An import script saves all of them as .tres files. I’d like to delete the glb files however doing so through the editor shows the .tres files as dependencies of the glb files so it also deletes the .tres files.
If i delete the glb files outside of Godot will it cause me any issues?
What about if later I modify an animation and need to re-import? It will overwrite my existing .tres (which is what I’d want). Will Godot give the new .tres a new UID? Will that break the link to my saved animation library resource?
You did it the right way, you want to keep the dependency to the glb. You can simply override the glb on next export, and all tres animations will be updated automagically.
Why do you want to store them as .tres, and not as .res? Would be more performant, as .tres is text and .res is binary. As long as you don’t want to edit the text by hand (or LLM) I would recommend to store them as .res and keep all GLBs.
EDIT: I would prefer to have all animations, that are for one object, in one glb.
I’d try using the animations in the target AnimationPlayer then deleting the .glb and associated animations. See what happens.
Alternately, you can import the model, open it up, go into the AnimationPlayer and export the animation manually from there. I think if you do that manually, instead of in the import process, they are no longer linked.
That’s how Godot saves animations when you save them from a .glb. I don’t think there’s an option to save them as .res files.
In NPC Experiment based on "Little Computer People" I have all the animations as single res. You can choose res as format, if in the glb you use the “Action” - “Set Animation Save Paths”. It’s working fine for me.
You did it the right way, you want to keep the dependency to the glb. You can simply override the glb on next export, and all tres animations will be updated automagically.
This is what I’m currently doing, but I don’t want to store the glb files in my repo since their binaries and they’re adding to the size of the repo.
Why do you want to store them as .tres, and not as .res? Would be more performant, as .tres is text and .res is binary. As long as you don’t want to edit the text by hand (or LLM) I would recommend to store them as .res and keep all GLBs.
Mainly for version control. When (if) I ship my game I plan on converting them to .res for the reasons you mentioned.
EDIT: I would prefer to have all animations, that are for one object, in one glb.
I was also doing this, but my issue was that I’d make a tweak to 1 animation in blender and then have to export all the animations. It just took too long and wasn’t good for iteration. Now I export each file as a single glb.
I have one glb with the character and all the animations, and in every object (like the chair) I have the chair animation, that the char will get from the chair. If I change something on one animation of the char, I export the char, and all res (geometry, animations) will automatically updated. No additional work for all the other anims. Don’t get what should take so long on a change.
But it can have situations where you want to be independent from the glb, than you can make it local (unique) and store the (t)res without the dependency to the glb. I prefer the dependency to edit things faster.