Join for FREE | Take the Tour Lost Password?

deviantART

 
About Me Official Beta Tester Digital Artist Ammut8838/Male/New Zealand Recent Activity Deviant for 3 Years
3 Month Premium Membership:
Given by *KawaiiArt-uk
Statistics 84 Deviations
1,447 Comments
9,481 Pageviews

Newest


Flash Player 8 is required to view SitBack. Get the latest version of Flash Player.

Watchers

Visitors

:iconalexneto:
~AlexNeto
Nov 21, 2009
3:19 pm
:iconkyra2410:
~KYRA2410
Nov 20, 2009
3:49 pm
:iconlord-necro:
~Lord-Necro
Nov 19, 2009
2:28 pm
:iconparanoidcustard:
~ParanoidCustard
Nov 18, 2009
1:46 pm
:iconowen-c:
~owen-c
Nov 17, 2009
5:59 pm

A short lesson in MEL

Sun May 3, 2009, 3:54 PM
I was reading the 3D forum [link] and someone posted a topic about tips and tricks. I threw a quick little MEL tutorial up on looping, and thought I'd post it here as well. I don't know if it'll help anyone, or if anyone cares really, but here it is:

//---------------------------------

If you need to set an attribute across many objects which doesn't show up in the channelBox (like say 'inheritsTransform' or 'displayHandle' you can set them all with one line of mel.

Select the objects you'd like to effect, then:

for ($target in `ls -sl`) setAttr ($target+".inheritsTransform") 0;

The above is a quick example of a mini loop such that each object inside the loop is refered to as "$target" when its it's turn in the queue. If you had more than one operation you wanted to do on multiple objects, you could use "{}"s to contain your commands such that:

for ($target in `ls -sl`){
setAttr ($target+".inheritsTransform") 0;
setAttr ($target+".displayHandle") 1;
}

The above loop would set inheritsTransforms and displayHandle attributes for everything selected.

  • Mood: Daily Needs
  • Listening to: The 69 Eyes
  • Reading: "A Darkling Plain"
  • Playing: Grown-up

Devious Info

  • Current Residence: Wellington, NZ
  • Tools of the Trade: PS Maya jedit gimp

Stamps

Comments


:iconfabriciocampos:
thx for the wacth too!
:iconfabriciocampos:
Nice gallery! congrats
:iconba-to-u:
Thanks so much for fave pete! :D
Hidden by Owner
Hidden by Owner

Site Map