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 25-06-2021, 03:53 AM
Registered User
Join Date: Jun 2021
Posts: 1

Variable from the sum of two variables

Hi folks, I'm learning MEL and having trouble understating what's going on here.

I'm trying to get a variable from the sum of another two variables defined by object attributes, for example:

float $scaleY = `getAttr "pCube1.scaleY"`;
float $scaleX = `getAttr "pCube1.scaleX"`;
float $sum = ($scaleY + $scaleX);
print $sum;

This gives me the correct result, but I'm getting this warning:

// Warning: float $scaleX = `getAttr "pCube1.scaleX"`; //
// Warning: Line 2.42 : Redeclaration of variable "$scaleX" shadows previous declaration at line 1. Previous value will be overwritten by explicit initializer. //

Where exactly I'm redeclaring variable $scaleX? Is the syntax wrong? If anyone have any suggestions it would be highly appreciated. Thanks!

Thread Tools Search this Thread
Reply to this thread
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