本文整理汇总了C++中MFnDagNode::typeName方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnDagNode::typeName方法的具体用法?C++ MFnDagNode::typeName怎么用?C++ MFnDagNode::typeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFnDagNode
的用法示例。
在下文中一共展示了MFnDagNode::typeName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scanScene
void tLocatorMgr::scanScene(const float lframe__, const int sample__,
boost::shared_ptr< liqRibHT > &htable__,
int &count__,
MStatus &returnStatus__)
{
CM_TRACE_FUNC("tLocatorMgr::scanScene("<<lframe__<<","<<sample__<<",htable__,count__,returnStatus__)");
//[refactor 10] beg from scanScene()
MItDag dagCoordSysIterator( MItDag::kDepthFirst, MFn::kLocator, &returnStatus__);
for (; !dagCoordSysIterator.isDone(); dagCoordSysIterator.next())
{
#if (Refactoring == 0)
LIQ_CHECK_CANCEL_REQUEST;
#endif
MDagPath path;
MObject currentNode;
currentNode = dagCoordSysIterator.item();
MFnDagNode dagNode;
dagCoordSysIterator.getPath( path );
if(MS::kSuccess != returnStatus__)
continue;
if(!currentNode.hasFn(MFn::kDagNode))
continue;
returnStatus__ = dagNode.setObject( currentNode );
if(MS::kSuccess != returnStatus__)
continue;
// scanScene: if it's a coordinate system then insert it into the hash table
if( dagNode.typeName() == "liquidCoordSys" )
{
int coordType = 0;
MPlug typePlug = dagNode.findPlug( "type", &returnStatus__ );
if( MS::kSuccess == returnStatus__ )
typePlug.getValue( coordType );
bool useSamples( ( sample__ > 0 ) && isObjectMotionBlur( path ) );
ObjectType mrttype = getMRTType(currentNode, coordType);
ObjectType mrttype_shouldbe = ( coordType == 5 )? MRT_ClipPlane : MRT_Coord;
if( mrttype != mrttype_shouldbe ){
liquidMessage2(messageError, "mrttype[%d] should be %d", mrttype_shouldbe);
}
htable__->insert( path,
lframe__,
( useSamples )? sample__ : 0,
mrttype, //( coordType == 5 )? MRT_ClipPlane : MRT_Coord,
count__++ );
continue;
}
}
//[refactor 10] end from scanScene()
}
示例2: IterateSelection
void IterateSelection()
{
unsigned int i;
MSelectionList list;
MDagPath dagpath;
MFnDagNode fnnode;
MGlobal::getActiveSelectionList(list);
for(i = 0; i < list.length(); i++)
{
list.getDagPath(i, dagpath);
fnnode.setObject(dagpath);
cout << fnnode.name().asChar() << " of type " << fnnode.typeName().asChar() << " is selected" << endl;
cout << "has " << fnnode.childCount() << " children" << endl;
//Iterate the children
for(int j = 0; j < fnnode.childCount(); j++)
{
MObject childobj;
MFnDagNode fnchild;
childobj = fnnode.child(j);
fnchild.setObject(childobj);
cout << "child " << j << " is a " << fnchild.typeName().asChar() << endl;
//MFn::Type type = fnchild.type()
//if(fnchild.type() == MFn::kMesh)
//DumpMesh(dagpath);
//DumpMesh2(dagpath);
IterateWorldMeshesInSelection();
}
}
}