FORUMS: list search recent posts

[MEL] Save Name of Object for later

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Mohammad Taha
[MEL] Save Name of Object for later
on Apr 12, 2017 at 12:49:18 pm

Hi, is me again ☺

Somehow I'm doing somethink wrong and hope for help.

Lets say my scene has 2Objects. I want to select them and rename them for a long script of my. To keep it easy i would like to give one a name and at the end rename them back to the original name .

Somethink like that:

string $myObject[] = `ls -sl`;
string $A = $myObject[1];
print ("Original: "+$A+"\n");
rename $myObject[1] ObjectNewName;
print ("NewName: "+$myObject[1]+"\n");
$myObject[1] = $A;
print ("BackOriginalName: "+$myObject[1]+"\n");


But what he is doing, i lose the input for $A at the moment when the code starts
rename $myObject[1] ObjectNewName;

Any idea?
Thx
Mohammad


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]