TexFace to Material Settings big patch
[blender.git] / source / blender / blenkernel / intern / DerivedMesh.c
index 1660ac29217bc19c9be5284b7b8b0d77e0e6da8f..cac7da76e07bc779e2084463cfb8ac208012e16f 100644 (file)
@@ -988,15 +988,12 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
        EditFace *efa;
        DMVertexAttribs attribs= {{{0}}};
        GPUVertexAttribs gattribs;
-       MTFace *tf;
-       int transp, new_transp, orig_transp, tfoffset;
+       int tfoffset;
        int i, b, matnr, new_matnr, dodraw, layer;
 
        dodraw = 0;
        matnr = -1;
 
-       transp = GPU_get_material_blend_mode();
-       orig_transp = transp;
        layer = CustomData_get_layer_index(&em->fdata, CD_MTFACE);
        tfoffset = (layer == -1)? -1: em->fdata.layers[layer].offset;
 
@@ -1040,19 +1037,6 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
                                DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
                }
 
-               if(tfoffset != -1) {
-                       tf = (MTFace*)((char*)efa->data)+tfoffset;
-                       new_transp = tf->transp;
-
-                       if(new_transp != transp) {
-                               if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
-                                       GPU_set_material_blend_mode(orig_transp);
-                               else
-                                       GPU_set_material_blend_mode(new_transp);
-                               transp = new_transp;
-                       }
-               }
-
                if(dodraw) {
                        glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
                        if (!drawSmooth) {