Index: source/blender/src/previewrender.c =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/src/previewrender.c,v retrieving revision 1.72 diff -u -r1.72 previewrender.c --- source/blender/src/previewrender.c 1 Apr 2006 14:08:57 -0000 1.72 +++ source/blender/src/previewrender.c 8 Jun 2006 03:52:03 -0000 @@ -269,9 +269,26 @@ if(id_type==ID_MA) { Material *mat= (Material *)id; - sce->r.mode |= R_SHADOW; - if(id) { + /* turn on raytracing if needed */ + if((mat->mode & MA_RAYTRANSP) || (mat->mode & MA_RAYMIRROR)) + sce->r.mode |= R_RAYTRACE; + + /* turn off fake shadows if needed */ + /* this only works in a specific case where the preview.blend contains + * an object starting with 'c' which has a material linked to it (not the obdata) + * and that material has a fake shadow texture in the active texture slot */ + for(base= sce->base.first; base; base= base->next) { + if(base->object->id.name[2]=='c') { + Material *shadmat= give_current_material(base->object, base->object->actcol); + if(shadmat) { + if (mat->mode & MA_SHADBUF) shadmat->septex = 0; + else shadmat->septex |= 1; + } + } + } + + if(pr_method==PR_ICON_RENDER) { sce->lay= 1<