diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-26 15:28:26 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-26 16:06:49 +0300 |
commit | 4f386999ea92ad0f22bffa151581cf5c615c660b (patch) | |
tree | 9ff57aa48db1db699adf4376695eef9dc600e1bb /intern/cycles/blender/blender_object.cpp | |
parent | 6d64565524a24f79ec86b29b3e4aabb5335aa258 (diff) |
Fix T66111: animated lights not updating in Cycles
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index c07e896ab33..17a0dbb43e7 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -116,15 +116,18 @@ void BlenderSync::sync_light(BL::Object &b_parent, /* test if we need to sync */ Light *light; ObjectKey key(b_parent, persistent_id, b_ob_instance); + BL::Light b_light(b_ob.data()); + /* Update if either object or light data changed. */ if (!light_map.sync(&light, b_ob, b_parent, key)) { - if (light->is_portal) - *use_portal = true; - return; + Shader *shader; + if (!shader_map.sync(&shader, b_light)) { + if (light->is_portal) + *use_portal = true; + return; + } } - BL::Light b_light(b_ob.data()); - /* type */ switch (b_light.type()) { case BL::Light::type_POINT: { |