Blender Internal: Add material property "Cast" which can disable both ray and buffer...
[blender.git] / source / blender / editors / space_view3d / drawobject.c
index dc1d762d9049ca49377bb2aadaa000881779ded1..98f728ea26cbdf3464895971bf7c8d579645ca76 100644 (file)
@@ -3768,7 +3768,7 @@ static bool draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3
        if (v3d->flag2 & V3D_RENDER_SHADOW) {
                for (i = 0; i < ob->totcol; ++i) {
                        Material *ma = give_current_material(ob, i);
-                       if (ma && !(ma->mode & MA_SHADBUF)) {
+                       if (ma && !(ma->mode2 & MA_CASTSHADOW)) {
                                return true;
                        }
                }