diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-09-05 20:05:00 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-09-05 20:05:47 +0300 |
commit | 8f509698d796f04b149d254542f39f1f59b33465 (patch) | |
tree | 4b0d0cacfc3f3e0844d087b846360c1689d0dead | |
parent | 56d2f4c20a8efcc839afbe31a3de2da15c34b54f (diff) |
Fix cast shadows (material option) in the viewport
Fix cast shadows options (in material tab) not working in the viewport.
An off-by-one error. See D2194 for more.
Committing for Ulysse Martin (youle) who found & fixed this.
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 47390578573..6ae2229af8e 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -4227,7 +4227,7 @@ static bool draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3 /* If we are drawing shadows and any of the materials don't cast a shadow, * then don't draw the object */ if (v3d->flag2 & V3D_RENDER_SHADOW) { - for (int i = 0; i < ob->totcol; ++i) { + for (int i = 1; i <= ob->totcol; ++i) { Material *ma = give_current_material(ob, i); if (ma && !(ma->mode2 & MA_CASTSHADOW)) { return true; |