検索 - User list
Full Version: Button parameter to change the input of a switch node
Root » Technical Discussion » Button parameter to change the input of a switch node
Moritz1801
Hi there,

For a tool that I'm building, I need to have a switch node (with two inputs) switch from the current input to the other. This has to be driven by a button press on my hda. Im not good with python or hscript but i tried everything i could think of (python callbacks on the button, python modules in the hda that the button refers to, hscript links, trying to make a button increment an integer and have the integer parm toggle a switch-if node...) but nothing works. I know, a button parameter is not intended to drive a switch node but I'm trying to hook it up to a "renderexec" button of a renderrop.

Thank you guys in advance
vikus
Hi read the current value of the switch input parm and set a negated value each time you press the button. Result is same as using a toggle.

Image Not Found
Moritz1801
vikus
Hi read the current value of the switch input parm and set a negated value each time you press the button. Result is same as using a toggle.

Image Not Found

That works like a charm, Thank you so much.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB