Merged changes in the trunk up to revision 27992.
[blender.git] / source / blender / blenkernel / intern / material.c
index 6d1f9d1d1bfec208a7c5691c1fb1775b30ee2e29..1aa68bb832f60a602c5a0f1a1a51a0bdde5c387a 100644 (file)
@@ -1346,70 +1346,3 @@ void paste_matcopybuf(Material *ma)
        scrarea_queue_winredraw(curarea);
        */
 }
-
-
-static short mtexcopied=0; /* must be reset on file load */
-static MTex mtexcopybuf;
-
-void clear_mat_mtex_copybuf(void)
-{      /* use for file reload */
-       mtexcopied= 0;
-}
-
-void copy_mat_mtex_copybuf(ID *id)
-{
-       MTex **mtex= NULL;
-
-       switch(GS(id->name)) {
-       case ID_MA:
-               mtex= &(((Material *)id)->mtex[(int)((Material *)id)->texact]);
-               break;
-       case ID_LA:
-               // la->mtex[(int)la->texact] // TODO
-               break;
-       case ID_WO:
-               // mtex= wrld->mtex[(int)wrld->texact]; // TODO
-               break;
-       }
-
-       if(mtex && *mtex) {
-               memcpy(&mtexcopybuf, *mtex, sizeof(MTex));
-               mtexcopied= 1;
-       }
-       else {
-               mtexcopied= 0;
-       }
-}
-
-void paste_mat_mtex_copybuf(ID *id)
-{
-       MTex **mtex= NULL;
-
-       if(mtexcopied == 0 || mtexcopybuf.tex==NULL)
-               return;
-
-       switch(GS(id->name)) {
-       case ID_MA:
-               mtex= &(((Material *)id)->mtex[(int)((Material *)id)->texact]);
-               break;
-       case ID_LA:
-               // la->mtex[(int)la->texact] // TODO
-               break;
-       case ID_WO:
-               // mtex= wrld->mtex[(int)wrld->texact]; // TODO
-               break;
-       }
-
-       if(mtex) {
-               if(*mtex==NULL) {
-                       *mtex= MEM_mallocN(sizeof(MTex), "mtex copy");
-               }
-               else if((*mtex)->tex) {
-                       (*mtex)->tex->id.us--;
-               }
-
-               memcpy(*mtex, &mtexcopybuf, sizeof(MTex));
-
-               id_us_plus((ID *)mtexcopybuf.tex);
-       }
-}