Difference between revisions of "Parameter"

From Derivative
Jump to navigation Jump to search
m
m
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
|Title=Parameter
 
|Title=Parameter
 
|Short=Parameters in TouchDesigner are an operator's settings (numbers, menus, flags, strings, paths) which the user can alter. Parameters for any operator can be opened by right-clicking on the operator and selecting "Parameters..." A currently selected operator's parameters can be viewed in a [[Network Editor]] by pressing the keyboard shortcut 'p'.
 
|Short=Parameters in TouchDesigner are an operator's settings (numbers, menus, flags, strings, paths) which the user can alter. Parameters for any operator can be opened by right-clicking on the operator and selecting "Parameters..." A currently selected operator's parameters can be viewed in a [[Network Editor]] by pressing the keyboard shortcut 'p'.
 +
|Long=
 +
}}
 +
{{Glossary
 +
|Title=Parameter Value
 +
|Short=Parameter Value refers to the constant, the expression, the bind reference and the [[Parameter Mode]] that are used together to determine the evaluated parameter value.
 
|Long=
 
|Long=
 
}}Parameters in TouchDesigner only exist in [[Operator]]s (OPs or "nodes"). Parameter types include:
 
}}Parameters in TouchDesigner only exist in [[Operator]]s (OPs or "nodes"). Parameter types include:
Line 11: Line 16:
 
* [[Network Path|paths]] to other nodes in TouchDesigner networks
 
* [[Network Path|paths]] to other nodes in TouchDesigner networks
 
* "pulse" buttons that initiate actions like running scripts
 
* "pulse" buttons that initiate actions like running scripts
* python objects - anything python object you can make using numbers, True/False values, strings, lists and dictionaries. The python objects have to be self-contained - they cannot refer to other operators or parameters, for example.
+
* python objects - any python object that you can make using numbers, True/False values, strings, lists and dictionaries. The python object has to be self-contained - it cannot refer to other operators or parameters, for example.
  
 
See the [[Component Editor|Component Editor]] to create custom parameters.
 
See the [[Component Editor|Component Editor]] to create custom parameters.
  
Fields in dialogs and options to commands are not parameters.
+
Parameters can be driven by [[:Category:Python|Python]] expressions when the [[Parameter Mode]] is in Expression Mode.
 
 
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.

Latest revision as of 21:31, 7 April 2021


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

  • numbers, both integer and floating point
  • number pairs, triples or quadruples (e.g. width and height, XYZ position, RGBA color)
  • on-off flags (toggles)
  • menus
  • text strings
  • paths to other nodes in TouchDesigner networks
  • "pulse" buttons that initiate actions like running scripts
  • python objects - any python object that you can make using numbers, True/False values, strings, lists and dictionaries. The python object has to be self-contained - it cannot refer to other operators or parameters, for example.

See the Component Editor to create custom parameters.

Parameters can be driven by Python expressions when the Parameter Mode is 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