* correct bad pointer check in expand_local_mesh()
authorCampbell Barton <ideasman42@gmail.com>
Wed, 15 Feb 2012 14:40:45 +0000 (14:40 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 15 Feb 2012 14:40:45 +0000 (14:40 +0000)
* check total polygons rather then faces in draw_mesh_object()

source/blender/blenkernel/intern/mesh.c
source/blender/editors/space_view3d/drawobject.c

index 2d3c4e8669b8fe13e626bd186be2b5538de131c4..05c90bf4d0c46c7673247cb0b1d325a3f4417211 100644 (file)
@@ -538,7 +538,7 @@ static void expand_local_mesh(Mesh *me)
 {
        id_lib_extern((ID *)me->texcomesh);
 
-       if(me->mtface) {
+       if(me->mtface || me->mtpoly) {
                int a, i;
 
                for(i=0; i<me->pdata.totlayer; i++) {
index cf5192e0e7bb4f61dad71d5a04c664dd7e6378cf..0dfb2f032f21d7c02d363eae6e78d5e4caec7350 100644 (file)
@@ -3502,7 +3502,7 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
        }
        else {
                /* don't create boundbox here with mesh_get_bb(), the derived system will make it, puts deformed bb's OK */
-               if(me->totface<=4 || ED_view3d_boundbox_clip(rv3d, ob->obmat, (ob->bb)? ob->bb: me->bb)) {
+               if(me->totpoly <= 4 || ED_view3d_boundbox_clip(rv3d, ob->obmat, (ob->bb)? ob->bb: me->bb)) {
                        glsl = draw_glsl_material(scene, ob, v3d, dt);
                        check_alpha = check_alpha_pass(base);