Export FBX - Animations duplicated through different objects

Hello!

I’m trying to animate and export a character with his weapon (to UE4).
So I have in my file one character with his armature, one weapon with his armature, and one action (“IDLE”) containing keyframes for both armatures.

But when I export these in one FBX, it creates two actions: character_IDLE and weapon_IDLE, but for each armature.
So if I open the FBX in Blender or UE4, each object have his IDLE action plus the other object’s IDLE action.

I think it’s more visually clear in UE4’s asset management :



The two “not wanted” animations are empty and do not exist in the original blend file. But once exported, they appear in the FBX.

I first tried to export my character and my weapon in separated FBX, or separate the weapon and character 's keyframes into two different actions, but I got the same result all the time.

Someone told me I have to play with the NLA editor, I make sure each armature have his own corresponding IDLE animation too, but I still end up with an FBX with every object’s action duplicated on every object.

I’m out of solutions. And I’m supposed to do several animations…
I would greatly appreciate any help.

Ok.
After several hours of research and tries, I think I’ve found how to kind of solve this.

I don’t know exactly what lead me to obtain what I wanted, so I will just list here the things I did when it worked :

  • Make sure each action animates only one armature
  • Check the fake user button (the F icon) on each action
  • Make sure each armature have its actions listed in the NLA editor
  • Close any action opened in the action editor for each armature before exporting
  • Uncheck “export all actions” in the FBX export options
  • Batch export options may cause troubles, so if it still doesn’t work for one of your assets, try exporting it by hand by selecting it, disabling bath export and enabling “selected only” in the FBX export options.

So now each object is exported with his actions only and not with the other object’s actions. But now I have another problem, my weapon uses a “child of” constraint in order to make it follow my character’s arm. Before it was correctly baked during the FBX export, but not anymore. :’(