Hey Javier,
They way I'd set up something like that is with two callbacks: a
knobChanged, and an autolabel:
def onInputChangeCallback():
if nuke.thisKnob().name() == 'inputChange':
nuke.frame(nuke.frame() + 1)
nuke.addKnobChanged(onInputChangeCallback)
def autolabelCallback():
if nuke.thisKnob().name() == 'inputChange':
if node_input == XX:
return 'XXXX'
else:
return 'YYYY'
nuke.addAutolabel(autolabelCallback)
So, one's not triggering the other, but they're both triggered by
'inputChange'. I guess you could do your frame advance in the autolabel
callback, but I read somewhere that autolabel functions are triggered as low
priority, hence the knobChanged callback.
Hope this helps.
-Ean
On Wed, Sep 14, 2011 at 10:34 PM, Javier Garcia <[email protected]> wrote:
> Hi,
>
> I need to trigger the autolabel callback from other callback, for example:
>
>
> def onInputChangeCallback():
>
> nuke.frame( nuke.frame() + 1 )
>
> # this line will trigger the autolabel callback but also will change the
> current frame, nuke.frame( nuke.frame() ) doesn´t work.
>
>
>
> def autolabelCallback():
>
> if node_input == XX:
>
> return 'XXXX'
>
> else:
>
> return 'YYYY'
>
>
>
>
> thanks.
>
> J
>
>
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python