Hey Ivan, thanks for the quick reply re: Array Knobs,

I've solved the issue (with Color_Knob) in a different way, it's as simple
as using a the number of arguments supplied to .setValue()

e.g.
nuke.selectedNode()['knob'].setValue(1.0) # results in single value
Color_Knob
nuke.selectedNode()['knob'].setValue(2, 1.0) # results in multi-value
Color_Knob

It's one of those obscure things I leave for a while, forget how it works,
then get frustrated all over again digging through the documentation. It's
too simple!


On Wed, Oct 16, 2013 at 4:05 PM, Ivan Busquets <[email protected]>wrote:

> Array knobs have a "setSingleValue" method.
>
> <knob>.setSingleValue(True)
>
> check for the help on the Array_Knob:
>
> help(nuke.Array_Knob)
>
>
>
>
>
>
> On Tue, Oct 15, 2013 at 7:54 PM, Jordan O <[email protected]> wrote:
>
>> Hey fellow Nuke TDs,
>>
>> This is an issue that has stumped me for a while. I've gone through the
>> methods, the knob documentation, and the flags, and just can't seem to
>> figure out how to set a knob array size.
>> (e.g. when you click on the "3" or "4" and collapse / expand it from 1
>> value)
>>
>> Is there a way to do this pythonically?
>>
>> test code :
>>
>> nuke.selectedNode().addKnob( nuke.Color_Knob('asdf') )
>> # gives you a colour knob with the "3" button enabled and the values
>> split. I want to see 1 value..
>>
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> 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
>
>
_______________________________________________
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