本文整理汇总了C++中MDagPathArray::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ MDagPathArray::remove方法的具体用法?C++ MDagPathArray::remove怎么用?C++ MDagPathArray::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MDagPathArray
的用法示例。
在下文中一共展示了MDagPathArray::remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findForcedNodes
// ------------------------------------------------------------
void SceneGraph::findForcedNodes()
{
MStatus status;
if ( mExportSelectedOnly )
{
MSelectionList selectedItems;
MGlobal::getActiveSelectionList ( selectedItems );
uint selectedCount = selectedItems.length();
MDagPathArray queue;
for ( uint i = 0; i < selectedCount; ++i )
{
MDagPath selectedPath;
status = selectedItems.getDagPath ( i, selectedPath );
if ( status == MStatus::kSuccess ) queue.append ( selectedPath );
}
while ( queue.length() > 0 )
{
MDagPath selectedPath = queue[queue.length() - 1];
queue.remove ( queue.length() - 1 );
// Queue up the children.
uint childCount = selectedPath.childCount();
for ( uint i = 0; i < childCount; ++i )
{
MObject node = selectedPath.child ( i );
MDagPath childPath = selectedPath;
childPath.push ( node );
queue.append ( childPath );
}
// Look for a mesh
if ( selectedPath.node().hasFn ( MFn::kMesh ) )
{
// export forced nodes in path
addForcedNodes ( selectedPath );
}
}
}
else
{
for ( MItDag dagIt ( MItDag::kBreadthFirst ); !dagIt.isDone(); dagIt.next() )
{
MDagPath currentPath;
status = dagIt.getPath ( currentPath );
if ( status == MStatus::kSuccess )
{
MFnDagNode node ( currentPath );
String nodeName = node.name().asChar();
if ( currentPath.node().hasFn ( MFn::kMesh ) )
{
// export forced nodes in path
addForcedNodes ( currentPath );
}
}
}
}
}