I'm wondering if there is a way to perform the following, I'm aware that to set say the translation of an object, in pymel it's as simple as this:
object.translateX.set(1.5)
and you can also set this using the 'setAttr' command:
setAttr(object + '.translateX', 1.5)
or setAttr('%s.translateX' % object, 1.5)
However, what If I only wanted to use the first example with something a little more advanced where the attribute name would change?
Example:
object.translateX.set(1.5)
object.translateY.set(1.5)
object.translateZ.set(1.5)
object.rotateX.set(1.5)
object.rotateY.set(1.5)
object.rotateZ.set(1.5)
I'd much rather write something like this:
for i in range(0,5,1):
t = ['translateX', 'translateY', 'translateZ', 'rotateX', 'rotateY', 'rotateZ']
object.t[i].set(1.5)
However this obviously doesn't work, but can someone tell me if there's a way to do this?