Well, I wasn't in front of the computer before, and seems like there isn't
a number only knob to inherit for the panel object.
I tried this:

p = nuke.Panel( 'how many dudes?' )
p.addExpressionInput('dudes', '')
p.show()
result = p.value('dudes')
print p.value('dudes')

And it works, but you can type anything in there. Not just a number.
Anybody knows a knob that only expects numbers?

Ron Ganbar
email: [email protected]
tel: +44 (0)7968 007 309 [UK]
     +972 (0)54 255 9765 [Israel]
url: http://ronganbar.wordpress.com/



On 15 May 2012 20:27, Ron Ganbar <[email protected]> wrote:

> You can use a panel and create a knob that only permits numbers.
>
> R
> On May 15, 2012 6:20 PM, <[email protected]> wrote:
>
>> Hiya.
>> I Am looking for the way the get a pop up window asking me a value.
>> I cheated by using
>> val = int(nuke.getInput('enter the ref frame'))
>>
>> wich is normally a text box
>> is there a better way for numbers ? I mean that will warn if something
>> else than a number is entered
>>
>> cheers
>> Olivier
>> ______________________________**_________________
>> Nuke-python mailing list
>> Nuke-python@support.**thefoundry.co.uk<[email protected]>,
>> http://forums.thefoundry.co.**uk/ <http://forums.thefoundry.co.uk/>
>> http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/**nuke-python<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