Implement loading directly into a Maya USD Proxy Shape#61
Draft
BigRoy wants to merge 10 commits intoynput:developfrom
Draft
Implement loading directly into a Maya USD Proxy Shape#61BigRoy wants to merge 10 commits intoynput:developfrom
BigRoy wants to merge 10 commits intoynput:developfrom
Conversation
moonyuet
reviewed
Jan 2, 2025
| shape = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() | ||
| stage = mayaUsd.ufe.getStage('|world' + shape) | ||
| prim_path = "/root" | ||
| UsdGeom.Xform.Define(stage, prim_path) |
Member
There was a problem hiding this comment.
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'
moonyuet
reviewed
Jan 2, 2025
| 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" |
Member
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Changelog Description
Additional info
Separated from #2
Testing notes: