[QUOTE=Sune;17667]
It would be nice if we knew beforehand what namespace and skeleton is in the FBX file we are dealing with is. If the skeleton is different, we do option 1. If it’s the same we need only load animation. One obstacle with loading animation 1-1 obstacle is making sure namespaces match. I’ve found no good way of changing the namespace in the incoming FBX file (only including what’s already there in a parent namespace), but we could temporarily change the one in Maya to match the one in the file.[/QUOTE]
I’m hoping somebody can figure out a way to “swap” namespaces; import animation saved with one namespace onto a skeleton of another namespace. Barring that, my solutions have been to save without a namespace. It is possible to import/merge from an animation file that has no namespaces onto a skeleton with a namespace. You can do it from the import UI, but the UI does not echo the appropriate commands so to replicate via code, takes some shenanigans. Have to use ‘namespace’ command to set the namespace you want to import onto, mel.FBXImportMode command to set “update” (‘exmerge’) and mel.file command with ‘type’ and ‘namespace’ set:
namespace -set “char1”;
FBXImportMode -v exmerge;
file -import -type “FBX” -ra true -namespace “char1” “filename.fbx”;
The other workaround is ATOM seems to load onto a skeleton even if it was saved with a different namespace.
Still testing these two solutions to see which is better. ATOM is leading as it means to save out the animations, the export/saving process does not need to be destructive like the FBX export does, because we have to strip the namespace which in our case means loading the reference into the scene and moving namespace to root, etc. (Unless anybody knows a way to swap the namespace of a reference?