Import: fixes #8666: Enable support to read glTF files

This commit is contained in:
wmayer
2023-09-25 12:23:53 +02:00
committed by wwmayer
parent 0aa9ea99b4
commit 37e477d3e7
5 changed files with 117 additions and 2 deletions

View File

@@ -73,6 +73,7 @@
#include <Mod/Part/App/encodeFilename.h>
#include "ImportOCAF2.h"
#include "ReaderGltf.h"
#include "WriterGltf.h"
namespace Import
@@ -248,6 +249,10 @@ private:
pcDoc->recompute();
}
}
else if (file.hasExtension({"glb", "gltf"})) {
Import::ReaderGltf reader(file);
reader.read(hDoc);
}
else {
throw Py::Exception(PyExc_IOError, "no supported file format");
}