enum attribute issues

Become a member of the CGSociety

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

Thread Tools Search this Thread Display Modes
  05 May 2007
enum attribute issues

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_textureStudio | xt_prefabLibrary |xt_normalis | Get it @ Fuchtelworld V.3 |
  06 June 2007
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.
  06 June 2007
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
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 02:07 PM.

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