Thanks Micheal, works great!

--X

On Wed, Aug 3, 2011 at 7:56 PM, Michael Havart <[email protected]>wrote:

> I mean evaluate a python command in the tcl expression
>
>
> On 3 August 2011 10:53, Michael Havart <[email protected]> wrote:
>
>> hi there,
>>
>> I would do it in python:
>>
>> [python os.getenv('USER') == 'xavierb']
>>
>> return 1 if true or 0 if false.
>>
>> cheers,
>> Michael
>>
>> On 3 August 2011 10:39, Xavier Bourque <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I'm trying to setup a switch that turns on and off depending on the value
>>> of a shell environment variable.
>>>
>>> I can access the variable using getenv or $env, but I'm not sure how to
>>> evaluate strings in Nuke's expressions.
>>>
>>> For instance, if I want to evaluate in a switch node if the current user
>>> name is "xavierb", I expected one of these to work:
>>>
>>> $env(USER) == "xavierb" ? 0 : 1
>>> [getenv USER] == "xavierb" ? 0 : 1
>>>
>>> In both cases I get an error.
>>>
>>> How can you evaluate strings inside Nuke nodes?
>>>
>>> Thanks for any tips!
>>>
>>> --Xavier
>>>
>>> _______________________________________________
>>> Nuke-users mailing list
>>> [email protected], http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>
>>
>>
>
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to