diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2021-02-02 07:41:48 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2021-02-02 18:23:13 +0300 |
commit | 56bccd2395e4dd205ab6e426b24269c70534ea85 (patch) | |
tree | aae6d1f20def4916a78e7432a18f37dfb256e4d5 | |
parent | a1c7cab06cc5473273a711200b6b5d0a96fb1c21 (diff) |
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
-rw-r--r-- | source/blender/blenkernel/intern/studiolight.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |