After watching Matthew Ragans THP 494 & 598 | The Timer CHOP | TouchDesigner - YouTube second example I thought that there is also a nifty idea for a “Run at least n seconds”-Button.
For Example: You have to record a Video but it has to be at least 5s long but not longer than 20s
So I’d set the first timer on 5s, and the second on 15s.
So far so good. But for the first Timer I’d like to lock the Button, so that the User cant toggle it off.
And thats where I an into a eighter conceptual problem or sth.
Forcing the internal state of the button whileTimerActive
or onCycle
in a way like: op('recordVideo_button1').panel.state = 1
won’t disable the button, obviously.
So I tried to disable the panel onStart
via op('recordVideo_button1').panel.enable
and enable it onDone
of the first timer.
But here im just getting an Error that the PanelValue of the Button is read only.
Then I tried to script the enable
option of the button itself with True if op('timer1')['running'] == 0 else False
which works flawlessly.
So I guess my question here is why is this option readOnly
for other ops/skripts? And can I find a reference for other parameters that behave like this?