diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-28 11:45:29 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-28 11:45:29 +0300 |
commit | e2e72a20ec979984114069f55363785f72428f28 (patch) | |
tree | 99e3cecf6daa45f0532ab6e7ab898cc1c9456228 /intern/cycles | |
parent | 8a9dd6f6fb35c51d38ad0a0e0c11611704262cc6 (diff) |
Fix T47931: Missed world shader update when having object dependency
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 30985226e56..749b8c0319b 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -133,10 +133,18 @@ bool BlenderSync::sync_recalc() BL::BlendData::worlds_iterator b_world; for(b_data.worlds.begin(b_world); b_world != b_data.worlds.end(); ++b_world) { - if(world_map == b_world->ptr.data && - (b_world->is_updated() || (b_world->node_tree() && b_world->node_tree().is_updated()))) - { - world_recalc = true; + if(world_map == b_world->ptr.data) { + if(b_world->is_updated() || + (b_world->node_tree() && b_world->node_tree().is_updated())) + { + world_recalc = true; + } + else if(b_world->node_tree() && b_world->use_nodes()) { + Shader *shader = scene->shaders[scene->default_background]; + if(has_updated_objects && shader != NULL && shader->has_object_dependency) { + world_recalc = true; + } + } } } |