try this

import nuke

myPanel = nuke.Panel("Input Panel")

myPanel.addSingleLineInput("Show: ", "")

userInput = nuke.getInput( 'Setup: ', 'Your Shot name' )

if userInput and userInput !='Your Shot name' :

print "Show : %s " % userInput

else:

print "User Selected Cancel"

On Fri, Aug 3, 2012 at 8:29 AM, varun <[email protected]>wrote:

> **
> n00bish question
>
> I have this:
>
> myPanel = nuke.Panel("Input Panel")
> myPanel.addSingleLineInput("Show: ", "")
> userInput = nuke.getInput( 'Setup: ', 'Your Shot name' ).replace( ' ', '')
>
> How do I tell nuke, that if the user hits Cancel, then ignore everything
> and run nuke normally without listening to the userInput value?
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>


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