-
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hello, it would be good if the library can export an scene, either created or imported from a file, to another format. For example import an fbx file and export it to glb.
The documentation states this can be done as follows:
bool exporterTest() override {
::Assimp::Importer importer;
::Assimp::Exporter exporter;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure);
exporter.Export(scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_out.obj");
return true;
}
I have tried it
static bool exporterTest(const aiScene* scene) {
Assimp::Exporter exporter;
try {
if (AI_SUCCESS == exporter.Export(scene, "glb", "spider_out.glb")) {
std::cout << "Exporting file...";
};
return true;
} catch (const std::exception& e) {
std::cout << e.what();
return false;
}
}
However it is not writing the file to the filesystem.
I call this function from the ImportFileListByMainFile for the sake of testing.
Hopefully this can be done.
Thank you very much!
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request