Well, sure, if you need the "if" statement, you can just reverse the values.
But if all you need is the boolean result of it (for example, turn on or off
a disable knob based on whether you're in an interactive or batch session,
or choose from input 0 or 1 of a switch node), using $gui or !$gui as needed
is simpler, imo.

Ex: (turn "on" a disable knob only for renders)

!$gui

... is simpler and less redundant than ...

$gui?0:1

But this is splitting hairs, I think. At the end of the day it just needs to
be whatever you'll read / recognize better later on.



On Fri, Mar 11, 2011 at 5:51 PM, Aruna <inver...@d2.com> wrote:

> I don't usually like using !$gui.  I use $gui with  ? and : to form an if
> then else statement.. Useful for motion blur and switches and other items
> like disables. It's also a little more specific for me.
>
> Example:
> $gui?1:10  -->  If GUI is present, use 1, otherwise use 10
>
> Howard Jones wrote:
>
>> to explain for those that dont know this and possibly setting out my
>> ignorance
>>
>> '!' means 'not' in this case
>> so $gui is a variable  (constant?) that basically asks
>> is the gui (graphical interface) being used? if yes then True (or 1) and
>> if no then False (or 0)
>>
>> '!' then turns this on its head and says
>>
>> is the GUI NOT being used, true if yes and false if not
>>
>> So if you are using the gui and have
>> $gui in a disable knob it means turn this off when the gui is on and on in
>> bg rendering.
>> !$gui means turn this on when the gui is on and off in the bg (good for
>> overlay text that you dont want to render)
>>
>> You can use '!' to invert all sorts of user variables.
>>
>> H
>>
>> ------------------------------------------------------------------------
>> *From:* Ivan Busquets <ivanbusqu...@gmail.com>
>> *To:* Nuke user discussion <nuke-users@support.thefoundry.co.uk>
>> *Sent:* Fri, 11 March, 2011 18:59:39
>> *Subject:* Re: [Nuke-users] opposite of $gui
>>
>> !$gui?
>>
>> On Fri, Mar 11, 2011 at 10:56 AM, Randy Little 
>> <randyslit...@gmail.com<mailto:
>> randyslit...@gmail.com>> wrote:
>>
>>    Is there an opposite of using $gui?
>>
>>
>>    Randy S. Little
>>    http://www.rslittle.com <http://reel.rslittle.com>
>>
>>
>>
>>
>>    _______________________________________________
>>    Nuke-users mailing list
>>    Nuke-users@support.thefoundry.co.uk
>>    <mailto:Nuke-users@support.thefoundry.co.uk>
>>
>>    http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> Nuke-users mailing list
>> Nuke-users@support.thefoundry.co.uk
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>>
>
>
> --
> / aruna / 2d at d2 / x2477 /
>
> _______________________________________________
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
_______________________________________________
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to