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/blenloader/intern
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/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c18
-rw-r--r--source/blender/blenloader/intern/writefile.c6
2 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 18c70b0586b..3c87de94b5f 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1542,7 +1542,7 @@ static void lib_link_lamp(FileData *fd, Main *main)
while(la) {
if(la->id.flag & LIB_NEEDLINK) {
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
mtex= la->mtex[a];
if(mtex) {
mtex->tex= newlibadr_us(fd, la->id.lib, mtex->tex);
@@ -1566,7 +1566,7 @@ static void direct_link_lamp(FileData *fd, Lamp *la)
direct_link_scriptlink(fd, &la->scriptlink);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
la->mtex[a]= newdataadr(fd, la->mtex[a]);
}
}
@@ -1691,7 +1691,7 @@ static void lib_link_world(FileData *fd, Main *main)
wrld->ipo= newlibadr_us(fd, wrld->id.lib, wrld->ipo);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
mtex= wrld->mtex[a];
if(mtex) {
mtex->tex= newlibadr_us(fd, wrld->id.lib, mtex->tex);
@@ -1713,7 +1713,7 @@ static void direct_link_world(FileData *fd, World *wrld)
direct_link_scriptlink(fd, &wrld->scriptlink);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
wrld->mtex[a]= newdataadr(fd, wrld->mtex[a]);
}
}
@@ -1985,7 +1985,7 @@ static void lib_link_material(FileData *fd, Main *main)
ma->ipo= newlibadr_us(fd, ma->id.lib, ma->ipo);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
mtex= ma->mtex[a];
if(mtex) {
mtex->tex= newlibadr_us(fd, ma->id.lib, mtex->tex);
@@ -2005,7 +2005,7 @@ static void direct_link_material(FileData *fd, Material *ma)
direct_link_scriptlink(fd, &ma->scriptlink);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
ma->mtex[a]= newdataadr(fd, ma->mtex[a]);
}
@@ -4805,7 +4805,7 @@ static void expand_material(FileData *fd, Main *mainvar, Material *ma)
{
int a;
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
if(ma->mtex[a]) {
expand_doit(fd, mainvar, ma->mtex[a]->tex);
expand_doit(fd, mainvar, ma->mtex[a]->object);
@@ -4818,7 +4818,7 @@ static void expand_lamp(FileData *fd, Main *mainvar, Lamp *la)
{
int a;
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
if(la->mtex[a]) {
expand_doit(fd, mainvar, la->mtex[a]->tex);
expand_doit(fd, mainvar, la->mtex[a]->object);
@@ -4838,7 +4838,7 @@ static void expand_world(FileData *fd, Main *mainvar, World *wrld)
{
int a;
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
if(wrld->mtex[a]) {
expand_doit(fd, mainvar, wrld->mtex[a]->tex);
expand_doit(fd, mainvar, wrld->mtex[a]->object);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 4a2dfd4889b..a325749dede 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -960,7 +960,7 @@ static void write_materials(WriteData *wd, ListBase *idbase)
/* write LibData */
writestruct(wd, ID_MA, "Material", 1, ma);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
if(ma->mtex[a]) writestruct(wd, DATA, "MTex", 1, ma->mtex[a]);
}
@@ -984,7 +984,7 @@ static void write_worlds(WriteData *wd, ListBase *idbase)
/* write LibData */
writestruct(wd, ID_WO, "World", 1, wrld);
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
if(wrld->mtex[a]) writestruct(wd, DATA, "MTex", 1, wrld->mtex[a]);
}
@@ -1006,7 +1006,7 @@ static void write_lamps(WriteData *wd, ListBase *idbase)
writestruct(wd, ID_LA, "Lamp", 1, la);
/* direct data */
- for(a=0; a<8; a++) {
+ for(a=0; a<MAX_MTEX; a++) {
if(la->mtex[a]) writestruct(wd, DATA, "MTex", 1, la->mtex[a]);
}