Because the enum value is used in the construction and storage of the knob, I would bet good money that ClassID() returns the correct value...
Based on the header comment for Class() ("This is currently only used for messages."), I don't think it's something to be relied on. -Nathan From: Johannes Saam Sent: Friday, January 23, 2015 5:39 PM To: Nuke plug-in development discussion Subject: Re: [Nuke-dev] Acessing user knobs Yeah the problem is that the Class() for both int and float knobs (if you use manage user knobs) is Array_Knob not Int_knob or Float_Knob so you are telling me that Class() and ClassID() is not the same?! I have to double check but i bet a beer that its both the same ID which is the Array_Knob class id.... On Fri, Jan 23, 2015 at 4:21 PM, Nathan Rusch <nathan_ru...@hotmail.com> wrote: Knob::ClassID() will return the value from the enum in Knobs.h that indicates its type. I think testing that is probably the best you can do, since Knob subclasses don't really exist in DDImage. -Nathan From: Johannes Saam Sent: Friday, January 23, 2015 4:12 PM To: Nuke plug-in development discussion Subject: Re: [Nuke-dev] Acessing user knobs I have one more QUESTION not a suggestion.... iterating over the user knobs now i am running into one problem... and i might just not understand the API correctely but i am stuck with the TYPES of the user knobs. For example the int and the float knob come in as Array_Knobs.... i am currently using ArrayKnobI and its array_size() function to find out if its a float 1 2 3 4 .... but Knob get_value is always a double? How do i figure out if i am dealing with an int knob? Other knobs are fine. Like the Enumeration_knob i know its an int and can act... same with the Color knobs. But whats going on with Int and Float knobs? I was assuming they would come back as Class() Int_Knob or Float_knob? also i can only get doubles with get_value() type converting doubles to bools is just resulting in lots of warnings under VS2010. What obvious thing am i missing here? Thanks! Jo _______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev -------------------------------------------------------------------------------- _______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
_______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev