Skip to content

NodeTypes: NodeValue

Akash Bora edited this page May 17, 2023 · 11 revisions

Node Value

Node Value is a node which contains a variable as the value, it has one output socket which can connect to multiple inputs.

Usage

node = NodeValue(canvas, value=1, text="Value 1")

Arguments

Parameter Description
canvas parent canvas where the node will be spawn
height height of the node
width width of the node
value variable which contains the value
fg_color foreground color of the node
text change the text of the node
text_color change the text color
font change the font of text
highlightcolor hover color of the node
border_width adds an additional border to the nodes
border_color border color of the node if border_width>0
hover disable/enable the hover effect
socket_color change the color of the sockets
socket_hover_color change the hover color of the sockets
socket_hover enable/disable the socket hover
socket_radius change the size of the sockets
corner_radius change the roundness of the node frame
side change the side of the socket (left or right)
x specify the x spawn location
y specify the y spawn location
click_command add a command when the node is clicked

Methods

  • .configure(args...): change some attributes of the node.
  • .destroy(): deletes the node from the canvas.
  • .exists(): check if node exist in the canvas.
  • .get(): get the current output value.
Clone this wiki locally