From 37ced86cecba629289c77910e609ce684c3a2c16 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 19 Nov 2022 19:02:55 -0700 Subject: [PATCH] tests: fix light settings not clearing across tests --- include/light/light.hh | 1 + light/light.cc | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/light/light.hh b/include/light/light.hh index d2f04e54..92800fbe 100644 --- a/include/light/light.hh +++ b/include/light/light.hh @@ -399,6 +399,7 @@ public: void setParameters(int argc, const char **argv) override; void initialize(int argc, const char **argv) override; void postinitialize(int argc, const char **argv) override; + void reset() override; }; }; // namespace settings diff --git a/light/light.cc b/light/light.cc index 098c54f6..b4cca107 100644 --- a/light/light.cc +++ b/light/light.cc @@ -448,6 +448,17 @@ void light_settings::postinitialize(int argc, const char **argv) common_settings::postinitialize(argc, argv); } + +void light_settings::reset() +{ + common_settings::reset(); + + sourceMap = fs::path(); + + write_litfile = lightfile::none; + write_luxfile = lightfile::none; + debugmode = debugmodes::none; +} } // namespace settings settings::light_settings light_options; @@ -1511,6 +1522,8 @@ void light_reset() ResetPhong(); ResetSurflight(); ResetEmbree(); + + light_options.reset(); } /*