Using condition expression on multiple objects

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  05 May 2011
Using condition expression on multiple objects

Hey guys,

Basically what I am after is a way of running the following expression on multiple objects ...

if( polySurface2.rotateZ < 179 )
polySurface2.visibility = 1 ; else polySurface2.visibility = 0




so here is the mel command that give me Syntax error :

for($n in `ls -sl`)
{

expression -s ($n + ".visibility = if( " + $n + ".rotate < 179 ) { "
+ $n + ".visibility = 1 ) else " + $n + ".visibility = 0 };")
-o $n -ae 1 -uc all ;
};


Many thanks in advance.....

boz.

Last edited by boazsunim : 05 May 2011 at 06:17 PM.
 
  05 May 2011
for($n in `ls -sl`) {
expression -s ("if (" + $n + ".rotateX < 179)\n\t " + $n + ".visibility = 1;\nelse \n\t" + $n + ".visibility = 0;\n") -o $n -ae 1 -uc all ;               
}     
__________________
Michiel
http://thnkr.com
 
  05 May 2011
Thank you so much! It works now!

boz.
 
  05 May 2011
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:37 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.