traverse_downstream_graph

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

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

Parameters
  • 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.

Returns

Returns the set of visited nodes.

Raises

og.OmniGraphError if the list of prims contains an invalid prim, or the prims do not all belong to the same graph.