64
If third line contains Comment keyword, all following lines until Input or
Output will be added to block comment tooltip
Optionally, block color may be specified in hexadecimal format (#f00 or
#ff9900) or numeric format as hue value between 0 and 359
Following lines contain input and output lists. Each block can have any
number of inputs and outputs:
Inputs are a function parameter, other blocks can be connected to inputs by
default. If input definition has [object], [storage] or [tag] in its name then the
input is replaced with object, storage or tag selection input.
Each output variable is assigned to the corresponding function return value.
Example:
--- Function invert
--- Write inverted value
--- Comment
--- Set target object value to
--- inverse of source object value
--- Color #f90
--- Input
--- Source object [object]
--- Target object [object]
function invert(a, b)
local value = grp.getvalue(a)
grp.write(b, not value, dt.bool)
end
Once block function is added, it is available as a block in Block editor.