Node Editor¶
Contents
Summary
A canvas specific to graph node workflow. |
|
Holds info about a link between two |
|
A |
|
Shortcut constructor for |
|
Shortcut constructor for |
|
Shortcut constructor for |
|
An attachment point for a |
|
Specifies how a |
NodeEditor¶
- class dearpygui_obj.node.NodeEditor(**config)[source]¶
Bases:
dearpygui_obj.wrapper.widget.Widget,dearpygui_obj.wrapper.widget.ItemWidgetMx,dearpygui_obj.wrapper.widget.ContainerWidgetMx[NodeEditor]A canvas specific to graph node workflow.
Should only contain
Nodeobjects. Any other kind of widget will not be displayed.- get_all_links() Iterable[NodeLink][source]¶
Get all linkages between any
NodeAttributeobjects in the editor.
- add_link(end1: NodeAttribute, end2: NodeAttribute) Optional[NodeLink][source]¶
Adds a link between two
NodeAttributeobjects.- Returns
A
NodeLinkrepresenting the link that was created, orNoneif the link was invalid.
- delete_link(link: dearpygui_obj.node.NodeLink) None[source]¶
- delete_link(end1: dearpygui_obj.node.NodeAttribute, end2: dearpygui_obj.node.NodeAttribute) None
Deletes a link between two
NodeAttributeobjects if a link exists.
- class dearpygui_obj.node.NodeLink(input: NodeAttribute, output: NodeAttribute)[source]¶
Bases:
tupleHolds info about a link between two
NodeAttributeobjects.- input: dearpygui_obj.node.NodeAttribute¶
The input end of the link.
- output: dearpygui_obj.node.NodeAttribute¶
The output end of the link.
Node¶
- class dearpygui_obj.node.Node(label: Optional[str] = None, **config)[source]¶
Bases:
dearpygui_obj.wrapper.widget.Widget,dearpygui_obj.wrapper.widget.ItemWidgetMx,dearpygui_obj.wrapper.widget.ContainerWidgetMx[Node]A
NodeEditornode.Should only contain
NodeAttributeobjects, any other kind of widget will not be displayed. Note thatNodeAttributeobjects may contain any kind or number of widget though.
NodeAttribute¶
- dearpygui_obj.node.input_attribute(*, id: Optional[int] = None) NodeAttribute[source]¶
Shortcut constructor for
NodeAttribute(NodeAttributeType.Input)
- dearpygui_obj.node.output_attribute(*, id: Optional[int] = None) NodeAttribute[source]¶
Shortcut constructor for
NodeAttribute(NodeAttributeType.Output)
- dearpygui_obj.node.static_attribute(*, id: Optional[int] = None) NodeAttribute[source]¶
Shortcut constructor for
NodeAttribute(NodeAttributeType.Static)
- class dearpygui_obj.node.NodeAttribute(type: dearpygui_obj.node.NodeAttributeType = NodeAttributeType.Input, **config)[source]¶
Bases:
dearpygui_obj.wrapper.widget.Widget,dearpygui_obj.wrapper.widget.ItemWidgetMx,dearpygui_obj.wrapper.widget.ContainerWidgetMx[NodeAttribute]An attachment point for a
Node.- type: NodeAttributeType¶
Read or modify the ‘type’ config property.
- class dearpygui_obj.node.NodeAttributeType(value)[source]¶
Bases:
enum.EnumSpecifies how a
NodeAttributewill link to other nodes.- Input = None¶
Input nodes may only link to Output nodes.
- Output = 'output'¶
Output nodes may only link to Input nodes.
- Static = 'static'¶
Static nodes do not link. They are still useful as containers to place widgets inside a node.