Search - User list
Full Version: Loading references via python
Root » Solaris and Karma » Loading references via python
oslo
Good day community

How I could load references via python LOP without inlineusd LOP ?

I want to recreate via python that USD description

def "sphere" (
prepend references = @../../home/user/sphere.usd@
)
{
}
Tim Crowson
Assuming you have a prim that already exists, and you want to add a reference to that prim, I would try:

# get the existing references (there may be none)
references = prim.GetReferences()

# add your new one
references.AddReference(assetPath, primPath)


Example from Nvidia Omniverse:
https://docs.omniverse.nvidia.com/dev-guide/latest/programmer_ref/usd/references-payloads/add-reference.html [docs.omniverse.nvidia.com]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB