From befb9d99f880d13471e4c8cfca0604a6f5f0212f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Wed, 23 Jun 2021 16:07:06 +0200 Subject: Fix T89331: Cycles lights flicker when transformed The check on the transformation introduced in rBb313525c1bd0 to fix T88515 would sometimes prevent to update the light if the Blender object changed. To fix this, reverse the order in which the checks happen so that we do not shortcuit the object change check. --- intern/cycles/blender/blender_light.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/blender/blender_light.cpp b/intern/cycles/blender/blender_light.cpp index ae353b32633..50cd9e3db5c 100644 --- a/intern/cycles/blender/blender_light.cpp +++ b/intern/cycles/blender/blender_light.cpp @@ -44,7 +44,7 @@ void BlenderSync::sync_light(BL::Object &b_parent, const bool tfm_updated = (light && light->get_tfm() != tfm); /* Update if either object or light data changed. */ - if (!tfm_updated && !light_map.add_or_update(&light, b_ob, b_parent, key)) { + if (!light_map.add_or_update(&light, b_ob, b_parent, key) && !tfm_updated) { Shader *shader; if (!shader_map.add_or_update(&shader, b_light)) { if (light->get_is_portal()) -- cgit v1.2.3