-
Notifications
You must be signed in to change notification settings - Fork 13
Introduction
TkNodeSystem is a nodal-interface, basically a DAG where each node performs an operation on it's input connections, and outputs something (which you can connect to another node).
It can be used to create flow-based operations in your application. It can be easily implemented with tkinter or customtkinter as it is created with tkinter canvas.
Note that the node components are not separate widgets like customtkinter. The whole canvas is one parent widget and other components are drawn inside that canvas.
Drawn components of TkNodeSystem are:
- node canvas: containing the grid image and other bindings
- node frame: containing round rectangle and text
- node sockets: containing circle which acts as a connector, attached to the node frame
- node wires: the lines are created when output is connected to some input
Usable components of TkNodeSystem:
- NodeCanvas
- NodeValue
- NodeOperation
- NodeCompile
- NodeMenu
The flow is always from output_socket-->input_socket(s)
This is the preferred way of importing the package:
from tknodesystem import *
or
from tknodesystem import NodeCanvas, NodeValue, NodeOperation, NodeCompile, NodeMenu
This node system is not like the Blender node system where the nodes have various widgets like sliders and options (see the reason), but it is similar to the node system of Davinci Resolve (fusion), Natron or Nuke. So, if you are planning to add controls then place them in some separate frame. An advanced example is also provided here.