polyRawExporter/polyRawExporter.cpp
#include <maya/MFnPlugin.h>
#include <maya/MDagPath.h>
#include <maya/MIOStream.h>
#include <maya/MFStream.h>
#include "polyRawExporter.h"
#include "polyRawWriter.h"
polyRawExporter::~polyRawExporter()
{
}
void* polyRawExporter::creator()
{
return new polyRawExporter();
}
MString polyRawExporter::defaultExtension () const
{
}
{
MFnPlugin plugin(obj, PLUGIN_COMPANY,
"4.5",
"Any");
status = plugin.registerFileTranslator("RawText",
"",
polyRawExporter::creator,
"",
"option1=1",
true);
if (!status) {
status.
perror(
"registerFileTranslator");
return status;
}
return status;
}
{
status = plugin.deregisterFileTranslator("RawText");
if (!status) {
status.
perror(
"deregisterFileTranslator");
return status;
}
return status;
}
void polyRawExporter::writeHeader(ostream& os)
{
os << "Legend:\n"
<< "Delimiter = TAB\n"
<< "() = coordinates\n"
<< "[] = vector\n"
<< "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n";
}
polyWriter* polyRawExporter::createPolyWriter(
const MDagPath dagPath,
MStatus& status)
{
return new polyRawWriter(dagPath, status);
}