svn merge -r39664:39762 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Mon, 29 Aug 2011 00:46:56 +0000 (00:46 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 29 Aug 2011 00:46:56 +0000 (00:46 +0000)
27 files changed:
1  2 
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/BLI_utildefines.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/callbacks.c
source/blender/blenlib/intern/math_vector_inline.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/armature/editarmature.c
source/blender/editors/include/ED_view3d.h
source/blender/editors/object/object_modifier.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/render/intern/source/convertblender.c
source/blender/windowmanager/intern/wm_init_exit.c
source/gameengine/Converter/BL_BlenderDataConversion.cpp

index 59b4652659643ad20146f465cb77288e08d22881,638d197ccf7ddca9cc2abe5ef4f960218eea0329..4b560048b68cd1321e8fd12dc1e553ae28dc9abe
@@@ -2911,8 -2843,19 +2911,19 @@@ static int draw_mesh_object(Scene *scen
        Object *ob= base->object;
        Object *obedit= scene->obedit;
        Mesh *me= ob->data;
 -      EditMesh *em= me->edit_mesh;
 +      BMEditMesh *em= me->edit_btmesh;
-       int do_alpha_pass= 0, drawlinked= 0, retval= 0, glsl, check_alpha;
+       int do_alpha_pass= 0, drawlinked= 0, retval= 0, glsl, check_alpha, i;
+       /* 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(i=0; i<ob->totcol; ++i) {
+                       Material *ma= give_current_material(ob, i);
+                       if (ma && !(ma->mode & MA_SHADBUF)) {
+                               return 1;
+                       }
+               }
+       }
        
        if(obedit && ob!=obedit && ob->data==obedit->data) {
                if(ob_get_key(ob) || ob_get_key(obedit));
@@@ -6584,20 -6516,19 +6594,19 @@@ void draw_object_backbufsel(Scene *scen
  
        switch( ob->type) {
        case OB_MESH:
-       {
                if(ob->mode & OB_MODE_EDIT) {
                        Mesh *me= ob->data;
 -                      EditMesh *em= me->edit_mesh;
 +                      BMEditMesh *em= me->edit_btmesh;
  
 -                      DerivedMesh *dm = editmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH);
 +                      DerivedMesh *dm = editbmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH);
  
 -                      EM_init_index_arrays(em, 1, 1, 1);
 +                      EDBM_init_index_arrays(em, 1, 1, 1);
  
 -                      bbs_mesh_solid_EM(scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE);
 +                      bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE);
                        if(ts->selectmode & SCE_SELECT_FACE)
 -                              em_solidoffs = 1+em->totface;
 +                              bm_solidoffs = 1+em->bm->totface;
                        else
 -                              em_solidoffs= 1;
 +                              bm_solidoffs= 1;
                        
                        bglPolygonOffset(rv3d->dist, 1.0);
                        
  
                        dm->release(dm);
  
 -                      EM_free_index_arrays();
 +                      EDBM_free_index_arrays(em);
                }
-               else bbs_mesh_solid(scene, ob);
-       }
+               else {
+                       bbs_mesh_solid(scene, ob);
+               }
                break;
        case OB_CURVE:
        case OB_SURF: