Receiving a Python random number as 'CHOP value'

Is there a way to apply a number outputted by Python to the ‘value’ of something like ‘Constant OP’?"
Random_Number_Generator.tox (1.3 KB)

Hello @tg50231,

welcome to the community.
The value of a Constant CHOP is set via its value parameter. This can be set via python like this:

op('constant_someName').par.const0value = randomNumber

Also have a look at our curriculum at learn.derivative.ca - there is a great primer section for python and TouchDesigner.

Hope that helps
cheers
Markus

1 Like

Thank you so much :smile: