Add deprecation warning when using several model files for one model

This commit is contained in:
Malin Ejdbo
2021-02-17 10:03:54 +01:00
parent c3e96c2ec5
commit 4b6a61354d
2 changed files with 10 additions and 0 deletions

View File

@@ -42,6 +42,8 @@
#include <ghoul/opengl/programobject.h>
namespace {
constexpr const char* _loggerCat = "RenderableModel";
constexpr const char* ProgramName = "ModelProgram";
constexpr const char* KeyGeomModelFile = "GeometryFile";
constexpr const char* KeyForceRenderInvisible = "ForceRenderInvisible";
@@ -290,6 +292,10 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
);
}
else if (dictionary.hasValue<ghoul::Dictionary>(KeyGeomModelFile)) {
LWARNING("Loading a model with several files is deprecated and will be "
"removed in a future release"
);
ghoul::Dictionary fileDictionary = dictionary.value<ghoul::Dictionary>(
KeyGeomModelFile
);

View File

@@ -143,6 +143,10 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di
);
}
else if (dictionary.hasValue<ghoul::Dictionary>(KeyGeomModelFile)) {
LWARNING("Loading a model with several files is deprecated and will be "
"removed in a future release"
);
ghoul::Dictionary fileDictionary = dictionary.value<ghoul::Dictionary>(
KeyGeomModelFile
);