[Bf-blender-cvs] [56bccd2395e] blender-v2.92-release: Fix T83450: Missing 4th studio light in preview icon

Nathan Craddock noreply at git.blender.org
Tue Feb 2 16:25:27 CET 2021


Commit: 56bccd2395e4dd205ab6e426b24269c70534ea85
Author: Nathan Craddock
Date:   Mon Feb 1 21:41:48 2021 -0700
Branches: blender-v2.92-release
https://developer.blender.org/rB56bccd2395e4dd205ab6e426b24269c70534ea85

Fix T83450: Missing 4th studio light in preview icon

Due to an off-by-one error the generated studio light icons did not show
the influence of the 4th light. This fix changes the loop to iterate
over all of the lights when computing the lighting.

Differential Revision: https://developer.blender.org/D10283

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

M	source/blender/blenkernel/intern/studiolight.c

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

diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c
index b7b5b6997c2..5bffcd4d9e7 100644
--- a/source/blender/blenkernel/intern/studiolight.c
+++ b/source/blender/blenkernel/intern/studiolight.c
@@ -1065,7 +1065,7 @@ static void studiolight_lights_eval(StudioLight *sl, float color[3], const float
   copy_v3_v3(spec_light, sl->light_ambient);
 
   reflect_v3_v3v3(R, I, N);
-  for (int i = 0; i < 3; i++) {
+  for (int i = 0; i < STUDIOLIGHT_MAX_LIGHT; i++) {
     SolidLight *light = &sl->light[i];
     if (light->flag) {
       /* Diffuse lighting */



More information about the Bf-blender-cvs mailing list