MEL tool for copying attirbiutes, help needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone.
I am working on a simple tool that would copy selected attributes from one frame to the other. Still, it seems like I cannot get it to work, I am trying to make a procedure that would make an array of values depending on whether the checkbox was ticked or not so that I could paste it later on. Here is the code, any help appreciated:
proc GetAttrTx ()
string $selection[] = `ls -sl`;
for($eachObj in $selection)
if ($checkboxA > 0)
{string $tx[] =`getAttr ($eachObj + "tx")`;
print $tx [0] ;
else if ($checkboxA ==0)
print("CheckBox is not checked\n")};
string $getsetWindow;
if (` window -ex $getsetWindow`) {
deleteUI -window $getsetWindow;
}
string $getsetWindow = `window -t "Get Set Keys" -s 1 `;
columnLayout ;
text -label "Get/Set Attribute Tool by JenniferDzielo \n Enjoy! " ;
rowColumnLayout -nc 3;
string $a = `checkBox -label "translate.x" -v 1`;
string $b = `checkBox -label "translate.y"-v 1`;
string $c = `checkBox -label "translate.z"-v 0`;
string $d = `checkBox -label "rotate.x"-v 1`;
string $e = `checkBox -label "rotate.y"-v 1` ;
string $f = `checkBox -label "rotate.z"-v 1` ;
int $checkboxA = `checkBox -q -v $a` ;
int $checkboxB = `checkBox -q -v $b` ;
int $checkboxC = `checkBox -q -v $c` ;
int $checkboxD = `checkBox -q -v $d` ;
int $checkboxE = `checkBox -q -v $e` ;
int $checkboxF = `checkBox -q -v $f` ;
rowColumnLayout -nc 2;
button -label "GET" -h 30;
button -label "SET" -h 30;
showWindow $getsetWindow;
checkBox -q -v $c ;