AssetContainer.mergeAnimationsTo() return array of AnimationGroups

Hi! First post here. Love the engine and the community so far btw.

So currently mergeAnimationsTo adds the specified Animatables from the AssetContainer to the scene’s animationGroups (I am not entirely a fan of this Animatables requirement as it seems to work strangely with an AssetContainer loaded from a gltf file, but I can make that work). You are then left to determine which of those AnimationGroups is which. Wouldn’t returning an array of these appended AnimationGroups be useful? I think it would be useful for me.

I have a library of animations in an AssetContainer and a retargeting function that I pass to mergeAnimationsTo so I can essentially import these animations to a new mesh/skeleton. Having mergeAnimationsTo return an array would be a huge convenience for me. Instead of searching through the scene’s animationGroups and attempting to determine what they are targeting, I could just reference them from this new array. For context I am loading my animations into an AssetContainer from a gltf file using LoadAssetContainerAsync. Currently I am limited to one animation per gltf file and then I reference the last element in scene.animationGroups after it is merged.

This would be especially useful if my AssetContainer contains multiple AnimationGroups. Hopefully this was clear. Let me know what you all think!

Hello and welcome!

TOTALLY agree:). I think this could be a great addition. I’ll add it for the next nightly ;D

1 Like

Awesome. I checked out the change on github and I gotta say, I wish I had done it myself. It was so simple and I’ve always wanted to contribute to an open source project. Maybe next time.