- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am having issues with MEL Script being a rookie in that.
I am trying to make some selected cubes (thousands) scale when ever they reach a certain Translate.
Here is the MEL I am working on :
string $selectedList[] = `ls -sl`;
string $currentObject;
for ($currentObject in $selectedList)
{
if ($currentObject + ".translateY" > 17) ;
{
$currentObject + ".scaleX"=0;
$currentObject + ".scaleX"=0;
$currentObject + ".scaleX"=0;
else {
$currentObject + ".scaleX"=1;
$currentObject + ".scaleX"=1;
$currentObject + ".scaleX"=1;
}
}
Maya report a lot of syntax error that I can't fix. Can someone help me ?
// Error: if ($currentObject + ".translateY" > 17) ;
//
// Error: Line 6.48: Illegal operation ">" on data of type string. //
// Error: $currentObject + ".scaleX"=0;
//
// Error: Line 8.36: Syntax error //
// Error: $currentObject + ".scaleX"=0;
//
// Error: Line 9.36: Syntax error //
// Error: $currentObject + ".scaleX"=0;
//
// Error: Line 10.36: Syntax error //
// Error: else {
//
// Error: Line 12.20: Syntax error //
// Error: $currentObject + ".scaleX"=1;
//
// Error: Line 14.36: Syntax error //
// Error: $currentObject + ".scaleX"=1;
//
// Error: Line 15.36: Syntax error //
Solved! Go to Solution.