Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-12-05 00:49:02 +0300
committerTon Roosendaal <ton@blender.org>2004-12-05 00:49:02 +0300
commitaad31875d7224c58b1d94bd716bb5aab295fc8cb (patch)
tree8ef506c415f32ce8c5c5116c9f725f4369468852 /source/blender/blenkernel/intern/world.c
parent8d4782f7297c4a703b23b6b5383c0d76e4907903 (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/blenkernel/intern/world.c')
-rw-r--r--source/blender/blenkernel/intern/world.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 2f5b440a33a..9676f08ee78 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -69,7 +69,7 @@ void free_world(World *wrld)
BPY_free_scriptlink(&wrld->scriptlink);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
mtex= wrld->mtex[a];
if(mtex && mtex->tex) mtex->tex->id.us--;
if(mtex) MEM_freeN(mtex);
@@ -110,7 +110,7 @@ World *copy_world(World *wrld)
wrldn= copy_libblock(wrld);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
if(wrld->mtex[a]) {
wrldn->mtex[a]= MEM_mallocN(sizeof(MTex), "copymaterial");
memcpy(wrldn->mtex[a], wrld->mtex[a], sizeof(MTex));
@@ -196,7 +196,8 @@ void init_render_world()
Normalise(R.grvec);
Mat3CpyMat4(R.imat, R.viewinv);
- for(a=0; a<6; a++) if(R.wrld.mtex[a] && R.wrld.mtex[a]->tex) R.wrld.skytype |= WO_SKYTEX;
+ for(a=0; a<MAX_MTEX; a++)
+ if(R.wrld.mtex[a] && R.wrld.mtex[a]->tex) R.wrld.skytype |= WO_SKYTEX;
if(G.scene->camera && G.scene->camera->type==OB_CAMERA) {
Camera *cam= G.scene->camera->data;