Follyx Posted September 1, 2019 Share Posted September 1, 2019 I have a control object for assigning colors/materials to each object: 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. Quote Link to comment Share on other sites More sharing options...
Vishal Bakhaswala Posted September 16, 2019 Share Posted September 16, 2019 (edited) On 9/1/2019 at 2:11 PM, Follyx said: I have a control object for assigning colors/materials to each object: 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 September 16, 2019 by Vishal Bakhaswala Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 22, 2019 Author Share Posted September 22, 2019 (edited) 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 September 22, 2019 by Follyx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.