diff --git a/openVulkanoCpp/Scene/MeshWriter.cpp b/openVulkanoCpp/Scene/MeshWriter.cpp index 556743c..35be663 100644 --- a/openVulkanoCpp/Scene/MeshWriter.cpp +++ b/openVulkanoCpp/Scene/MeshWriter.cpp @@ -16,10 +16,13 @@ #include #include + +#if __has_include("assimp/Exporter.hpp") #include #include #include #include +#endif namespace OpenVulkano::Scene { @@ -89,6 +92,7 @@ namespace OpenVulkano::Scene void MeshWriter::WriteAsFBX(Geometry* geometry, const std::string& texturePath, const std::string& fbxPath) { +#if __has_include("assimp/Exporter.hpp") aiNode rootNode; aiScene scene; @@ -177,5 +181,8 @@ namespace OpenVulkano::Scene { throw std::runtime_error("Unable to write a fbx file to " + fbxPath + ": " + exporter.GetErrorString()); } +#else + throw std::runtime_error("Unable to convert the scene to FBX: Assimp is not available!"); +#endif } } \ No newline at end of file