Difference between revisions of "ParCollection Class"

From TouchDesigner Documentation
Jump to: navigation, search
m
 
Line 29: Line 29:
 
*name - Must be an exact string name. Wildcards are not supported. If not found None is returned.
 
*name - Must be an exact string name. Wildcards are not supported. If not found None is returned.
 
<syntaxhighlight lang=python>
 
<syntaxhighlight lang=python>
p = op('base1').par['MyFloat5']
+
p = op('base1').par['Myfloat5']
 
</syntaxhighlight>
 
</syntaxhighlight>
 
}}}}
 
}}}}

Latest revision as of 12:37, 25 May 2020

The ParCollection class can be used to access parameters. To access a parameter you need to use its internal name, which you can obtain by hovering your mouse over the parameter name, and looking at the popup that will come up. See also Par Class.


Members[edit]

This object contains a member for each parameter in the component. You can both read the value using:

a = op('geo1').par.tx

You can also change the value using

a = op('geo1').par.tx = 4
a = op('geo1').par.lookat = 'null1'

ownerOP (Read Only):

The OP to which this object belongs.

Methods[edit]

[name]Par:

Parameters may be easily accessed using the [] subscript and assignment operators.

  • name - Must be an exact string name. Wildcards are not supported. If not found None is returned.
p = op('base1').par['Myfloat5']

TouchDesigner Build:

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.