I'm getting that quite often whne I just quit Nuke normally anyway (mac), it 
may be a bug

 
Howard



>________________________________
>From: Kim Ranzani <[email protected]>
>To: Nuke Python discussion <[email protected]>
>Sent: Sunday, 7 August 2011, 15:00
>Subject: Re: [Nuke-python] running nuke.scriptExit() from a panel
>
>
>Hi there,
>
>I was having the same problem restarting nuke via a python panel button and 
>one workaround was to assign directly the function to the button itself like:
>
>self.restartButton.setValue('nuke.scriptClose()')
>
>this was working ok in 6.2 but in 6.3 something change and even if it works, I 
>got a nuke6.3v2 quit unexpectedly message which is quite annoying.
>
>I tried what Nathan said but without any luck, Is it possible to spawn the 
>proxy function from knobChanged? the proxy function has to be outside the 
>panel class or can be inside?probably im missing something... thanks in 
>advance,
>
>Kim
>
>
>2011/8/2 John RA Benson <[email protected]>
>
>I'll give it a shot -
>>thanks for the fast reply!
>>
>>JRAB
>>
>>
>>
>>On Aug 2, 2011, at 6:54 PM, Nathan Rusch wrote:
>>
>>> One thing that works is to have a proxy function that calls 
>>> nuke.executeInMainThread(nuke.scriptExit), and then spawn that proxy in a 
>>> new thread from within your callback function (thread.start_new_thread is 
>>> probably the simplest way to do this).
>>>
>>> Keep in mind that scriptExit will prompt to save the current script if it's 
>>> modified, so you may want to make sure you either save from your script 
>>> callback or call nuke.modified(False) before your scriptExit callback fires.
>>>
>>> -Nathan
>>>
>>>
>>> -----Original Message----- From: John RA Benson
>>> Sent: Tuesday, August 02, 2011 9:37 AM
>>> To: Nuke Python discussion
>>> Subject: [Nuke-python] running nuke.scriptExit() from a panel
>>>
>>> Hey there -
>>>
>>> I'm trying to exit a script, but the nuke.scriptExit() is being called
>>> from within a callback in a panel. The problem is that nuke won't quit,
>>> because it's executing something else - I think the knobChanged callback
>>> that has the nuke.scriptExit() code in it. Is there any workaround to
>>> force close and exit, pythonically?
>>>
>>> thanks
>>> JRAB
>>> _______________________________________________
>>> 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
>>
>>_______________________________________________
>>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
>
>
>
_______________________________________________
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