GraphNode
- class omni.kit.widget.graph.graph_node.GraphNode(model: GraphModel, item, has_input_connection, has_output_connection, ports: list, delegate)
Bases:
object
Represents the Widget for the single node. Uses the model and the delegate to fill up its layout.
Methods
__init__
(model, item, has_input_connection, ...)Save the model, item and delegate to reuse when drawing the widget
destroy
()Called by extension before destroying this object.
rebuild_layout
()Attributes
Return the Frame that holds the entire header bar.
Return the Frame that holds the inputs on the left side of the header bar.
Return the Frame that holds the outputs on the right side of the header bar.
Return the dict for port center widgets (which contains the port name label and edit fields).
ports
Return the widget selected style state
Get skip_draw_when_clipped property of the root frame
snapping_widgets
Return the dict with the port as the key and widget that follows the mouse cursor when the user creates a connection.
Return the dict with the port as the key and placer that follows the mouse cursor when the user creates a connection.
visible
- __init__(model: GraphModel, item, has_input_connection, has_output_connection, ports: list, delegate)
Save the model, item and delegate to reuse when drawing the widget
- destroy()
Called by extension before destroying this object. It doesn’t happen automatically. Without this hot reloading doesn’t work.
- property header_frame
Return the Frame that holds the entire header bar.
- property header_input_frame
Return the Frame that holds the inputs on the left side of the header bar.
- property header_output_frame
Return the Frame that holds the outputs on the right side of the header bar.
- property port_center_widgets
Return the dict for port center widgets (which contains the port name label and edit fields). Dictionary key is the port, value is ui.Widget or None if the delegate does not return a widget
- property selected
Return the widget selected style state
- property skip_draw_clipped
Get skip_draw_when_clipped property of the root frame
- property user_drag
Return the dict with the port as the key and widget that follows the mouse cursor when the user creates a connection.
- property user_drag_placer
Return the dict with the port as the key and placer that follows the mouse cursor when the user creates a connection.