Plugins/Assimp: Handle assimp errors
Former-commit-id: 598c4142c600d7a2a55cbb1d0dddb8ad5efb1115 [formerly c8c37bb4ed9420adff14f342058599b162f5a10c] [formerly 32e948d67abc4ade4362448c655837c5082dfc61 [formerly 6d131b24546e91376d8b2a9495b2be2a67b75cb6]] Former-commit-id: 0c94a403d0bd22654b38778211523f07a1f90b76 [formerly 83cf78c103454e517f4e6729283d7c2d1fb478d9] Former-commit-id: 7292865595966a925f49ff7ef432a05d97549c83
This commit is contained in:
parent
00fb383f70
commit
72b8c93aa6
|
|
@ -23,6 +23,7 @@ SOFTWARE.
|
|||
*/
|
||||
|
||||
#include <CustomStream.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Utility/Mesh.hpp>
|
||||
#include <Nazara/Utility/IndexIterator.hpp>
|
||||
|
|
@ -130,6 +131,12 @@ bool Load(Mesh* mesh, Stream& stream, const MeshParams& parameters)
|
|||
const aiScene* scene = aiImportFileExWithProperties(userdata.originalFilePath, postProcess, &fileIO, properties);
|
||||
aiReleasePropertyStore(properties);
|
||||
|
||||
if (!scene)
|
||||
{
|
||||
NazaraError("Assimp failed to import file: " + Nz::String(aiGetErrorString()));
|
||||
return false;
|
||||
}
|
||||
|
||||
std::set<Nz::String> joints;
|
||||
|
||||
bool animatedMesh = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue