Bug with deleteAttr on color attributes?

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

Hey Jeff

just for the record (three years late!)... Rename the attrib before deleting it...

global delAttr (string $obj, string $attr)
{
renameAttr ($obj+"."+$test) "deleteme";
deleteAttr ($obj+".deleteme");
}

Ugh. Yeah, it is a little late for me now

--JeffD