Maya USD Import Help #2214
-
Hello, I want to be able to import my USD assets with variant selection via python. When importing with the import dialog there is a option to open a hierarchy view and select the variants on what ever prim you want. The command pops up in the script editor when its ran but I do not see how any of the options chosen in the Hierarchy view is being applied. Currently an import command I use could look like this. cmds.file(
assetusd_path, i=True, type='USD Import', ignoreVersion=True,
renameAll=True, mergeNamespacesOnClash=False, namespace=namespace,
options=";shadingMode=[[none,default]];preferredMaterial=none;primPath=/;readAnimData=0;"
"useCustomFrameRange=0;startTime=0;endTime=0;importUSDZTextures=0",
preserveReferences=True, importFrameRate=True, importTimeRange='override',
) How do I include the options for variant selection on specific prims via the python import command? Any help would be appreciated. Cheers, Jason Coelho |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi @jcoelho88, all the information is stored in a singleton class called ImportData. That class is not yet exported to the Python API. Would you like to wrap it and submit a PR? See files in lib/mayaUsd/python for Python wrapper examples. See wrapStageCache.cpp for a starting point on exporting singletons. |
Beta Was this translation helpful? Give feedback.
Hi @jcoelho88, all the information is stored in a singleton class called ImportData.
That class is not yet exported to the Python API. Would you like to wrap it and submit a PR? See files in lib/mayaUsd/python for Python wrapper examples. See wrapStageCache.cpp for a starting point on exporting singletons.