[Bf-blender-cvs] [75f37fe] master: Viewport: Make lights in local view behave like BI and Cycles
Julian Eisel
noreply at git.blender.org
Tue Aug 2 21:59:12 CEST 2016
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;
More information about the Bf-blender-cvs
mailing list