Hi,
Is there a quick way to add this button to a property panel? So when I click on it it will popup a selection window like the one in screenshot. Please advise, thanks.
Hi @qazs
The following points show how to create and access the attribute according to the implementation…
-
OmniGraph
- Define the attribute in .ogn file
... "inputs": { "testPrim":{ "type": "bundle", "description": "USD reference to the robot prim" } } ...- Access to the attribute value in .py file for a single entry
db.inputs.testPrim.path- Access to the attribute value in .py file for multiple entries
stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(db.node.get_prim_path()) prim.GetRelationship("inputs:testPrim").GetTargets() -
USD prim
- Create the attribute
prim.CreateRelationship("testPrim")- Access to the attribute value
prim.GetRelationship("testPrim").GetTargets()
