本文整理汇总了C++中MFnDagNode::isIntermediateObject方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnDagNode::isIntermediateObject方法的具体用法?C++ MFnDagNode::isIntermediateObject怎么用?C++ MFnDagNode::isIntermediateObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFnDagNode
的用法示例。
在下文中一共展示了MFnDagNode::isIntermediateObject方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: myMCurve
void
exportCurve(MFnDagNode & theDagNode, WorldBuilderBase & theParentTransform, SceneBuilder & theSceneBuilder) {
MAKE_SCOPE_TIMER(CurveExporter_exportCurve);
if (theDagNode.isIntermediateObject()) {
return;
}
string myCurveName = string(theDagNode.name().asChar());
DB(AC_TRACE << "Exporting curve: " << myCurveName << endl);
MFnNurbsCurve myMCurve(theDagNode.object());
DB(
cerr << "Number of cvs: " << myMCurve.numCVs() << endl;
cerr << "Number of spans: " << myMCurve.numSpans() << endl;
cerr << "Number of knots: " << myMCurve.numKnots() << endl;
cerr << "Degree: " << myMCurve.degree() << endl;
cerr << "Length: " << myMCurve.length() << endl;
for (double d = 0.0; d <= 1.0; d += 0.1) {
MPoint myPoint;
myMCurve.getPointAtParam(d, myPoint);
cerr << "Point at param " << d << ": " << myPoint.x << ", " << myPoint.y << ", " << myPoint.z << endl;
}
int myCvCount = myMCurve.numCVs();
for (int i = 0; i < myCvCount; ++i) {
MPoint myPoint;
myMCurve.getCV(i, myPoint);
cerr << "CV " << i << ": " << myPoint.x << ", " << myPoint.y << ", " << myPoint.z << endl;
}
int myKnotCount = myMCurve.numKnots();
for (int i = 0; i < myKnotCount; ++i) {
double knotParam;
knotParam = myMCurve.knot(i);
MPoint myPoint;
myMCurve.getPointAtParam(knotParam, myPoint);
cerr << "Point at knot# " << i << ": " << myPoint.x << ", " << myPoint.y << ", " << myPoint.z << endl;
}
)
示例2: isVisible
bool polyExporter::isVisible(MFnDagNode & fnDag, MStatus& status)
//Summary: determines if the given DAG node is currently visible
//Args : fnDag - the DAG node to check
//Returns: true if the node is visible;
// false otherwise
{
if(fnDag.isIntermediateObject())
return false;
MPlug visPlug = fnDag.findPlug("visibility", &status);
if (MStatus::kFailure == status) {
MGlobal::displayError("MPlug::findPlug");
return false;
} else {
bool visible;
status = visPlug.getValue(visible);
if (MStatus::kFailure == status) {
MGlobal::displayError("MPlug::getValue");
}
return visible;
}
}
示例3: IsVisible
bool IsVisible(MFnDagNode& node)
{
MStatus stat;
if (node.isIntermediateObject())
return false;
bool visibility = true;
MFnDependencyNode depFn(node.object(), &stat);
if (!stat)
MGlobal::displayInfo("Problem getting dep from " + node.name());
if (!getBool(MString("visibility"), depFn, visibility))
MGlobal::displayInfo("Problem getting visibility attr from " + node.name());
if (!visibility)
return false;
getBool(MString("overrideVisibility"), depFn, visibility);
if (!visibility)
return false;
return true;
}
示例4: 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;
}