Introduction to Maya - Rendering in Arnold
This course will look at the fundamentals of rendering in Arnold. We'll go through the different light types available, cameras, shaders, Arnold's render settings and finally how to split an image into render passes (AOV's), before we then reassemble it i
# 1 20-05-2015 , 10:29 AM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095

expression via mel

Ahoi,


I have a question concerning expressions via mel script. for some reason it seems to work - no errors... but no expression is being written into the locators. (i have particle called pLetter_Zero. then want to figure out the particle-count, create as many locators and place them to each particle via expression)

any input is much appreciated!



int $partCount = `getAttr ("pLetter_Zero" + ".count") `;

for( $i=0; $i<$partCount; $i++ ) {

spaceLocator -n ("pLocator" + $i);
string $particleLocator[] = `ls -sl`;

string $exprX = ($particleLocator[0] + ".tx");
string $exprY = ($particleLocator[0] + ".ty");
string $exprZ = ($particleLocator[0] + ".tz");


string $cmd = " \
float $particlePos[] = `particle -id $i -at worldPosition -q pLetter_Zero`; \n\
$exprX = $particlePos[0]; \n\
$exprY = $particlePos[1]; \n\
$exprZ = $particlePos[2]; \n\
";

expression -s $cmd;

}


everything starts and ends in the right place at the right time.

Last edited by Falott; 20-05-2015 at 11:07 AM.
# 2 20-05-2015 , 12:04 PM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095


everything starts and ends in the right place at the right time.
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

Similar Threads