using the following tcl script you can get the index of a knob: index = nuke.tcl('knob', '-t', knob.node().name() + '.' + knob.name()
the index is the corresponding knob enum index from knobs.h so 2 is int, 6 is boolean, etc... - josh On Mon, Mar 25, 2013 at 8:36 PM, Hugh Macdonald <li...@hughmacdonald.co.uk> wrote: > Hi all, > > I'm trying to figure out how to tell the difference between certain knob > types on a gizmo... > > When querying a knob in Python, I can't tell the difference between a Float, > Size and Int knob. Now there doesn't seem to be much difference between a > Float and a Size knob anyway, but there is obviously a difference, at least > in the GUI, between a Float and an Int knob. > > All of them return "Array_Knob" from Class(), and I can't find any > difference from any of the other calls I can make on the knobs. > > Any idea how I can tell the difference? > > > Thanks > > Hugh > > _______________________________________________ > 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