diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-06-23 17:07:06 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-06-23 17:07:06 +0300 |
commit | befb9d99f880d13471e4c8cfca0604a6f5f0212f (patch) | |
tree | 1dc7b481c4cca6094d9e345016bc3913a1a0a5ae /intern | |
parent | b964f73e7dc435b8b455b4ffbef7132aaeef1e0d (diff) |
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.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/blender_light.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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()) |