omni.graph.core.traverse_upstream_graph(prims: List[pxr.Usd.Prim], attribute_predicate: Optional[Callable[[omni.graph.core._omni_graph_core.Attribute], bool]] = None, node_callback: Optional[Callable[[omni.graph.core._omni_graph_core.Node], None]] = None) Set[omni.graph.core._omni_graph_core.Node]

Traverses the nodes upstream from the input nodes and apply the predicate on visited nodes.

  • prims – The list of starting point nodes for the traversal.

  • attribute_predicate – Function taking an Attribute as parameter and returning bool. If True, connections to this attribute are evaluated, otherwise they are skipped.

  • node_callback – Function taking a Node as parameter. Allows for custom logic to be applied to visited nodes.


The set of visited nodes.

Return type