本文整理汇总了C++中MeshData::BuildMesh方法的典型用法代码示例。如果您正苦于以下问题:C++ MeshData::BuildMesh方法的具体用法?C++ MeshData::BuildMesh怎么用?C++ MeshData::BuildMesh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MeshData
的用法示例。
在下文中一共展示了MeshData::BuildMesh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: iter
void
VertexPolyColourCommand::CreateJobListFromSelection(MSelectionList& selection)
{
// Go through the selection looking for relevant geometry and add them to the list of jobs
MItSelectionList iter(selection);
for ( ; !iter.isDone(); iter.next() )
{
MDagPath dagPath;
MObject component;
iter.getDagPath( dagPath, component );
// check node type
if (dagPath.node().hasFn(MFn::kTransform) || dagPath.node().hasFn(MFn::kPolyMesh) || dagPath.node().hasFn(MFn::kMesh))
{
if (component.isNull() || m_operation == OP_UpdateLayerComposite)
{
dagPath.extendToShape();
AddJob(dagPath, MObject::kNullObj);
}
else
{
switch (component.apiType())
{
case MFn::kMeshComponent:
case MFn::kMeshEdgeComponent:
case MFn::kMeshPolygonComponent:
case MFn::kMeshVertComponent:
case MFn::kMeshVtxFaceComponent:
case MFn::kMeshMapComponent:
dagPath.extendToShape();
AddJob(dagPath, component);
break;
default:
break;
}
}
}
}
for (size_t i = 0; i < m_meshes.size(); i++)
{
MeshData* meshData = m_meshes[i];
if (!MeshHasConstructionHistory(meshData->dagPath))
{
m_isRestoreSelection = true;
MString meshName = meshData->mesh->fullPathName();
//MGlobal::executeCommand(MString("select -r ") + meshName);
//MGlobal::executeCommand("polySmooth -divisions 0");
MGlobal::executeCommand(MString("polySmooth -divisions 0") + meshName);
meshData->BuildMesh();
}
/*
MPlug outMeshPlug, inMeshPlug;
MObject intermediate;
AddConstructionHistory(meshData->dagPath, outMeshPlug, inMeshPlug, intermediate, NULL);
*/
}
}