CGTalk > Software > Autodesk Maya > Maya Character Setup
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 07-15-2005, 09:53 PM   #1
New Member
dag wood
california, USA
Join Date: Jul 2005
Posts: 14
adding atributes with mel?

hi im trying to add an atrubite to a locator controller i have in the middle of a script i have running other operations

im really not so hot at mel, basicly only just grab from echo all commands checked or unchecked and the paste them into a edit pad to get what i need done.. if u can record it i can usaly mel it! heh..

ne way is there a way to add atribute with a mel say set it from 0-10 or whatever?

i keep geting errors when i run this recorded action
addAttr -ln aaa -at double -min 0 -max 10 |locator1;
setAttr -e -keyable true |;

it dosnt get the name or the min/max/default fields i fill in..

Old 07-15-2005, 10:55 PM   #2
Flaming Badger
Brian Harder
Join Date: Feb 2004
Posts: 762
For Mel to work properly you should make sure your naming conventions are unique. Being really anal with names makes it tons easier. The |locator1 means you have more than one locator called locator1. So it'll give you the full heirarchy to differentiate between them, ie group1|locator1 or LScrotumJoint|PubeJoint|locator1. So the mel comand is failing because simply saying |locator1 doesn't mean anything to it.

So name the locator something unique and you won't run into this problem. Name the locator Fred and the code should read

addAttr -ln aaa -at double -min 0 -max 10 Fred;
setAttr -e -keyable true;
Old 07-16-2005, 02:44 AM   #3
New Member
shrtcww's Avatar
Ian Jones
Character TD
San Francisco, USA
Join Date: Feb 2004
Posts: 27
Send a message via AIM to shrtcww Send a message via MSN to shrtcww
remember if your adding a attribute you can also make it keyable at the same time with the -keyable (-k) flag like so:

addAttr -ln aaa -at double -min 0 -max 10 -keyable true Fred;

no real difference - just one less line to debug, as well things happen =D
Old 07-16-2005, 02:44 AM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,479
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 03:03 PM.

Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.