本文整理汇总了C++中MFnDagNode::isDefaultNode方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnDagNode::isDefaultNode方法的具体用法?C++ MFnDagNode::isDefaultNode怎么用?C++ MFnDagNode::isDefaultNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFnDagNode
的用法示例。
在下文中一共展示了MFnDagNode::isDefaultNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getIsExportNode
// --------------------------------------------------------------------
bool SceneGraph::getIsExportNode (
const MDagPath& dagPath,
bool& isForced,
bool& isVisible )
{
// Does this dagPath already exist? If so, only recurse if FollowInstancedChildren() is set.
MFnDagNode dagFn ( dagPath );
String dagNodeName = dagFn.name().asChar();
bool isSceneRoot = dagPath.length() == 0;
// Ignore default and intermediate nodes (history items)
bool isIntermediateObject = dagFn.isIntermediateObject();
if ( ( dagFn.isDefaultNode() && !isSceneRoot ) || isIntermediateObject )
{
return false;
}
MString nodeName = dagPath.partialPathName();
if ( nodeName == MString ( NIMA_INTERNAL_PHYSIKS ) )
{
// Skip this node, which is only used
// by Nima as a work-around for a Maya bug.
return false;
}
// If we are not already forcing this node, its children
// check whether we should be forcing it (skinning of hidden joints).
isForced = isForcedNode ( dagPath );
DagHelper::getPlugValue ( dagPath.node(), ATTR_VISIBILITY, isVisible );
bool isInstanced = dagPath.isInstanced();
uint instanceNumber = dagPath.instanceNumber();
if ( !isForced )
{
// Check for visibility
if ( !ExportOptions::exportInvisibleNodes() && !isVisible )
{
// Check if the visibility of the element is animated.
AnimationSampleCache* animationCache = mDocumentExporter->getAnimationCache();
if ( !AnimationHelper::isAnimated ( animationCache, dagPath.node(), ATTR_VISIBILITY ) )
{
return false;
}
}
else if ( !isVisible && !ExportOptions::exportDefaultCameras() )
{
// Check for the default camera transform names.
if ( nodeName == CAMERA_PERSP || nodeName == CAMERA_TOP || nodeName == CAMERA_SIDE || nodeName == CAMERA_FRONT ||
nodeName == CAMERA_PERSP_SHAPE || nodeName == CAMERA_TOP_SHAPE || nodeName == CAMERA_SIDE_SHAPE || nodeName == CAMERA_FRONT_SHAPE )
return false;
}
}
isForced &= !isVisible;
if ( !isForced )
{
// We don't want to process manipulators
if ( dagPath.hasFn ( MFn::kManipulator ) || dagPath.hasFn ( MFn::kViewManip ) ) return false;
// Check for constraints which are not exported
//if ( !ExportOptions::exportConstraints() && dagPath.hasFn ( MFn::kConstraint ) ) return false;
if ( dagPath.hasFn ( MFn::kConstraint ) ) return false;
// Check set membership exclusion/inclusion
if ( SetHelper::isExcluded ( dagPath ) ) return false;
}
return true;
}