|
Did something change with MEL? I swear this used to work… these two lines:
With two objects selected:
$selected = `ls -sl`; getAttr ($selected[1]).tx;
returns tx for both selected objects:
// Result: -10.57723 10.642541 //
Am I missing something? I swear this used to work and I’ve been coding in MEL for a while now.
- Howard Hsu http://www.linkedin.com/in/howardab234
Now using:
Windows XP 64 Pro v2003 SP2 (yes XP64 is still around)
Core 2 Quad CPU Q6600 @ 2.4GHz
2GB RAM
NVidia GeForce 8800 GTX
Max 2008 x64
Maya 2008 64
MotionBuilder 7.5
|
|
|
|
it doesn’t matter if an how you index
You can use 0
getAttr ($selected[0]).tx; // Result: 4.506816 -8.695786 //
or 1
getAttr ($selected[1]).tx; // Result: 4.506816 -8.695786 //
or no index
getAttr ($selected).tx; // Result: 4.506816 -8.695786 //
You need
getAttr ($selected[1]+".tx"); // Result: 4.506816 //
|
|
|