Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Alembic import does not maintain namespaces (DECADE LONG BUG)

Message 1 of 5
908 Views, 4 Replies

Alembic import does not maintain namespaces (DECADE LONG BUG)

Maya's Alembic Export has an option to either keep or "strip namespaces" from the exported file.
An ABC exported from maya with this option off (ie keep namespaces) does produce an abc file which show in other dcc's to have their namespaces preserved...
However this file when brought back into maya itself does not keep it's namespaces (import, reference, through alembic menu or otherwise always results in no namespace data).

Posts going back as far as 2012 talk of this, and it's what I would undoubtedly call a pipeline breaking BUG.
Here is a post from 2014 with the same issue....

I can confirm this is still an issue with maya 2018 (our main production version), and maya 2022 (our planned upgrade for planned py3 shift). The post linked above mentions if the namespace(s) exist before import that objects will get put into them... I can say this doesn't work for me. Even if it did it would not be a solution, but it could open up some possibilities in our pipeline tools).

Does anyone out there know a solution or workaround to this DECADE long obvious bug?

Message 2 of 5

Don't use the cache<import alembic, use the import under the file menu(file<import) and check the option box this gives you the option to import with name space. You can change the file type to alembic.

Another work around is, while having the mesh selected go to cache<import alembic check option box and check the import under current selection < check merge and import. This will keep the shader information and the namespace.

Message 3 of 5

Thank you for the response however, there are no "file type specific options" for alembic, and nothing to maintain namespaces in any options menu.
This is freshly tested in both Maya 2018 and 2022 under...

  • File > Import
  • File > Create Reference (or from the reference editor itself)
  • Cache > Alembic Cache > Open (merge or add)
  • Cache > Alembic Cache > Import
  • Cache > Alembic Cache > Reference

Nothing will preserve namespaces from the file. And no alembic specific file options show up in any dialog even if you change the type from "best guess" to "alembic".
At best you can set a new namespace manually for the file using the standard options allotted to all imports & references by using either...

  • The name of the file
  • Your own string
  • Renaming clashing nodes

However there is nothing to maintain existing namespaces, let alone any nested namespaces from the file.
I'm using the python and mel api's for all my scripting and the AbcImport function does not have any parameters to suggest it can even do this.

The help string at the header of AbcImport.cpp file also gives no indication that this is possible with the current implementation of this plugin.
This essentially makes alembic a useless file format for maya, unless you make the assumption that once exported you leave this DCC in favor of others.

Message 4 of 5

here is a video

the first part is import under the file menu

the second part is cache import alembic merge

Uploaded by TED C on 2022-01-19.
Message 5 of 5

Thank you for taking the effort to make the video... however the reason it appears to work for you is you named your alembic file the same as the namespace you created, and your import options were set to use the name of the file as the namespace.

Instead try to make a namespace that doesn't match the file name, and you'll see the issue.
Even worse, make a nested namespace, putting your nodes under the child namespace, and both namespaces will get replaced with just the filename, completely altering your hierarchy and rendering the initial namespaces completely useless.
Even worse still have multiple objects in the abc with different namespaces. Maya will replace the unique namespaces with a single (manually created) one, so even the separation inside the file will fail, and you can get renamed nodes due to clashing names.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums