GroupNode

class NodeGraphQt.GroupNode(qgraphics_item=None)

Implemented in v0.2.0

The NodeGraphQt.GroupNode class extends from the NodeGraphQt.BaseNode class with the ability to nest other nodes inside of it.

Inheritance diagram of NodeGraphQt.GroupNode
../_images/group_node.png

Attributes:

is_expanded

Returns if the group node is expanded or collapsed.

Methods:

get_sub_graph()

Returns the sub graph controller to the group node if initialized or returns None.

get_sub_graph_session()

Returns the serialized sub graph session.

set_sub_graph_session(serialized_session)

Sets the sub graph session data to the group node.

expand()

Expand the group node session.

collapse()

Collapse the group node session it's expanded child sub graphs.

set_name([name])

Set the name of the node.

property is_expanded

Returns if the group node is expanded or collapsed.

Returns:

true if the node is expanded.

Return type:

bool

get_sub_graph()

Returns the sub graph controller to the group node if initialized or returns None.

Returns:

sub graph controller.

Return type:

SubGraph

get_sub_graph_session()

Returns the serialized sub graph session.

Returns:

serialized sub graph session.

Return type:

dict

set_sub_graph_session(serialized_session)

Sets the sub graph session data to the group node.

Parameters:

serialized_session (dict) – serialized session.

expand()

Expand the group node session.

Returns:

node graph used to manage the nodes expaneded session.

Return type:

SubGraph

collapse()

Collapse the group node session it’s expanded child sub graphs.

set_name(name='')

Set the name of the node.

Parameters:

name (str) – name for the node.