Page MenuHome

Collada export removes action names
Confirmed, NormalPublic


System Information

  1. Windows 10, GTX 980 ti
  2. Ubuntu 14.04, Intel HD 4000

Blender Version


Short description of error

Action names aren't preserved in Collada export, making it near impossible to use with game engine tools (e.g., writing a tool to convert Collada to a game engine-specific format will not preserve animation names, which are important so a game engine knows what each animation is.)

Exact steps for others to reproduce the error

The attached model has 2 actions called Arm and Leg that move the arm and leg (example model...) File->Export as Collada exports something with cryptic and unusable names in the library_animations section of the exported data. <library_animations><animation id="Mesh_*"> and <library_animations><animation id="Mesh_pose_bones__*"> (not even a consistent naming). Re-loading the .dae file loads it with two actions called MeshAction and ModelAction. I also note that in the outliner, the original blender file has both actions located as children of the mesh which is a child of the armature, however after import, one animation is a direct child of the armature (not sure yet what this means...)

It would be useful if export preserved action names for use within a game engine. As Collada is intended to be used as an intermediate format, my intention is to parse Collada files to create a custom game-specific format, but I'd like it to work with Blender or other tools (Blender alone would be good enough though.)

Event Timeline

Trent Gamblin (goobliata) raised the priority of this task from to 90.
Trent Gamblin (goobliata) updated the task description. (Show Details)
Trent Gamblin (goobliata) edited a custom field.
Sergey Sharybin (sergey) lowered the priority of this task from 90 to Normal.May 17 2016, 9:59 AM

@Sergey Sharybin (sergey) The current collada module is supported until someone deletes it from the Blender source. However bug treatment is going slow at the moment. If nobody else fixes this issue, then i will look into this in about 10 days. (It might be an easy fix)

FYI - Using blender FBX export and importing into Unity yields 3 animations... (Model|Arm, Model|Leg, and Mesh|Arm). The first two are the Arm/Leg animations as expected. The third one is empty, and occurs because somehow your guy.blend file has an empty animation named "Arm" hanging off the mesh object. (I don't know how this got there. You can outliner right click unlink to remove it.)

What game engine are you loading the dae into?

I loaded an exported dae into Unity. It shows the model with one animation, labeled "Take 001", a name which does not appear anywhere in the dae export. So changing those names you see wouldn't affect what they are named after import into Unity. The "Take 001" animation spins the leg 360 degrees, and doesn't match any animation in the guy.blend.

I don't know enough about dae and Unity's dae support to who is doing what wrong here.

It does seem like a problem that exporting to dae and re-importing into blender results in those weird names, and that blender is oddly appending "Action" to the imported names. However, I wouldn't trust blenders collada import any more than it's export, so it's not clear what is being done wrong on which end.

In case it's relevant -- In the blender exporter code, the mesh animation id and name appear to be coming from here:

I figured out the extra animation on the mesh already actually. I'm still not 100% sure about it, I even asked about it on stackexchange:

but the answer was not entirely clear (though helpful.)

I've moved on from collada to the DirectX exporter -- which I had some minor problems with as well. For now I just modified the exporter to suit my needs. So collada working isn't a high priority for me anymore really. I was going through the formats to find one that would work. It's my own custom engine so how Unity works isn't important to me.

Thanks for the detailed response. I'm not sure how other software handles naming of animations but it could be relevant to see and maybe match. It does seem important though, if you were to use the format... unless you want to do more work in renaming or hard-coding values in your game.

David Jeske (jeske) added a comment.EditedJun 4 2016, 6:59 AM

I don't think there is anything more to do here. However, here is some more data..

The bundle below includes a fixed version of guy3-dj.blend, the blender FBX and DAE exports, and a Maya 2013 DAE export created after importing the blender FBX.

The Maya DAE file uses names derived from the object names just like blender. I can see no mention of the animation names anywhere in the Maya DAE file. (I renamed them LegAnim and ArmAnim for clarity)

<animation id="ManFBXASC032Armature-anim" name="ManFBXASC032Armature">

When I import the Maya DAE into Unity, I get also only one animation, also labeled "Take 001", just like from blender. However, when imported from Maya this animation is the correct "LegAnim". (the blender imported version swings the same leg 360 degrees)

The Maya DAE file is 127kb, compared with blender's at 45kb.

Hello, I was working with the COLLADA export from Blender and found this as well. I've also found that Blender exports only the current action and an action in Blender is exported as separate <animation> elements for each bone directly under <library_animations> element in COLLADA. Is it possible to group them like the following ?

<animation id="Action 1 Name from Blender">
    <animation/> <!-- animation for bone 1 -->
    <animation> <!-- animation for bone 2 -->
<animation id="Action 2 Name from Blender">
    <animation/> <!-- animation for bone 1 -->
    <animation> <!-- animation for bone 2 -->