Hi,
I am trying to write an extension which has to open an USD file, find an Action Graph in it and execute the graph.
I could read the .usda file this way:
stage: Usd.Stage = Usd.Stage.Open(filename)
‘fileName’ comes from the extension.toml as a property.
But when I try to get the Action Graph in it like this:
(graph, _, _, _) = og.Controller.edit("/World/ag1")
I get this error:
2023-10-03 08:05:01 [2,240,102ms] [Error] [omni.ui.python] OmniGraphError: Could not find orchestration graph for stage GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION
So it seems for me somehow the stage should be bundled to OmniGraph or application context but I don’t know how to do it from python code.
I tried to get the given graph on an other way too (e.g.: path = Sdf.Path(“/World/ag1”) …), I have found some examples but none of them works, obviously OmniGraph can’t see the stage I have loaded from .usda file.
How should I make Omnigraph connected to the stage I read from an .usda file, to be able to use the graph for further actions?