Difference between revisions of "Parameter"

From Derivative
Jump to navigation Jump to search
Tag: 2021.10000
Line 14: Line 14:
 
Fields in dialogs and options to commands are not parameters.
 
Fields in dialogs and options to commands are not parameters.
  
Parameters can be driven by expressions when in [[Parameter Mode|Expression Mode]]. For more information on expressions see also [[Introduction to Python|Python]].
+
Parameters can be driven by [[:Category:Python|Python]] expressions when in [[Parameter Mode|Expression Mode]].
  
 
'''TIP''': Pressing Ctrl-E/Cmd+E with the cursor in a parameter brings up the current parameter’s expression in the text editor, making it easier to see and edit long expressions.
 
'''TIP''': Pressing Ctrl-E/Cmd+E with the cursor in a parameter brings up the current parameter’s expression in the text editor, making it easier to see and edit long expressions.

Revision as of 15:40, 17 December 2020

Parameters in TouchDesigner only exist in Operators (OPs or "nodes"). Parameters include:

  • numbers, both integer and floating point
  • number pairs, triples or quadruples (e.g. width and height, XYZ position, RGBA color)
  • on-off flags
  • menus
  • text strings
  • paths to other nodes in TouchDesigner networks
  • buttons that initialize actions (uncommon)

Fields in dialogs and options to commands are not parameters.

Parameters can be driven by Python expressions when in Expression Mode.

TIP: Pressing Ctrl-E/Cmd+E with the cursor in a parameter brings up the current parameter’s expression in the text editor, making it easier to see and edit long expressions.

Parameters can be driven by CHOPs by Exporting CHOP channels to a parameter putting it in Export Mode. In the example Parameter Dialog below, the Y-Translate parameter is being controlled via an export. This is indicated by the green color of the parameter in the dialog.

Parameters can be bi-directionally synced to other parameters and CHOP channels using Binding. The parameter will go into Bind Mode.

Parameter Dialog.png

See also: Parameter Python Class, Parameter Dialog, Parameter Mode