Re: [Nuke-users] Switch title_color of a node through drop down menu

2014-03-15 Thread debowinkle .
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,

Re: [Nuke-users] Switch title_color of a node through drop down menu

2014-03-15 Thread Frank Rueter|OHUfx
Here is something to get you started: http://pastebin.com/2SbLf5PH This adds a callback for nodes of class "NoOp", which you will have to change to react to your gizmo class or whatever other node you want this to work with. Have

Re: [Nuke-users] Switch title_color of a node through drop down menu

2014-03-15 Thread Bruno-Pierre Jobin
Awesome! Thanks guys I'll have a look at this! On Sat, Mar 15, 2014 at 5:03 PM, Frank Rueter|OHUfx fr...@ohufx.com wrote: Here is something to get you started: http://pastebin.com/2SbLf5PH This adds a callback for nodes of class NoOp, which you will have to change to react to your gizmo

Re: [Nuke-users] Switch title_color of a node through drop down menu

2014-03-15 Thread Jed Smith
It is also worth mentioning that knobChanged callback code can be specified in the menu.py file, applying to an entire node class, or knobChanged code can be stored and run in specific nodes only.To store knobChanged code in a specific node, you can store the code to a special

Re: [Nuke-users] Switch title_color of a node through drop down menu

2014-03-15 Thread Frank Rueter|OHUfx
indeed. that is the difference between Oliver's and my replies. This code is executed constantly, so be very careful to put most of your code in conditionals with the relevant knob name, and keep it simple. Otherwise your scripts can really grind to a halt!

Re: [Nuke-users] Switch title_color of a node through drop down menu

2014-03-15 Thread olivier
you are right Frank, thanks it's better to add condition test to the nodeChanged of the node with a pulldown knod added. In this sample :red, green, blue, yellow code=''' k=nuke.thisKnob() if k.name() == 'color': tc=n['tile_color'] c=k.getValue() enumColor = [ [1, 0, 0] ,[0, 1, 0]