Plugins/Assimp: Handle assimp errors
Former-commit-id: 00deff57456a3ad24252c0184d836cdc58dd2f0c [formerly 44d87e7a002c4096a19d8023d4f7de0c8817a6bf] [formerly 9c53c4d2fbf328d92d1a2760d8205cb1a3249674 [formerly 941b8f3855ca200cd9936d4f62ad4c89d61c8e63]] Former-commit-id: 3018201ef2111ced094c0f0318e80cd9bdada436 [formerly 649dc357ee2b9202e81305ca09a29b4b87333368] Former-commit-id: 8004da412aca6ed948162b3b231bed2f2756d0ac
This commit is contained in:
parent
af01e7242c
commit
c8f759c14d
|
|
@ -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