[Bf-blender-cvs] [b0951f4] master: Fix T46212: blender internal lights in exclusive light group wrong in viewport.
Brecht Van Lommel
noreply at git.blender.org
Sun Sep 27 02:21:38 CEST 2015
Commit: b0951f49547475e5f9749bc2db8fa2b30f7be13c
Author: Brecht Van Lommel
Date: Sun Sep 27 02:17:12 2015 +0200
Branches: master
https://developer.blender.org/rBb0951f49547475e5f9749bc2db8fa2b30f7be13c
Fix T46212: blender internal lights in exclusive light group wrong in viewport.
===================================================================
M source/blender/render/intern/source/envmap.c
===================================================================
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index b9b908f..d70cc4b 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -262,7 +262,6 @@ static void env_set_imats(Render *re)
void env_rotate_scene(Render *re, float mat[4][4], int do_rotate)
{
- GroupObject *go;
ObjectRen *obr;
ObjectInstanceRen *obi;
LampRen *lar = NULL;
@@ -321,19 +320,18 @@ void env_rotate_scene(Render *re, float mat[4][4], int do_rotate)
invert_m4(obr->ob->imat_ren);
}
- for (go = re->lights.first; go; go = go->next) {
- lar = go->lampren;
-
+ for (lar = re->lampren.first; lar; lar = lar->next) {
+ float lamp_imat[4][4];
+
/* copy from add_render_lamp */
if (do_rotate == 1)
mul_m4_m4m4(tmpmat, re->viewmat, lar->lampmat);
else
mul_m4_m4m4(tmpmat, re->viewmat_orig, lar->lampmat);
- invert_m4_m4(go->ob->imat, tmpmat);
-
+
+ invert_m4_m4(lamp_imat, tmpmat);
copy_m3_m4(lar->mat, tmpmat);
-
- copy_m3_m4(lar->imat, go->ob->imat);
+ copy_m3_m4(lar->imat, lamp_imat);
lar->vec[0]= -tmpmat[2][0];
lar->vec[1]= -tmpmat[2][1];
More information about the Bf-blender-cvs
mailing list