Function¶
This node is deprecated; please use the new FunctionDef (Function Definition) node, which works the same way.
Version 1.0.0
Ports/Properties¶
graph¶
Graph that defines the function.
- verbose name: Graph
- default value: None
- port type: GraphPort
- value type: Graph
graph__signature¶
Arguments accepted by your function. This is the list of argument names that your function receives, in the order in which they are expected if the function is called with positional arguments. You may also list keyword-only arguments after a + symbol, i.e., as in (arg1,arg2,+,kw1,kw2). Your function graph must contain one or more Placeholder nodes for each of the arguments listed here, with their respective slotnames set to the argument names listed here. Then, anything downstream of these placeholders collectively constitutes your function body, and the final node of your function body is expected to return the function result. This final node is then connected to the function node itself by wiring it to the "graph" input port of the function node. In graphical UIs this edge will be drawn in dotted style to indicate not a normal forward data flow, but the fact that the function body (graph) itself is passed to the Function node. The function declaration node follows the function body in the graph, rather than preceding it.
- verbose name: Graph [Signature]
- default value: (arg1)~>()
- port type: Port
- value type: object (can be None)
funcname¶
Name of the function. The function can then be invoked under its name elsewhere in the graph via the Invoke node.
- verbose name: Funcname
- default value: myfunction
- port type: StringPort
- value type: str (can be None)
friendly_name¶
Friendly name of the node. This is the name that would show up in visual editors when the function is invoked as a node. This is capitalized and with spaces, as in "My Function".
- verbose name: Friendly Name
- default value: None
- port type: StringPort
- value type: str (can be None)
desc¶
Description of the function. The first sentence is taken as the executive summary and should not exceed 60 characters). The next paragraph is the essential description, and any following paragraphs are considered additional description text. This should not list the arguments, but can give a high-level overview of what the function can accept and what it does. It is possible to use limited amounts of HTML formatting, for instance for emphasis.
- verbose name: Description
- default value: None
- port type: StringPort
- value type: str (can be None)
version¶
Version of the function.
- verbose name: Version
- default value: 0.1.0
- port type: StringPort
- value type: str (can be None)
status¶
Development status of the function.
- verbose name: Status
- default value: alpha
- port type: EnumPort
- value type: str (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)