You could force a refresh when the root node finishes setting up.  If you 
have some function "refreshMyPanel" to pull values from the root, try adding 
this to your init.py:

nuke.addOnCreate(refreshMyPanel, nodeClass='Root')

   For safety, I'd make sure the panel existed in case the order of creation 
ever flips around, but that should cover the case where your root is created 
after your panel.

Brett


From: Bertrand Lempereur <[email protected]<mailto:[email protected]>>
Reply-To: Nuke Python discussion 
<[email protected]<mailto:[email protected]>>
Date: Mon, 2 May 2011 16:47:40 +0200
To: Nuke Python discussion 
<[email protected]<mailto:[email protected]>>
Subject: [Nuke-python] Creation of Panels with template.nk

Good day,

As i'm implementing a panel toolset in production, i've got some issues.

My panel is on creation retrieving informations from nuke.Root().
Everything works fine by letting the user create the panel. But not when i 
implement the panel in a "template.nk" file after register it.
The layout is set before the loading of the Root informations, so every 
informations that i attempt to reach through my panel is always set to 0 .

Any ideas on how to bypass this?

Regards,

--
Bertrand Lempereur
TD at Mikros Image

_______________________________________________ Nuke-python mailing list 
[email protected]<mailto:[email protected]>
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to