Fix Cycles OpenCL compile waiting unnecessarily for background shader.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 17 Mar 2019 00:56:08 +0000 (01:56 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 17 Mar 2019 11:01:19 +0000 (12:01 +0100)
Makes preview kernel appear quicker when background color is fixed.

intern/cycles/render/light.cpp

index f60fba6..8073c62 100644 (file)
@@ -184,7 +184,7 @@ LightManager::~LightManager()
 bool LightManager::has_background_light(Scene *scene)
 {
        foreach(Light *light, scene->lights) {
-               if(light->type == LIGHT_BACKGROUND) {
+               if(light->type == LIGHT_BACKGROUND && light->is_enabled) {
                        return true;
                }
        }