Ok here is my fix if anyone interessted

All my knobs were picked from a node inside the group/gizmo. No matter
what I tried, the dummy knob was always returning the default value.
Instead, i created the dummy knob ONthe group instead of picking one
from inside the group. The knobs on the group seems to be evaluated
before the ones in the group so my hack is now working





On Mon, Feb 6, 2012, at 12:21, Hugo Léveillé wrote:
> To add to my previous mail, my B knob seems to return the default value
> while the A knob is evaluated. How could I change the evaluation order
> so that when the knobchanged of the Aknob happens, the B knob is not at
> its default value but from the saved state ?
> 
> 
> 
> 
> 
> On Mon, Feb 6, 2012, at 10:38, Hugo Léveillé wrote:
> > Hey
> > 
> > I am having a problem with a knobchanged in one of my gizmo. I have a
> > knobchanged that is triggered by a file path. The callback looks for
> > infos in a database to fill some infos in the gizmo. The problem is that
> > everytimes the gizmo is loaded when the script loads, the knobchanged is
> > triggered and the request to the database is made. Im sure you can see
> > how this can be a problem when the script is loaded on the farm and that
> > the script contains multiple instance of that gizmo...
> > 
> > That said, I am trying to bypass the problem by storing the value of the
> > knob (knob A) in a dummy hidden knob (knob B).With that, knob B would be
> > use to compare the value of knob A before the knobchanged. If the values
> > are the same, do nothing, else, do the callback and update B to the same
> > value of A.
> > 
> > The problem is that when the script loads, if I print B, Nuke says the
> > value is empty. But sure enought when the script is loaded, the value is
> > set.
> > 
> > 
> > So the questions are:
> > 
> > 1) Is there a way to get the value of a knob before the kobchanged
> > happened without having to store it in a dummy knob
> > 2) What could cause a knob to be empty at load time and then be set when
> > the script is loaded
> >  
> > 
> > 
> > -- 
> >   Hugo Léveillé
> >   TD Compositing, Vision Globale
> >   [email protected]
> > 
> > _______________________________________________
> > Nuke-python mailing list
> > [email protected], http://forums.thefoundry.co.uk/
> > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
> > 
> 
> 
> -- 
>   Hugo Léveillé
>   TD Compositing, Vision Globale
>   [email protected]
> 
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
> 


-- 
  Hugo Léveillé
  TD Compositing, Vision Globale
  [email protected]

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

Reply via email to