enum attribute issues

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 05 May 2007   #1
enum attribute issues

Hi,
I have following problem.
I have a Mesh which i give an enum attribute e.g.:
sphere -n mySphere;
     addAttr -ln colors -at "enum" -en "Green:Blue:Red:Black:White" mySphere;

The values of the Enum I'am reading from an External FIle.
Now when I add more Values to the Text file (e.g. 2 more Colors) then I first check
if the attribute exists, when Yes then i delete the Attribute an dthen add the attribute again with the new values.
deleteAttr ("mySphere.colors");
    addAttr -ln colors -at "enum" -en "Green:Blue:Red:Black:White:Orange:Purple" mySphere;


The problem is that it doesnt work if I do it in the script. But if i manualy execute
deleteAttr ("mySphere.colors");

and then
addAttr -ln colors -at "enum" -en "Green:Blue:Red:Black:White:Orange:Purple" mySphere;

then it works.

Did someone know the Issue and how to solve it? Or an workaround?

I use Maya 7.0

-XT
__________________
| xt_textureStudio | xt_prefabLibrary |xt_normalis | Get it @ Fuchtelworld V.3 |
 
Old 06 June 2007   #2
is it not working in the sense that you are not getting the desired result or are you getting any runtime/syntax errors?

if it does not execute then i would suggest adding "`" around the commands, but that's a syntaxical thing and if your script is running, then it's another problem.
 
Old 06 June 2007   #3
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



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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 09:05 PM.


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