ShaderFXShaderExporter::ShaderFXShaderExporter(DocumentExporter & documentExporter, COLLADASW::EffectProfile & effectProfile, const String & effectId) : mDocumentExporter(documentExporter) , mStreamWriter(*documentExporter.getStreamWriter()) , mEffectProfile(effectProfile) , mTextureIndex(0) , mEffectId(effectId) {}
int collada_export(Scene *sce, const char *filepath, int selected) { DocumentExporter exp; /* annoying, collada crashes if file cant be created! [#27162] */ if(!BLI_exist(filepath)) { BLI_make_existing_file(filepath); /* makes the dir if its not there */ if(BLI_touch(filepath) == 0) { return 0; } } /* end! */ exp.exportCurrentScene(sce, filepath, selected); return 1; }
MStatus FileTranslator::exportIntoFile ( const MString& filename, const bool selectionOnly ) { MStatus status = MS::kSuccess; /** To get the time */ clock_t startClock, endClock; startClock = clock(); // Actually export the document DocumentExporter documentExporter ( NativeString(filename.asChar()) ); documentExporter.exportCurrentScene ( selectionOnly ); // Display some closing information. endClock = clock(); std::ostringstream stream; stream << "Time to export into file \"" << filename.asChar() << "\": " << endClock - startClock << std::endl; MString message( stream.str().c_str() ); std::cerr << message.asChar() << std::endl; return status; }