FORUMS: list search recent posts

Why this MEL scipt miss to work properly?

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Mostafa Talebi
Why this MEL scipt miss to work properly?
on Feb 8, 2012 at 8:40:04 pm

Hello Everybody


I have written down this MEL script which is to do a very simple task:

Set Attribute of the selected object to 0(not freeze it, only turn it to 0)
It does not pop up any errors but only doesn't produce any result at all.
The code:

string $sel[] = `ls -sl`;

for ($each in $sel)
{
setAttr $each.rotateX 0;
}


Return to posts index

Steve Sayer
Re: Why this MEL scipt miss to work properly?
on Feb 10, 2012 at 2:52:20 pm

You can't just stick an attribute name after a variable like that. You have to tell Maya to add them together. So $each.translateX won't work, but ($each + ".translateX") will probably work.


Return to posts index

Mostafa Talebi
Re: Why this MEL scipt miss to work properly?
on Feb 10, 2012 at 9:11:11 pm

I went on like expressions. THANKS very much;
your help much appreciated.


Return to posts index


Steve Sayer
Re: Why this MEL scipt miss to work properly?
on Feb 14, 2012 at 10:03:02 pm

You're very welcome, Mostafa!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]