PDA

View Full Version : Extra attributes > color .. experiences?


kojala
04-29-2008, 06:42 AM
I have maya2008 sp1

Have you had this kind of fatal error:
If you add color attribute:

import maya.cmds as m

attr = my_color

m.addAttr(sel[0], longName=attr, usedAsColor=1, attributeType="float3")
m.addAttr(sel[0], longName= attr + "R", attributeType="float", parent=attr)
m.addAttr(sel[0], longName= attr + "G", attributeType="float", parent=attr)
m.addAttr(sel[0], longName= attr + "B", attributeType="float", parent=attr)

one extremelly annoying feature is when you delete this attribute and ad it again
everything is ok if you dont have any extra attributes before but if you do .. then
erro too meny components..etc
Ive found a solution for this .. you have to rename all components like delete_me..
then it works.

but the actual problem is this:

if you add color attribute then other type attributes like float or string.
now if you delete the topmost color attribute maya bugs with the other attribute values.
like string goes empty and quering its type I get None.. but if you write to it the type goes back to string..

and one more thing .. if you add three or more other type attributes after this color attribute and then delete this color attribute.. crash .. fatal error
Ive tried this last thing on maya 6 but no crash..

Is there any other way to get around this but totally rebuild the extra attribute list without the color attribute?

kojala
09-24-2008, 08:01 AM
have anybody had a luck finding a solution?

CGTalk Moderation
09-24-2008, 08:01 AM
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.