Change Blender "Animation" name for GLB output?

When I export my animated meshes from Blender to GLB then import into Babylon.js, the animation group name is always fixed at “Animation”, so importing multiple animated GLBs results in multiple animations all named the same.

Does anyone know if it’s possible to change this name in Blender? I can’t find any way to rename it in Blender.

Just to clarify, I want different animation group names so that I can use scene. getAnimationGroupByName() :slight_smile:

Maybe @PirateJC or @bghgary would know ?

Not my exporter, but looking at the source repo it looks like it writes the name supplied, or at least gathers it for an action. See
glTF-Blender-IO/gltf2_blender_gather_animations.py at 6605ac770ce64e014283a34fe720d75760c40e66 · KhronosGroup/glTF-Blender-IO · GitHub

It does both actions and NLA (which I little about). It might make a difference.

2 Likes

Yup @JCPalmer is right.

The glb export will simply take the animation name that you label each animation with in Blender.

Notice how I’ve named my animation “cannon” in Blender and it comes right into Babylon with the glb file with the same name.

Hope this helps.

Thanks for the insights @PirateJC & @JCPalmer but when I have multiple animated meshes that I want to be a part of the one animation on export, I uncheck the (counterintuitive) GLTF export option “Group by NLA Track”. This aggregates the separate animations and in Babylon.js they simply show up as an AnimationGroup called “Animation”, a name I can’t seem to edit anywhere in Blender that I’m aware of.

Outline with multiple animated meshes:
Screenshot 2021-08-06 081511

GLTF export settings with “Group by NLA Track” unchecked:

How it shows up in Babylon.js - just named generic “Animation”:
Screenshot 2021-08-06 081736

And in the inspector (2 GLB imports, each with aggregated animation group names of generic “Animation”)

Likely there’s something I’m not understanding when it comes to Blender animation.

If it’s not possible to change this aggregated animation name in Blender I guess I could just change it somehow in code, after the GLB is loaded into Babylon.js.

Actually another little related thing I may as well ask about is animation “frames”. In Blender my animation is 9 seconds long and 250 frames, but in Babylon.js if I’m using animationGroup.goToFrame(x) then x needs to be a float value of the duration not an integer representing the exact frame as I would have expected i.e. for half-way I need to set goToFrame(4.5) rather than goToFrame(125). I can workaround this of course, but confused why this is the case?