-
Notifications
You must be signed in to change notification settings - Fork 17
Implement loading directly into a Maya USD Proxy Shape #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
| shape = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() | ||
| stage = mayaUsd.ufe.getStage('|world' + shape) | ||
| prim_path = "/root" | ||
| UsdGeom.Xform.Define(stage, prim_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i got some error on this line when loading the USD. It appears that it cannot find the stage layer from the loaded usd(which is weird as it should be using the staging layer which is newly created)

During load error happened on Product: "usdAsset" Representation: "usd" Version: 7
Error message:
Error in 'pxrInternal_v0_23__pxrReserved__::UsdGeomXform::Define' at line 70 in file S:\jenkins\workspace\ECP\ecg-usd-build\ecg-usd-full-python3.11-windows\ecg-usd-build\usd\pxr\usd\usdGeom\xform.cpp : 'Invalid stage'
Traceback (most recent call last):
File "D:\ayon-core\client\ayon_core\tools\loader\models\actions.py", line 740, in _load_representations_by_loader
load_with_repre_context(
File "D:\ayon-core\client\ayon_core\pipeline\load\utils.py", line 325, in load_with_repre_context
return loader.load(repre_context, name, namespace, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ayon-addon_template\ayon-maya\client\ayon_maya\plugins\load\load_maya_usd_add_reference.py", line 52, in load
UsdGeom.Xform.Define(stage, prim_path)
pxr.Tf.ErrorException:
Error in 'pxrInternal_v0_23__pxrReserved__::UsdGeomXform::Define' at line 70 in file S:\jenkins\workspace\ECP\ecg-usd-build\ecg-usd-full-python3.11-windows\ecg-usd-build\usd\pxr\usd\usdGeom\xform.cpp : 'Invalid stage'
| def load(self, context, name=None, namespace=None, options=None): | ||
|
|
||
| selection = list(iter_ufe_usd_selection()) | ||
| assert len(selection) == 1, "Select only one PRIM please" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error means that you need to SELECT a PRIM inside the Maya USD Proxy to 'reference into'. Unfortunately since it 'references into a prim' there isn't really something more intuitive I could think of whilst still allowing to load anywhere inside the USD hierarchy.

Changelog Description
Additional info
Separated from #2
Testing notes: