I’m assuming you’re trying to make your call from your panel’s knobChanged() 
method. Because pushing your button causes Nuke to execute something, the main 
Python "execution" thread is already busy/blocked while it tries to run your 
code (and since it’s trying to queue/run a command in the execution thread – 
a.k.a. itself – while in the middle of something else, it fails).

A workaround solution can be found here:

http://forums.thefoundry.co.uk/phpBB2/viewtopic.php?t=5718

Hope this helps.

-Nathan



From: Marc Gutowski 
Sent: Wednesday, April 11, 2012 1:45 AM
To: [email protected] 
Subject: [Nuke-python] Execute in Main Thread Syntax Question

dear forum,

i can't explain myself the right syntax for the following command:

i have a panel with python button,
and want to execute the "reload" knob for a list of node,
but when executing it via tha panel, i get the 
known "i am already executing something else" error.

the line looks as follows:
      Code:  
      nuke.executeInMainThread( node.knob('reload').execute, () )  


has anybody a hint for me ?
what did i miss ?
i didn't find anything related on the net :/

thanks,
Marc


--------------------------------------------------------------------------------
_______________________________________________
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

Reply via email to