本文整理汇总了C++中MFnUnitAttribute::setHidden方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnUnitAttribute::setHidden方法的具体用法?C++ MFnUnitAttribute::setHidden怎么用?C++ MFnUnitAttribute::setHidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFnUnitAttribute
的用法示例。
在下文中一共展示了MFnUnitAttribute::setHidden方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
MStatus dSolverNode::initialize()
{
MStatus status;
MFnEnumAttribute fnEnumAttr;
MFnMessageAttribute fnMsgAttr;
MFnUnitAttribute fnUnitAttr;
MFnNumericAttribute fnNumericAttr;
//
ssSolverType = fnEnumAttr.create( "ssSolverType", "ssst", 0, &status );
MCHECKSTATUS(status, "creating ssSolverType attribute")
fnEnumAttr.addField( "Bullet Physics", 0 );
fnEnumAttr.addField( "Ageia PhysX", 1 );
fnEnumAttr.addField( "Stanford PhysBAM", 2 );
status = addAttribute(ssSolverType);
MCHECKSTATUS(status, "adding ssSolverType attribute")
//
ia_time = fnUnitAttr.create( "inTime", "it", MFnUnitAttribute::kTime, 0.0, &status );
MCHECKSTATUS(status, "creating ia_time attribute")
fnUnitAttr.setHidden(true);
status = addAttribute(ia_time);
MCHECKSTATUS(status, "adding ia_time attribute")
ia_startTime = fnUnitAttr.create( "startTime", "stm", MFnUnitAttribute::kTime, 1.0, &status );
MCHECKSTATUS(status, "creating ia_startTime attribute")
status = addAttribute(ia_startTime);
MCHECKSTATUS(status, "adding ia_startTime attribute")
oa_rigidBodies = fnMsgAttr.create("rigidBodies", "rbds", &status);
MCHECKSTATUS(status, "creating oa_rigidBodies attribute")
status = addAttribute(oa_rigidBodies);
MCHECKSTATUS(status, "adding oa_rigidBodies attribute")
ia_gravity = fnNumericAttr.createPoint("gravity", "grvt", &status);
MCHECKSTATUS(status, "creating gravity attribute")
fnNumericAttr.setDefault(0.0, -9.81, 0.0);
fnNumericAttr.setKeyable(true);
status = addAttribute(ia_gravity);
MCHECKSTATUS(status, "adding ia_gravity attribute")
ia_substeps = fnNumericAttr.create("substeps", "sbs", MFnNumericData::kInt, 1, &status);
MCHECKSTATUS(status, "creating substeps attribute")
fnNumericAttr.setKeyable(true);
status = addAttribute(ia_substeps);
MCHECKSTATUS(status, "adding ia_substeps attribute")
ia_enabled = fnNumericAttr.create("enabled", "enbl", MFnNumericData::kBoolean, true, &status);
MCHECKSTATUS(status, "creating enabled attribute")
status = addAttribute(ia_enabled);
MCHECKSTATUS(status, "adding ia_enabled attribute")
ia_splitImpulse = fnNumericAttr.create("splitImpulse", "spli", MFnNumericData::kBoolean, false, &status);
MCHECKSTATUS(status, "creating splitImpulse attribute")
status = addAttribute(ia_splitImpulse);
MCHECKSTATUS(status, "adding ia_splitImpulse attribute")
status = attributeAffects(ia_time, oa_rigidBodies);
MCHECKSTATUS(status, "adding attributeAffects(ia_time, oa_rigidBodies)")
status = attributeAffects(ia_enabled, oa_rigidBodies);
MCHECKSTATUS(status, "adding attributeAffects(ia_enabled, oa_rigidBodies)")
return MS::kSuccess;
}