Import: fixes #8666: Enable support to read glTF files
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user