Skip to content

Commit

Permalink
mc: don't recommend broken MDL SDK versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Jul 27, 2024
1 parent 7b7c807 commit bbcf50f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/mc/impl/MdlNeurayLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
#include <string>
#include <gtl/gb/Log.h>

#define MI_NEURAYLIB_LATEST_VERSION 52
#define GTL_RECOMMENDED_NEURAYLIB_VERSION 51
#define GTL_RECOMMENDED_NEURAYLIB_VERSION_STRING "2023.0.4"
#define GTL_LATEST_TESTED_NEURAYLIB_VERSION 52

static_assert(MI_NEURAYLIB_API_VERSION >= 48, "MDL SDK version is too old!");
static_assert(MI_NEURAYLIB_API_VERSION < 52, "2023.1.X MDL SDK has crash issues - use 2023.0.4 instead!");
static_assert(MI_NEURAYLIB_API_VERSION <= MI_NEURAYLIB_LATEST_VERSION, "Untested MDL SDK version!");
static_assert(MI_NEURAYLIB_API_VERSION <= GTL_LATEST_TESTED_NEURAYLIB_VERSION, "Untested MDL SDK version!");

namespace
{
Expand Down Expand Up @@ -168,9 +170,9 @@ namespace
return {};
}

if (MI_NEURAYLIB_API_VERSION != MI_NEURAYLIB_LATEST_VERSION)
if (MI_NEURAYLIB_API_VERSION != GTL_RECOMMENDED_NEURAYLIB_VERSION)
{
GB_WARN("not using the latest MDL SDK; update for bugfixes");
GB_WARN("not using recommended MDL SDK version {}", GTL_RECOMMENDED_NEURAYLIB_VERSION_STRING);
}

return neuray;
Expand Down

0 comments on commit bbcf50f

Please sign in to comment.