[Sidefx-houdini-list] Problems with toggle in otl

Johnson, Dave (Space Technology) dave.johnson at ngc.com
Tue Jan 10 10:56:48 EST 2006


If you want the toggle to switch between two different operators inside your object, you could put in a switch SOP and have the toggle control the "input" parameter of that SOP. Then set the display to the switch SOP and it will always show one or the other of its inputs.

If you want to switch between two objects (say in a DA), then use the Display parameter that Robert was mentioning. 

Then put the channel reference in the Display channel of the object to be 1 or 0, depending on the state of the toggle. If you want it to be the opposite of the toggle, then use:
 
(1-ch("pathtothetoggle"))

Both of these methods avoid using callbacks.

Hope this helps.


-----Original Message-----
From: sidefx-houdini-list-bounces at sidefx.com on behalf of Robert Magee
Sent: Mon 1/9/2006 10:15 AM
To: sidefx-houdini-list at sidefx.com
Subject: Re: [Sidefx-houdini-list] Problems with toggle in otl
 
Objects have a display parameter that you can use instead of the display 
flag. It is found in the Render tab on a geo object and the Subnet tab 
of a subnetwork. Simply click on the checkbox to use this parameter in 
place of the display flag then write a channel reference from here to 
your asset's toggle.

I'm not sure if this is what you are looking for but this is what I 
would do in this case.

Robert Magee
Product Marketing Manager
Side Effects Software Inc.

Rick Walia wrote:

> Correction on the expression:
> if(show_node1, opset -d on `oppwf()`/node1, opset -d on `oppwf()`/node2)
>
> Thanks!
>
>
> Rick Walia wrote:
>
>> I'm having some troubles with toggle paramerters in otls.
>>
>> Basically I want to toggle the diplay between 2 different operators.
>> If toggle is on, show node 1, if toggle is off show node 2.
>>
>> Well this is the way I would expect a toggle to behave, no?
>>
>> I have a toggle param called show_node1. The default value is 1.
>> In the callback section of this toggle I have the following expression:
>>
>> if(show_curve, opset -d on `oppwf()`/node1, opset -d on `oppwf()`/node2)
>>
>> Currently the above does nothing? Any suggestions would be appreciated.
>>
>> Cheers,
>>
>
>
>

_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list




More information about the Sidefx-houdini-list mailing list