Importing Combined Animations from Blender

Godot Version 4.2

Question

This is more of a Blender question really or somewhere in the middle.

In Blender I have these two animated objects a disc and a coil to make a spring pad (just like in Sonic the Hedgehog games). The coil’s animation is controlled via shape keys and the disc or cylinder is controlled via object transforms. Both objects are paired under a parent object (see screenshot).

Problem:
When I export the animations they come into godot as two animations.

I need them to come in as one animation and try as I might I cannot make it happen. People have suggested action groups or pairing them together inthe Non linear animation editor. Either way I have not found a workflow for importing the two animations together so they play as one.

Hoping for some guidance here.

2 Likes

I’m currently also trying to figure out a good workflow to create and import animations from Blender to Godot (though im using Godot 4.3 in this screenshot).
So far I havent found a good way of grouping certain animations in blender so that Godot only seperates the animations I want it to seperate.
(See Edit for a way to do exactly this ^)

So my janky workaround is; In the Blend file import settings, select the ‘Scene’ object (which should be the root), scroll to the bottom of the settings on the right, and unselect the ‘Group Tracks’ option under the Animation section.


This in my limit experience just groups ALL the animations in that blend file into 1 animation in Godot.

While this isn’t relevant to your question ill give an example of if i want to create a cutscene;
My workflow now is to have a Blender file with my environment in it, then i create an empy Blender file that will hold all the cutscene animation.
So i can see the environment while animating i Link the environmental blend file to that anim blend file.
(linking or appending stuff in Blender is a whole other thing Link & Append - Blender 4.3 Manual)
Then I put both these files into godot and set them up in a scene, the env blend file is just teh env, and the anim blend file with ‘Group Tracks’ off in the import settings plays all that cutscenes animations.
To note, when importing the anim blend file i have to tweak the import setting to not import any Linked blender obj so that i dont have a bunch of duplicate stuff overlapping in my scene!

This is a bit cumbersome and i’m still figuring out new ways of doing this so lemm know if you find a better way than this!

Edit:

Since posting this I’ve also found that if you name your NLA Tracks the same thing across all your animated objects in Blenders NLA editor, they will be grouped when importing them into godot. Make sure you keep ‘Group Tracks’ set to true for this to work though.
image
It doesnt matter what the Object or NLA Strip is called, just the NLA Track
(The grey one)
image
I haven’t found any documentation for this behavour, i just randomly stumbled upon it in a youtube video.

Also if you give your NLA Tracks the suffix ‘-loop’ or ‘-cycle’ (e.g. ‘Intro-loop’ or ‘idle-loop’) it will automatically set that anim to loop in Godot when it gets imported, just make sure all the names are matching still, so all the looping anims you want grouped together should also have the ‘-loop’ suffix.
This is documented here along with some other cool naming suffixes that can alter how godot imports stuff.

Good Luck!