diff options
author | Matt Ebb <matt@mke3.net> | 2010-03-29 09:37:34 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-03-29 09:37:34 +0400 |
commit | bd7ed4f077d3ff86c1043642b5d228a95d9334a6 (patch) | |
tree | 1ffd8bdd0e22d24b88d64825bfc1d65158e0a1a2 /source/blender/blenkernel | |
parent | a59d24fd94d3a5426c13439dc912551e7d81d8fd (diff) |
Fix [#21708] Copy/Paste Texture channels for Lamps/World not working
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index e877abea7cf..3b17ac1db1a 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -1345,70 +1345,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); - } -} |