'Still having trouble creating a compound attribute. Here's a snip of my code:
CODE
MObject parent;
MObject child1;
MObject child2;
MFnNumericAttribute numAttr;
child1 = numAttr.create("child2Attr", "ch1", MFnNumericData::kShort);
child2 = numAttr.create("child1Attr", "ch2", MFnNumericData::k3Double);
MFnCompoundAttribute compAttr;
parent = compAttr.create("parentAttr", "pat");
compAttr.setArray(true);
compAttr.addChild(child1);
compAttr.addChild(child2);
addAttribute(parent );
Oddly, although the compound attribute frame (titled "parentAttr") appears inside the "Extra Attributes" frame in the attribute editor, its child attributes ("child1", and "child2") do not appear inside the the "parentAttr" frame not do they appear elsewhere). Which is perticularly strange because when I type
CODE
listAttr myNode
I get CODE
... parentAttr parentAttr.child2Attr parentAttr.child1Attr parentAttr.child1Attr0 parentAttr.child1Attr1 parentAttr.child1Attr2 ...
as expected.
Further more, I even added the line CODE
cout << compAttr.numChildren() << endl;
to my initilalize() function, and got 2 (again as expected) -- yet the child attributes do not show up in the attribute editor.
Someone please help.
Thanks