From f51be562edeb17dd4140a9b06632821228349cd5 Mon Sep 17 00:00:00 2001 From: Franz Beaune Date: Sat, 1 Jul 2017 11:08:38 +0200 Subject: [PATCH] Fix build when Disney material support is disabled --- .../renderer/modeling/project/projectfileupdater.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/appleseed/renderer/modeling/project/projectfileupdater.cpp b/src/appleseed/renderer/modeling/project/projectfileupdater.cpp index 6cf0cc7224..a2e3482b6a 100644 --- a/src/appleseed/renderer/modeling/project/projectfileupdater.cpp +++ b/src/appleseed/renderer/modeling/project/projectfileupdater.cpp @@ -59,7 +59,6 @@ #include "renderer/modeling/light/pointlight.h" #include "renderer/modeling/light/spotlight.h" #include "renderer/modeling/light/sunlight.h" -#include "renderer/modeling/material/disneymaterial.h" #include "renderer/modeling/material/material.h" #include "renderer/modeling/object/object.h" #include "renderer/modeling/project/configuration.h" @@ -1345,7 +1344,10 @@ namespace static void update_material_inputs(Material& material) { - if (strcmp(material.get_model(), DisneyMaterialFactory().get_model()) == 0) + // Don't rely on DisneyMaterialFactory().get_model() because appleseed needs + // to be able to update projects even when built without Disney material support + // (i.e. the APPLESEED_WITH_DISNEY_MATERIAL preprocessor symbol is undefined). + if (strcmp(material.get_model(), "disney_material") == 0) { ParamArray& params = material.get_parameters(); for (each i = params.dictionaries(); i; ++i)