View Full Version : Hiding child attributes (api)

02 February 2011, 12:40 PM

nAttr.setHidden(true) doesn't seem to have any effect when used on a attribute which you then parent to a compound attribute. The compound attribute itself isn't supposed to be hidden.

I hope I'm doing something wrong because I really want to hide this thing. Does the compound parent always override its children's properties? I know it makes sense, but... grrrr.

Thanks :)

MFnNumericAttribute nAttr;
MFnCompoundAttribute cAttr;

outState = nAttr.create( "state", "st", MFnNumericData::kInt, 4, &status );
nAttr.setReadable( true );
nAttr.setWritable( false );
nAttr.setHidden( true );

aOutputs = cAttr.create( "outputs", "o", &status );
cAttr.setReadable( true );
cAttr.setConnectable( true );
cAttr.setArray( true );
cAttr.addChild( outState);
// then adds other unhidden children....

CGTalk Moderation
02 February 2011, 12:40 PM
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.