From 84698f39cb8e6fd0af2a9d460275256ab1b5e307 Mon Sep 17 00:00:00 2001 From: Franz Beaune Date: Mon, 22 May 2017 09:19:43 +0200 Subject: [PATCH] Update handling of bounce limits --- .../appleseedrenderer/appleseedrendererparamdlg.cpp | 4 ---- .../appleseedrenderer/renderersettings.cpp | 7 ++++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/appleseed-max-impl/appleseedrenderer/appleseedrendererparamdlg.cpp b/src/appleseed-max-impl/appleseedrenderer/appleseedrendererparamdlg.cpp index 600c0a3..8e8a69b 100644 --- a/src/appleseed-max-impl/appleseedrenderer/appleseedrendererparamdlg.cpp +++ b/src/appleseed-max-impl/appleseedrenderer/appleseedrendererparamdlg.cpp @@ -447,10 +447,6 @@ namespace void enable_disable_controls() { - EnableWindow(m_static_bounces, m_settings.m_gi ? TRUE : FALSE); - m_text_bounces->Enable(m_settings.m_gi); - m_spinner_bounces->Enable(m_settings.m_gi); - EnableWindow(m_check_caustics, m_settings.m_gi ? TRUE : FALSE); EnableWindow(m_check_max_ray_intensity, m_settings.m_gi ? TRUE : FALSE); diff --git a/src/appleseed-max-impl/appleseedrenderer/renderersettings.cpp b/src/appleseed-max-impl/appleseedrenderer/renderersettings.cpp index 74a2b5f..12779e1 100644 --- a/src/appleseed-max-impl/appleseedrenderer/renderersettings.cpp +++ b/src/appleseed-max-impl/appleseedrenderer/renderersettings.cpp @@ -91,9 +91,10 @@ void RendererSettings::apply_common_settings(asr::Project& project, const char* params.insert_path("sampling_mode", "qmc"); - if (m_gi) - params.insert_path("pt.max_path_length", m_bounces == 0 ? 0 : m_bounces + 1); - else params.insert_path("pt.max_path_length", 1); + if (!m_gi) + params.insert_path("pt.max_diffuse_bounces", 0); + + params.insert_path("pt.max_bounces", m_bounces); params.insert_path("pt.enable_caustics", m_caustics);