本文整理汇总了C++中MFileObject::path方法的典型用法代码示例。如果您正苦于以下问题:C++ MFileObject::path方法的具体用法?C++ MFileObject::path怎么用?C++ MFileObject::path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFileObject
的用法示例。
在下文中一共展示了MFileObject::path方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writer
MStatus DCTranslator::writer(
const MFileObject &file,
const MString &,
MPxFileTranslator::FileAccessMode mode)
{
MString fileName = file.fullName();
m_ExportPath = file.path();
MString pathInfo = "Export Model Path: ";
MGlobal::displayInfo(pathInfo + m_ExportPath);
MGlobal::displayInfo("Exporting Mesh...\n");
m_MeshFilePtr = GetIODevice<File>();
//m_PhysxAssetFilePtr = GetIODevice<File>();
if (m_MeshFilePtr->Open(fileName.asChar(), IOWrite)) {
//m_PhysxAssetFilePtr->Open((fileName+".pxasset").asChar(), IOWrite);
m_MeshArch = new Archive;
m_MeshArch->SetIODevice(m_MeshFilePtr);
////// write the header ///////
MeshHeader header;
header.Version = VERSION_1_1;
//////
(*m_MeshArch) << header;
if ((mode == MPxFileTranslator::kExportAccessMode) ||
(mode == MPxFileTranslator::kSaveAccessMode))
{
exportAll();
}
else if (mode == MPxFileTranslator::kExportActiveAccessMode)
{
exportSelected();
}
char EndCode[64] = "End";
m_MeshFilePtr->Write(EndCode, 64);
m_MeshFilePtr->Close();
delete m_MeshFilePtr;
m_MeshFilePtr = 0;
return MS::kSuccess;
}
else {
return MStatus::kFailure;
}
}
示例2: doIt
//.........这里部分代码省略.........
{
if (i+1 >= numJobArgs)
{
MGlobal::displayError(
"userAttr incorrectly specified.");
return MS::kFailure;
}
jobArgs.userAttribs.insert(jobArgsArray[++i].asChar());
}
else if (arg == "-rt" || arg == "-root")
{
if (i+1 >= numJobArgs)
{
MGlobal::displayError(
"root incorrectly specified.");
return MS::kFailure;
}
hasRoot = true;
MString root = jobArgsArray[++i];
MSelectionList sel;
if (sel.add(root) != MS::kSuccess)
{
MString warn = root;
warn += " could not be select, skipping.";
MGlobal::displayWarning(warn);
continue;
}
unsigned int numRoots = sel.length();
for (unsigned int j = 0; j < numRoots; ++j)
{
MDagPath path;
if (sel.getDagPath(j, path) != MS::kSuccess)
{
MString warn = path.fullPathName();
warn += " (part of ";
warn += root;
warn += " ) not a DAG Node, skipping.";
MGlobal::displayWarning(warn);
continue;
}
jobArgs.dagPaths.insert(path);
}
}
else if (arg == "-ef" || arg == "-eulerfilter")
{
jobArgs.filterEulerRotations = true;
}
else if (arg == "-df" || arg == "-dataformat")
{
if (i+1 >= numJobArgs)
{
MGlobal::displayError(
"dataFormat incorrectly specified.");
return MS::kFailure;
}
MString dataFormat = jobArgsArray[++i];
dataFormat.toLowerCase();
if (dataFormat == "hdf")
{
asOgawa = false;
}
else if (dataFormat == "ogawa")
{