- Home /
Is there a method to strip maya namespaces at import that works with Mecanim?
I've got a bunch of animations created by animators using referenced files, which in Maya means they have to have namespaces at export time. I'd like to strip the namespaces at import time, and I've got an AssetPostprocessor that does so just fine.
However, it's impossible as far as I can see to use this in conjunction with Mecanim. After the model is imported, I get a spew of errors like this:
[mecanim]: BindSkeleton: cannot find Transform 'base:Pelvis'
(In this example the importer stripped the namespace "base:"). It seems like the avatar is created before the import is done, and it binds to the imported skeleton using string names which don't change when I re-write the names on the bones.
Is this a hard limit I have to work around, or has somebody figured this one out?
PS: I can do the namespace strip at export time - but the only methods for doing so will involve making changes to the scene and then reverting - I don't want my animators to lose the Undo queue every time the export!