diff --git a/ogre/src/OgreMeshFactory.cc b/ogre/src/OgreMeshFactory.cc index ff1a11390..c1101e825 100644 --- a/ogre/src/OgreMeshFactory.cc +++ b/ogre/src/OgreMeshFactory.cc @@ -450,6 +450,15 @@ bool OgreMeshFactory::LoadImpl(const MeshDescriptor &_desc) return false; } + if (ogreMesh->getNumSubMeshes() == 0u) + { + std::string msg = "Unable to load mesh: '" + _desc.meshName + "'"; + if (!_desc.subMeshName.empty()) + msg += ", submesh: '" + _desc.subMeshName + "'"; + msg += ". Mesh will be empty."; + ignwarn << msg << std::endl; + } + return true; } diff --git a/ogre2/src/Ogre2MeshFactory.cc b/ogre2/src/Ogre2MeshFactory.cc index a2852a7e8..58ff1e641 100644 --- a/ogre2/src/Ogre2MeshFactory.cc +++ b/ogre2/src/Ogre2MeshFactory.cc @@ -469,6 +469,15 @@ bool Ogre2MeshFactory::LoadImpl(const MeshDescriptor &_desc) return false; } + if (ogreMesh->getNumSubMeshes() == 0u) + { + std::string msg = "Unable to load mesh: '" + _desc.meshName + "'"; + if (!_desc.subMeshName.empty()) + msg += ", submesh: '" + _desc.subMeshName + "'"; + msg += ". Mesh will be empty."; + ignwarn << msg << std::endl; + } + return true; }