Skip to content

Commit

Permalink
Fix build when Disney material support is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
dictoon committed Jul 1, 2017
1 parent 57b8da9 commit f51be56
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<DictionaryDictionary> i = params.dictionaries(); i; ++i)
Expand Down

0 comments on commit f51be56

Please sign in to comment.