It seems that if you have two attributes added with the -useAsColor flag, you cannot delete one and add the attribute back with the same name or Maya produces a "too many children on this compound" error. Can anyone repeat this? Anyone have a workaround?
Try this. Create a material named phong1 and select it. Now run...
//First attribute
addAttr -ln test -uac -at float3;
addAttr -ln testR -at "float" -p test;
addAttr -ln testG -at "float" -p test;
addAttr -ln testB -at "float" -p test;
//Second attribute
addAttr -ln new -uac -at float3;
addAttr -ln newR -at "float" -p new;
addAttr -ln newG -at "float" -p new;
addAttr -ln newB -at "float" -p new;
//Delete second attribute
deleteAttr "phong1.new";
//***Try to re-add second attribute (exactly the same as above)
addAttr -ln new -uac -at float3;
addAttr -ln newR -at "float" -p new;
addAttr -ln newG -at "float" -p new;
addAttr -ln newB -at "float" -p new;
The addAttr, deleteAttr, re- addAttr process works when only a single compound color attribute is present. Any thoughts?
--JeffD