assetsManager & loadedAnimationGroups empty

Hello there,

I’m not sure it’s a bug. I use the assetsManager to load everything and I have a task with some animations groups inside.
I can’t seems to find the animations in there.
I tried to check the loadedAnimationGroups array present but it’s always empty.
In the babylon file I can see my animationGroup.

Here is the playground
https://playground.babylonjs.com/#Y7XMAR#17

Am I missing something here ?

There is no animation groups on this scene. All animations are hosted by the skeleton
image

Ok here is another playground which is a little bit more like how I use all this.
I export from 3ds max a babylon file with an animation group.

If you check the code in the babylon file you can see it’s there.

But there is nothing in the array when importing it.

https://playground.babylonjs.com/#Y7XMAR#19

Ok this is because you are loading using addMeshTask which will only load meshes. AnimationGroups are not attached to any meshes as they could animate many things simultaneously. You may be forced to use SceneLoader.Append

1 Like

Ok I understand. The purpose here was to export all meshes and animations in one package.
What I thought was misleading is that the skeleton is detected.

I supposed that the animations should be there because why not :stuck_out_tongue:

I will find another way to load the package then.
Thanks

Edit
It works with append but then I loose the control I had to do a few things with what was loaded.

Would it be possible to add support for animationGroup with the assetsManager ?
I’m trying to find a solution to load it easily while keeping the assetsManager loading the usual things…

Edit 2
I found LoadAssetContainer that will allow me to move forward and detect everything inside and add them to the scene afterward.
I just need to know how to register things (meshes, skeleton, animationGroups) into a scene

Loading Animationgroup alone won’t make sense as Animationgroup can reference everything in the scene.

Using the asset container is a good idea!. You can then remove everything unneeded from it and then call container.addToScene

Yep I just need to allow the assetsManager and the LoadAssetContainer to cohabit.
I was using the assetsManager.OnSuccess method, I will have to encapsulate everything in a way to load it properly.
Right now it’s a bit of a mess :slight_smile:

One thing though.
What do you think about allowing exporting skeltons empty to export only the animation on it.
Then we could reapply it by code.

Empty is not quite possible but affecting only a dummy box is definitely psosible

Yes, this is what I did but I wonder why the skeletons weren’t enough.

1 Like

Mostly because we need to update the exporter for it :slight_smile:

1 Like

Yep I figured :stuck_out_tongue: