Fix T46842: Removing World is missing AO update in viewport render
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 23 Nov 2015 12:24:49 +0000 (17:24 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 23 Nov 2015 12:44:52 +0000 (17:44 +0500)
intern/cycles/blender/blender_shader.cpp

index 2beeaa5e07abbecafb6ca97d934bdd8e321c7a93..81204aaa13a6aba209f6ac9c54e9da50cfbb1d20 100644 (file)
@@ -1167,6 +1167,10 @@ void BlenderSync::sync_world(bool update_all)
 
                        background->visibility = visibility;
                }
+               else {
+                       background->ao_factor = 0.0f;
+                       background->ao_distance = FLT_MAX;
+               }
 
                shader->set_graph(graph);
                shader->tag_update(scene);