© 2014 by GATIMEDIA

GM_SWITCH_HIGHLIGHT

This is a custom Switch node I made the help when I have a giant script where multiple things are getting precomped for efficiency. This node allows you to show custom text for each value and to toggle all the same nodes at once in the script.

WHICH/
Allows you to toggle between input `0` and input `1`.

0 IS/

You can type in the text you`d like to see on the node when input 0 is active.

1 IS/

You can type in the text you`d like to see on the node when input 1 is active.

SET ALL 0/

Switches all the `GM_Switch_Highlight` node in the script to `0`

SET ALL 1/

Switches all the `GM_Switch_Highlight` node in the script to `1` 

How does it work?

 

The core of the node is a TCL script placed in the `label` that uses two conditions:

 

[if {[numvalue this.which_highlight] == 0} {return [value this.zero_is]} else {return [value this.one_is]}]

This one is asking if the `which` knob`s value is zero. If so it returns the value you typed in for the `0 is` knob otherwise returns what is at `1 is`.

[knob tile_color [ expr { [value which_highlight]? 16711935 : 4294902015 }]]

The other part controls the tile color which is the color that the node has on the Node Graph. The numbers that are returning as value are hex colors and luckily Erwan Leray has done already a great job explaning them ( Here ).

Recommended way of use:

Hope you will find it useful! 

 

Here's the GitHub link ( just select the text and copy to Nuke )