svn merge -r36583:36603 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / blenkernel / intern / displist.c
index 6d70572c8a40ce58e0eaad8c0d80a5e147bd3bbd..a3a91c3b4420a906dbd0056e58637a2f03fa1d51 100644 (file)
@@ -72,6 +72,8 @@
 
 #include "ED_curve.h" /* for BKE_curve_nurbs */
 
+extern Material defmaterial;   /* material.c */
+
 static void boundbox_displist(Object *ob);
 
 void free_disp_elem(DispList *dl)
@@ -552,7 +554,6 @@ static void mesh_create_shadedColors(Render *re, Object *ob, int onlyForMesh, un
        }               
 
        for (i=0; i<totface; i++) {
-               extern Material defmaterial;    /* material.c */
                MFace *mf= &mface[i];
                Material *ma= give_current_material(ob, mf->mat_nr+1);
                int j, vidx[4], nverts= mf->v4?4:3;
@@ -664,8 +665,6 @@ void shadeDispList(Scene *scene, Base *base)
                        dl= ob->disp.first;
                        
                        while(dl) {
-                               extern Material defmaterial;    /* material.c */
-                               
                                dlob= MEM_callocN(sizeof(DispList), "displistshade");
                                BLI_addtail(&ob->disp, dlob);
                                dlob->type= DL_VERTCOL;
@@ -734,8 +733,6 @@ void shadeDispList(Scene *scene, Base *base)
                                
                                if(dl->type==DL_INDEX4) {
                                        if(dl->nors) {
-                                               extern Material defmaterial;    /* material.c */
-                                               
                                                if(dl->col1) MEM_freeN(dl->col1);
                                                col1= dl->col1= MEM_mallocN(sizeof(int)*dl->nr, "col1");