Jump to content

Parameter Interface Toggle


Follyx

Recommended Posts

I have a control object for assigning colors/materials to each object:

control.jpg.03dfb43af1a9d41838fe4dd31d2f2601.jpg

now I want to include an on/off toggle for (de)activating all materials/colors via the interface dialog at once. Whats the procedere for it? Even a hint for a button wouldnt help cause I'm not able to program the neccesary callbackscript.

Thanks in advance for any suggestions.

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...
On 9/1/2019 at 2:11 PM, Follyx said:

I have a control object for assigning colors/materials to each object:

control.jpg.03dfb43af1a9d41838fe4dd31d2f2601.jpg

now I want to include an on/off toggle for (de)activating all materials/colors via the interface dialog at once. Whats the procedere for it? Even a hint for a button wouldnt help cause I'm not able to program the neccesary callbackscript.

Thanks in advance for any suggestions.

 


 

 

Hello,You can simply put this Python Code that i have made and tested with the same setup you have created.

Below is the Callback Script to deactivate all materials and colors via the single click or disable toggle with tick:

kwargs['node'].parmTuple('outside').set(' '), kwargs['node'].parmTuple('first').set((0.0,0.0,0.0)), kwargs['node'].parmTuple('inside').set(' '), kwargs['node'].parmTuple('second').set((0.0,0.0,0.0)), kwargs['node'].parmTuple('third').set((0.0,0.0,0.0)), kwargs['node'].parmTuple('burned').set(' ')

Note: Please change the parmTuple name according to your node name. This Callback Script i have tried with the same setup or control box you have made. It's working with both Button and Toggle checkbox also.

Edited by Vishal Bakhaswala
Link to comment
Share on other sites

thanks a lot. I see, I should start with Python... but where to start outgoing from Houdini?

Sorry for the late reply, was busy.

Uhm, how I should integrate that? if I place a button on the control panel an paste the script (with parrmTuple changed to COPAN_CO_MAT (nodes name)) following error appear:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'ObjNode' object has no attribute 'PANEL_CO_MAT'

any idea?

Edited by Follyx
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...