[Bf-blender-cvs] [1f0f71eb953] greasepencil-refactor: GPencil: Use main Use Lights switch at object level

Antonio Vazquez noreply at git.blender.org
Mon Jan 6 20:32:29 CET 2020


Commit: 1f0f71eb9531d9be04786b71454cf0f74f936ad1
Author: Antonio Vazquez
Date:   Mon Jan 6 20:32:19 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB1f0f71eb9531d9be04786b71454cf0f74f936ad1

GPencil: Use main Use Lights switch at object level

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_engine.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 754965e23e9..55efa812851 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -992,7 +992,8 @@ static void gp_layer_cache_populate(bGPDlayer *gpl,
    * Convert to world units (by default, 1 meter = 2000 px). */
   float thickness_scale = (is_screenspace) ? -1.0f : (gpd->pixfactor / GPENCIL_PIXEL_FACTOR);
 
-  const bool use_lights = (gpl->flag & GP_LAYER_USE_LIGHTS) != 0;
+  const bool use_lights = (((gpl->flag & GP_LAYER_USE_LIGHTS) != 0) &&
+                           (iter->ob->dtx & OB_USE_GPENCIL_LIGHTS));
   iter->ubo_lights = (use_lights) ? iter->pd->global_light_pool->ubo :
                                     iter->pd->shadeless_light_pool->ubo;



More information about the Bf-blender-cvs mailing list