当前位置: 首页>>代码示例>>C++>>正文


C++ MFileObject::path方法代码示例

本文整理汇总了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;
	}
}
开发者ID:gitter-badger,项目名称:kaleido3d,代码行数:45,代码来源:DCTranslator.cpp

示例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")
                {
开发者ID:alfkr,项目名称:alembic,代码行数:67,代码来源:AbcExport.cpp


注:本文中的MFileObject::path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。