diff options
author | Ton Roosendaal <ton@blender.org> | 2004-12-05 00:49:02 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-12-05 00:49:02 +0300 |
commit | aad31875d7224c58b1d94bd716bb5aab295fc8cb (patch) | |
tree | 8ef506c415f32ce8c5c5116c9f725f4369468852 /source/blender/src/header_buttonswin.c | |
parent | 8d4782f7297c4a703b23b6b5383c0d76e4907903 (diff) |
Special bf-committers request; Lamp/World/Material now each have 10
channels to link texture to.
The amount of code changes seems large, but is mostly getting rind of
hardcoded values (6 and 8) for channels, replacing it with MAX_MTEX.
Further did some fixes;
- Ipo for Lamp showed too many mapping channels
- Texture MapTo buttons for lamp missed the slider to blend texture color
- Lamp texture mapping "View" only worked for Spot, now it uses lamp-
view vector for all types. (Nice for projections!)
Diffstat (limited to 'source/blender/src/header_buttonswin.c')
-rw-r--r-- | source/blender/src/header_buttonswin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c index 1f53373c31a..d0375a0163e 100644 --- a/source/blender/src/header_buttonswin.c +++ b/source/blender/src/header_buttonswin.c @@ -99,7 +99,7 @@ void free_matcopybuf(void) extern MTex mtexcopybuf; /* buttons.c */ int a; - for(a=0; a<8; a++) { + for(a=0; a<MAX_MTEX; a++) { if(matcopybuf.mtex[a]) { MEM_freeN(matcopybuf.mtex[a]); matcopybuf.mtex[a]= NULL; @@ -153,7 +153,7 @@ void do_buts_buttons(short event) if(matcopybuf.ramp_col) matcopybuf.ramp_col= MEM_dupallocN(matcopybuf.ramp_col); if(matcopybuf.ramp_spec) matcopybuf.ramp_spec= MEM_dupallocN(matcopybuf.ramp_spec); - for(a=0; a<8; a++) { + for(a=0; a<MAX_MTEX; a++) { mtex= matcopybuf.mtex[a]; if(mtex) { matcopybuf.mtex[a]= MEM_dupallocN(mtex); @@ -168,7 +168,7 @@ void do_buts_buttons(short event) /* free current mat */ if(ma->ramp_col) MEM_freeN(ma->ramp_col); if(ma->ramp_spec) MEM_freeN(ma->ramp_spec); - for(a=0; a<8; a++) { + for(a=0; a<MAX_MTEX; a++) { mtex= ma->mtex[a]; if(mtex && mtex->tex) mtex->tex->id.us--; if(mtex) MEM_freeN(mtex); @@ -181,7 +181,7 @@ void do_buts_buttons(short event) if(matcopybuf.ramp_col) ma->ramp_col= MEM_dupallocN(matcopybuf.ramp_col); if(matcopybuf.ramp_spec) ma->ramp_spec= MEM_dupallocN(matcopybuf.ramp_spec); - for(a=0; a<8; a++) { + for(a=0; a<MAX_MTEX; a++) { mtex= ma->mtex[a]; if(mtex) { ma->mtex[a]= MEM_dupallocN(mtex); |