Well, in this case I need to use it for the same reasons they are used in C++: 
avoiding backwards-compatibility problems with Gizmos.

Howard: it's basically a stub knob that you add to prevent scripts from choking 
when they are loaded due to 'no knob named foo' errors. However, they can also 
execute arbitrary pieces of TCL code when someone or something tries to set 
their value.

Ah well, time for another support ticket...

Thanks,

-Nathan

On Jun 15, 2012, at 3:46 AM, "John RA Benson" <john.benson.macg...@gmail.com> 
wrote:

> I'm not sure anyone wants to use an obsolete knob, but it's easy to bump into 
> it:
> 
> c = nuke.createNode('Camera2')
> c['world_matrix']
> #
> Result:
> <IArray_Knob object
> at 0xbe640a8>
> Ok, cool, that's the type of knob I wanted. I'll add that knobtype to the 
> fancy gizmo I'm making:
> IAK = nuke.IArray_Knob('bla', 'bla')
> myFancyGizmo.addKnob(IAK)
> 
> Ok, added fine. Now let's use it... <copy/paste, open script, etc>
> Doh! What happened? 
> 
> jrab
> 
> Howard Jones wrote:
>> 
>> out of interest what is an obsolete knob used for anyway?
>>  
>> Howard
>> 
>> From: John RA Benson <john.benson.macg...@gmail.com>
>> To: Nuke Python discussion <nuke-python@support.thefoundry.co.uk> 
>> Sent: Friday, 15 June 2012, 8:02
>> Subject: Re: [Nuke-python] Properly creating Obsolete Knobs
>> 
>> You are definitely not crazy - at least concerning your question.
>> 
>> The fun part is creating a knob that you didn't know is Obsolete (Array?) 
>> and the KnobType somehow changes from what the docs say should be 9 to the 
>> Obsolete value of 0. 
>> 
>> I just noticed in 6.3v5 that at least when pasted, the knob didn't drop out, 
>> but it became +INVISIBLE when pasted. So maybe since whatever knob you 
>> created ended up being a 0, it wouldn't accept a matrix or string or 
>> whatever values a type 0 accepts? Turning off the +INVISIBLE, the array knob 
>> i created shows up as an [Unlinked LinkKnob]... 
>> 
>> jrab
>> 
>> Nathan Rusch wrote:
>>> 
>>> Am I crazy, or is it impossible to create an Obsolete Knob properly without 
>>> using C++?
>>>  
>>> The GUI method just eats whatever script you set to run when the knob is 
>>> set, and the Python wrapper exposes no functionality for setting up an 
>>> execution script. Thus, when the knob is loaded/pasted, it generates an 
>>> error, a la:
>>>  
>>> "Obsolete_knob foo call is wrong, probably missing NULL for script 
>>> argument."
>>>  
>>> -Nathan
>>> 
>>> _______________________________________________
>>> 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
>> 
>> 
>> 
>> _______________________________________________
>> 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

_______________________________________________
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

Reply via email to