Hi
Ok that makes sense though in this case undesired. Thanks for the clarification.
H
________________________________
From: Alexander Jones <[email protected]>
To: Nuke Python discussion <[email protected]>
Sent: Wed, 4 May, 2011 15:07:27
Subject: Re: [Nuke-python] Knobchanged running on script load
Hi
knobChanged gets fired as part of the node setup
YourNode {
foo bar
}
will first create a default YourNode, then set knob 'foo' to 'bar' firing a
knobChanged.
onCreate gets fired at the end of the node setup, which I found surprising, but
this may be useful to you here if you get creative. not sure if the input
connections are made before or after onCreate, though...
On 4 May 2011 08:28, Howard Jones <[email protected]> wrote:
Hi
>I have a simple knobchanged script, basically something like...
>If thisknob() == theknob:
> If not input(2) and checkbox:
> nuke.message('connect input')
>
>ie if someone turns on checkbox it checks for an input and asks for one if not
>connected. Works fine even if syntax above wrong (from memory).
>
>However I'm finding that on script load, this is being evaluated, and thinks
>nothing is attached, and asks to connect, even though it is connected.
>
>I can understand there being a problem with input2 while the script is
>loading,
>but I can't see why it should evaluate the knobchanged at this point, at least
>wouldn't it be better if it wasn't? I suspect it's related to position
>triggering the call back
>
>Bug or my crappy python?
>Howard_______________________________________________
>Nuke-python mailing list
>[email protected]
>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
--
Alexander Jones
Double Negative R&D
www.dneg.com_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python