quadrille
06-11-2012, 05:43 PM
I'm pretty new to MEL and trying to make a script that automates some rather tedious tasks.
I have a for loop running through the selection and I would like parts of the script to execute only if the current object has certain attributes keyable.
It sounds simple enough, but I can't seem to figure out how to use the attributeQuery command properly with an if statement (if this is even the way to do it?).
My attempt so far looks like this:
if (`attributeQuery -node pCube1 -keyable translateX` == true){
print "translate X is keyable";
}
I get the same result whether or not the attribute is keyable.
Can anyone give me an example of an if structure that checks if a certain attribute is keyable?
Thanks in advance!
I have a for loop running through the selection and I would like parts of the script to execute only if the current object has certain attributes keyable.
It sounds simple enough, but I can't seem to figure out how to use the attributeQuery command properly with an if statement (if this is even the way to do it?).
My attempt so far looks like this:
if (`attributeQuery -node pCube1 -keyable translateX` == true){
print "translate X is keyable";
}
I get the same result whether or not the attribute is keyable.
Can anyone give me an example of an if structure that checks if a certain attribute is keyable?
Thanks in advance!
