Plugins/Assimp: Handle assimp errors
Former-commit-id: c46023f21ac221190cc3dc4427ea84f93c96b033 [formerly c574f97c73ec25d67225203b6f3f700c93a9b171] [formerly 190c1447d21b9f76306e4f20b828556d01a2bb01 [formerly 6c945658cd34d1abca6f3ff347a829da705dc37f]] Former-commit-id: c13be95acf766003c2e01e2dfe50df9a3388d196 [formerly 0aaaeb93d55e4d66e94ea90851f3bed8caebcbbe] Former-commit-id: a37edd23f01db3f2c8d886603068ad0aa0c03627
This commit is contained in:
parent
0c533d378f
commit
de22ad4501
|
|
@ -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