PDA

View Full Version : Hiding child attributes (api)


Capulet
02-01-2011, 11:40 AM
Hi,

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.setWritable(false);
cAttr.setIndexMatters(true);
cAttr.setConnectable( true );
cAttr.setArray( true );
cAttr.addChild( outState);
// then adds other unhidden children....

CGTalk Moderation
02-01-2011, 11:40 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.