-
mayaUSDImport fails to import an anonymous layer. Is this a bug or limitation? For example the following code fails.
TypeError: anon:.. is invalid |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
When I look at the job code, I'm having the impression that what you are trying to do might be possible. But clearly, the command expects you to pass the file path. Your above example fails during argument parsing, but when you fix it that and call So to answer your question directly, this looks like a limitation. |
Beta Was this translation helpful? Give feedback.
-
mayaUSDExport works as expected when an anonymous layer is passed to the filePath argument so I assumed and hoped import would be the same. I don't understand why this limitation exists but thank you for having a look. |
Beta Was this translation helpful? Give feedback.
-
Thank you for mentioning export. I wasn't aware that we didn't have symmetry between the two. Then I consider this a bug (even if maybe confusing to pass identifier as the file path). The fix is in review - #1086. Try it if you are compiling MayaUSD by yourself. |
Beta Was this translation helpful? Give feedback.
-
Sorry I didn't mentioned it before, the export command with a layer identifier is used in tests so I assumed it's standard functionality. Compiling is a bit more than I can chew but I'll wait for the next release. This is great news, thank you. |
Beta Was this translation helpful? Give feedback.
When I look at the job code, I'm having the impression that what you are trying to do might be possible. But clearly, the command expects you to pass the file path. Your above example fails during argument parsing, but when you fix it that and call
cmds.mayaUSDImport(f=layer.identifier, primPath='/')
you will get an error from this validation -maya-usd/lib/mayaUsd/commands/baseImportCommand.cpp
Line 128 in 6a9f673
So to answer your question directly, this looks like a limitation.