Thanks for the help, yes that is a boolean knob I was creating to use in the
project settings panel.  The {}'s work and I also had to make sure not to
have any spaces.

    nuke.root().addKnob(nuke.Boolean_Knob("oflowControl", "OFlow Control"))
    nuke.knobDefault('OFlow.disable', '{root.oflowControl&&$gui?1:0}')

On Tue, Jul 19, 2011 at 8:13 AM, Nathan Rusch <[email protected]>wrote:

>   I’m assuming ‘oflowControl’ is a Boolean knob you added. In that case,
> try:
>
> nuke.knobDefault('OFlow.disable', '{root.oflowControl}')
>
> -Nathan
>
>
>  *From:* Troy Moore <[email protected]>
> *Sent:* Monday, July 18, 2011 6:07 PM
> *To:* [email protected]
> *Subject:* [Nuke-python] setting knob defaults to an expression
>
> I am trying to set a knobDefault to an expression and while that seems easy
> enough, I can't seem to get it to work with
> nuke.knobDefault("class","value").
>
> For example:
> nuke.root().addKnob(nuke.Boolean_Knob("oflowControl", "OFlow Control"))
> nuke.knobDefault("OFlow.disable", "root.oflowControl")
>
> Doesn't set the disable knob to anything...
>
> Am I missing something or are there any clever workarounds that people have
> come up with for something like this?
>
> ------------------------------
> _______________________________________________
> 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