hello, you can add an expression to you the knobChanged of your node, like:
set cut_paste_input [stack 0] version 7.0 v5 push $cut_paste_input NoOp { name NoOp1 knobChanged "\nn=nuke.thisNode()\ntc=n\['tile_color']\nk=n\['color'].getValue()\nenumColor = \[ \[1, 0, 0] ,\[0, 1, 0] ,\[0, 0, 1] ,\[1, 1, 0] ]\nr = enumColor\[int(k)]\[0]\ng = enumColor\[int(k)]\[1]\nb = enumColor\[int(k)]\[2]\nhexColour = int('%02x%02x%02x%02x' % (r*255,g*255,b*255,1),16)\ntc.setValue(hexColour)\n" tile_color 0xff000001 selected true xpos -262 ypos -214 addUserKnob {20 User} addUserKnob {4 color M {red green blue yellow ""}} } Hope this help! Olivier 2014-03-15 15:37 GMT-04:00 Bruno-Pierre Jobin <bpjo...@gmail.com>: > Hello Nukers, > > I'm trying to find a way to change the color of a node (title_color) which > would be driven by cascading pulldown choice menu. For example, if the > first item is chosen, the node would be yellow and if the second one is > chosen, it would turn blue. > > I found this thread in the mailing list archive but I can't figure out > where to paste that code... > > > https://www.mail-archive.com/nuke-users@support.thefoundry.co.uk/msg03405.html > > I'm very new to python so please give a lot of details. > > Thanks! > -- > Bruno-Pierre Jobin > > > _______________________________________________ > Nuke-users mailing list > Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >
_______________________________________________ Nuke-users mailing list Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users