IsolationGraphModel
- class omni.kit.widget.graph.isolation_graph_model.IsolationGraphModel(model: GraphModel, root)
Bases:
object
Methods
__init__
(model, root)add_input_or_output
(position[, is_input])can_connect
(source, target)Return if it's possible to connect source to target
clear_caches
()destroy
()position_begin_edit
(item)position_end_edit
(item)Return the object that will automatically unsubscribe when destroyed.
Return the object that will automatically unsubscribe when destroyed.
Return the object that will automatically unsubscribe when destroyed.
Attributes
It's only called to get the nodes from the top level
selection
- __init__(model: GraphModel, root)
- class EmptyPort(parent: Union[InputNode, OutputNode])
Bases:
object
Is used by the model for an empty port
- static get_type_name() str
The string type that goes the source model abd view
- class InputNode(model: GraphModel, source)
Bases:
object
Is used by the model for the input node. This node represents input ports of the compound node and it’s placed to the subnetwork of the compound.
- static get_type_name() str
The string type that goes the source model and view
- property ports: Optional[List[Any]]
The list of ports of this node. It only has input ports from the compound node.
- class MagicWrapperMeta(name, bases, dct)
Bases:
type
Python always looks in the class (and parent classes) __dict__ for magic methods and __getattr__ doesn’t work, but since we want to override them, we need to use this trick with proxy property.
It makes the class looking like the source object.
See https://stackoverflow.com/questions/9057669 for details.
- class OutputNode(model: GraphModel, source)
Bases:
object
Is used by the model for the ouput node. This node represents output ports of the comound node and it’s placed to the subnetwork of the compound.
- static get_type_name() str
The string type that goes the source model and view
- property ports: Optional[List[Any]]
The list of ports of this node. It only has output ports from the compound node.
- can_connect(source: Any, target: Any)
Return if it’s possible to connect source to target
- subscribe_item_changed(fn)
Return the object that will automatically unsubscribe when destroyed.
- subscribe_node_changed(fn)
Return the object that will automatically unsubscribe when destroyed.
- subscribe_selection_changed(fn)
Return the object that will automatically unsubscribe when destroyed.
- property nodes
It’s only called to get the nodes from the top level