Commit: 75f37feb5cfb77304fc67357759732797238409c
Author: Julian Eisel
Date:   Tue Aug 2 21:52:08 2016 +0200
Branches: master
https://developer.blender.org/rB75f37feb5cfb77304fc67357759732797238409c

Viewport: Make lights in local view behave like BI and Cycles

Ignore that lights are not included in local view, always render them if they 
are on the correct layers. BI and Cycles do this as well.

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

M       source/blender/editors/space_view3d/drawmesh.c

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

diff --git a/source/blender/editors/space_view3d/drawmesh.c 
b/source/blender/editors/space_view3d/drawmesh.c
index f5289a0..74a5049 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -435,12 +435,16 @@ static void draw_textured_begin(Scene *scene, View3D 
*v3d, RegionView3D *rv3d, O
        else {
                /* draw with lights in the scene otherwise */
                solidtex = false;
-               if (v3d->flag2 & V3D_SHADELESS_TEX)
+               if (v3d->flag2 & V3D_SHADELESS_TEX) {
                        Gtexdraw.is_lit = 0;
-               else
-                       Gtexdraw.is_lit = GPU_scene_object_lights(scene, ob, 
v3d->lay, rv3d->viewmat, !rv3d->is_persp);
+               }
+               else {
+                       Gtexdraw.is_lit = GPU_scene_object_lights(
+                                             scene, ob, v3d->localvd ? 
v3d->localvd->lay : v3d->lay,
+                                             rv3d->viewmat, !rv3d->is_persp);
+               }
        }
-       
+
        rgba_float_to_uchar(obcol, ob->col);
 
        if (solidtex || v3d->drawtype == OB_TEXTURE) is_tex = true;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to