Can I change the state of a Toggle Chop from some other source in addition to a Panel Chop?
I have a toggle button that starts and stops playback. When i hit a different reset button, in a separate container, and the toggle is set to 1, how can I set that toggle to 0 with a chop exec?
If you are using a Button COMP (button type set to: toggle down) you can change its state by toggling the value0 parameter.
In python in your chop exec DAT that would be:
op("button1").par.value0 = 0
1 Like
I am using a panel>logic chop>null>chopexec and this code in another buttons chopexec and it doesn’t work:
op('../playBtn/logic1').par.value0 = 0
I dunno how to make a code block in the forums…
edit: there is an extra (3total) period in there coming from somewhere, i bet once i put it in a code block it looks correct. there is only two periods.
Yeah as I said, my code was only valid if you are using a Button COMP.
So you are using a Container COMP as a Button, with Panel CHOP monitoring it, and that to a Logic CHOP set to “toggle”? Then clicking the Container COMP again should do it?
op("container1").click(0.5, 0.5)
See ContainerCOMP Class | Derivative
Ps you can make a code block by selecting text and clicking the </> icon
Thanks but I don’t want to activate/toggle the button as a whole with a sim click, just set the toggle to the value of zero. I really appreciate your help.
I was trying to make all my own buttons and sliders for practice, but because the solution you mentioned works and is super easy, I just went with that so thanks, I can move on.