Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 15-07-2011 , 06:52 PM
Registered User
Join Date: Jul 2011
Posts: 4

expressions/miultipleobjects

hi,
i just created these two expression, which basically calculated the distance between a sphere and a series of panels. then, when the distances is less than 3, the panels should rotate. the problem i am having right now is that each expression creates a new expression per each panel, so i am finishing with hundreds of expressions. is there any way to do it with out creating more expressions? i have tried creating strings, yet i am having problems assigning float values. i would appreciate any help.

//calculates distance
for($n in `ls -sl`){

expression -s ($n + ".distance = clamp (0,
(nurbsSphere1.scaleX),
sqrt((pow((translateX- nurbsSphere1.translateX),2))+(pow((translateY- nurbsSphere1.translateY),2))+(pow((translateZ- nurbsSphere1.translateZ),2))) );") -o $n -ae 1 -uc all ;
}

//panel rotation
string $sel[] = `ls -sl`;
for($object in $sel){
expression -s ($object + ".rotateX= (abs(distance-3))*20;;") -o $object -ae 1 -uc all;
}

# 2 16-07-2011 , 08:42 PM
n88tr's Avatar
Subscriber
Join Date: Jul 2009
Location: Netherlands
Posts: 188
would love to help but i know nothing about scripts/code
i would also suggest posting on the autodesk forums
gl


"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." -- Benjamin Franklin
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off