From 5af2dcb33332aad25ec70ab0aed4e5110d3bb600 Mon Sep 17 00:00:00 2001 From: Franz Beaune Date: Mon, 23 Jan 2017 19:11:59 +0100 Subject: [PATCH] Fix rendering and export on some locales Specifically, on locales such as DE for which the decimal separator is not a period (.) but another symbol such as a comma. --- src/appleseed-max-impl/renderer/appleseedrenderer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/appleseed-max-impl/renderer/appleseedrenderer.cpp b/src/appleseed-max-impl/renderer/appleseedrenderer.cpp index 3d21bd4..ca52d01 100644 --- a/src/appleseed-max-impl/renderer/appleseedrenderer.cpp +++ b/src/appleseed-max-impl/renderer/appleseedrenderer.cpp @@ -55,7 +55,9 @@ #include // Standard headers. +#include #include +#include namespace asf = foundation; namespace asr = renderer; @@ -357,6 +359,8 @@ int AppleseedRenderer::Render( { SuspendAll suspend(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); + std::string previous_locale(std::setlocale(LC_ALL, "C")); + m_time = time; if (view_params) @@ -445,6 +449,8 @@ int AppleseedRenderer::Render( if (progress_cb) progress_cb->SetTitle(_T("Done.")); + std::setlocale(LC_ALL, previous_locale.c_str()); + // Success. return 1; }