From 0257ff76e7b0bdcb70a0a865696873659a3cfb05 Mon Sep 17 00:00:00 2001 From: Simon Wendsche Date: Wed, 25 Sep 2019 17:31:16 +0200 Subject: [PATCH] don't warn about hybrid render artifacts if light tracing is used --- ui/render_performance.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/ui/render_performance.py b/ui/render_performance.py index a84ff718..92469d5b 100644 --- a/ui/render_performance.py +++ b/ui/render_performance.py @@ -5,6 +5,13 @@ from . import icons +def _show_hybrid_metropolis_warning(context): + config = context.scene.luxcore.config + opencl = context.scene.luxcore.opencl + return (config.engine == "PATH" and config.device == "OCL" and not config.path.hybridbackforward_enable + and config.sampler == "METROPOLIS" and opencl.use_native_cpu) + + class LUXCORE_RENDER_PT_performance(RenderButtonsPanel, Panel): COMPAT_ENGINES = {"LUXCORE"} bl_label = "Performance" @@ -20,12 +27,6 @@ def _draw_devices(self, layout, devices): for device in devices: layout.prop(device, "enabled", text=device.name) - def _show_hybrid_metropolis_warning(self, context): - config = context.scene.luxcore.config - opencl = context.scene.luxcore.opencl - return (config.engine == "PATH" and config.device == "OCL" - and config.sampler == "METROPOLIS" and opencl.use_native_cpu) - def _show_openCL_device_warning(self, context): config = context.scene.luxcore.config opencl = context.scene.luxcore.opencl @@ -44,7 +45,7 @@ def draw_header(self, context): opencl = context.scene.luxcore.opencl layout = self.layout - if self._show_hybrid_metropolis_warning(context): + if _show_hybrid_metropolis_warning(context): self.layout.label(text="", icon=icons.WARNING) if self._show_openCL_device_warning(context): @@ -81,12 +82,6 @@ def poll(cls, context): config = context.scene.luxcore.config return context.scene.render.engine == "LUXCORE" and config.engine == "PATH" and config.device == "OCL" - def _show_hybrid_metropolis_warning(self, context): - config = context.scene.luxcore.config - opencl = context.scene.luxcore.opencl - return (config.engine == "PATH" and config.device == "OCL" - and config.sampler == "METROPOLIS" and opencl.use_native_cpu) - def draw_header(self, context): opencl = context.scene.luxcore.opencl layout = self.layout @@ -108,7 +103,7 @@ def draw(self, context): sub.enabled = context.scene.render.threads_mode == 'FIXED' sub.prop(context.scene.render, "threads") - if self._show_hybrid_metropolis_warning(context): + if _show_hybrid_metropolis_warning(context): col = layout.column(align=True) col.label(text="CPU should be disabled if Metropolis", icon=icons.WARNING) col.label(text="sampler is used (can cause artifacts)")