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

header_frame

Return the Frame that holds the entire header bar.

header_input_frame

Return the Frame that holds the inputs on the left side of the header bar.

header_output_frame

Return the Frame that holds the outputs on the right side of the header bar.

port_center_widgets

Return the dict for port center widgets (which contains the port name label and edit fields).

ports

selected

Return the widget selected style state

skip_draw_clipped

Get skip_draw_when_clipped property of the root frame

snapping_widgets

user_drag

Return the dict with the port as the key and widget that follows the mouse cursor when the user creates a connection.

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.

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.