Int_Knob is most certainly not deprecated. The issue stems from the fact that Python knob wrapper classes are still really disconnected from the functionality of the C++ Knob API, and the "Manage User Knobs" dialog is also limited or just strange in completely different ways. Besides there being a lot of knob types without any sort of higher-level wrapper type in Python, there are also still idiosyncrasies like what you've run into. These types of issues have been around essentially since the first incarnation of Python in Nuke, but it seems no one on the development side has noticed or cared enough to prioritize them.
As far as I know, the only thing you can do it make some more noise with support. I have a ticket from December 2012 about this specific class of issues if you want to mention something really old: Bug 32986 - Knob lookups return improper Python types -Nathan On 11/8/2016 1:34 AM, Colin Alway wrote: > Hi > > Can anyone tell me how to create an Array_Knob which behaves like an > Int_Knob ? I've noticed that if you make an 'Integer Knob' on a node > through 'Manage User Knobs...' what you actually get back is an > Array_Knob, with settings to behave like an int. > > But if in python you create an Int_Knob and attach it to a node, you > get what python calls an Int_Knob, until that is you copy/paste or > save/load the node - at which point it becomes an Array_Knob too. > > This has caused a minor problem here because Int_Knob get/set methods > work on ints, while Array_Knob works with floats. Imagine a > knob-by-knob copy of values from a duplicated node back to its > original before the script has been saved - when you get to an > Int_Knob you get an error: > > TypeError: integer argument expected, got float > > Is Int_Knob deprecated? I couldnt see anything in the docs about that. > > thanks > > -- > colin alway > > > > > > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python