eYadNesS
01-06-2011, 08:11 PM
I wrote a simple flipping translateX script, the problem if the translateX is locked I got a warning message, and the script do not proceed .
How I can write an if statement to check if my translateX is lock or not, if its "not" do the flipping, if "yes" skip it.
i know how to write if statements, just i don't know the commands to check the attribute list.
This is a part of my script:
$selectObjectFlip =`ls -sl`;
float $translateX = `getAttr $selectObjectFlip.translateX`;
string $getTranlateX = $selectObjectFlip[0] + ".translateX";
setAttr $getTranlateX ($translateX * -1);
Thank you in advance.
How I can write an if statement to check if my translateX is lock or not, if its "not" do the flipping, if "yes" skip it.
i know how to write if statements, just i don't know the commands to check the attribute list.
This is a part of my script:
$selectObjectFlip =`ls -sl`;
float $translateX = `getAttr $selectObjectFlip.translateX`;
string $getTranlateX = $selectObjectFlip[0] + ".translateX";
setAttr $getTranlateX ($translateX * -1);
Thank you in advance.
