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/outliner.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/outliner.c')
-rw-r--r-- | source/blender/src/outliner.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index 7db1318d214..5181d253d6e 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -519,7 +519,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i Material *ma= (Material *)id; outliner_add_element(soops, &te->subtree, ma->ipo, te, 0, 0); - for(a=0; a<8; a++) { + for(a=0; a<MAX_MTEX; a++) { if(ma->mtex[a]) outliner_add_element(soops, &te->subtree, ma->mtex[a]->tex, te, 0, a); } } @@ -542,7 +542,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i { Lamp *la= (Lamp *)id; outliner_add_element(soops, &te->subtree, la->ipo, te, 0, 0); - for(a=0; a<6; a++) { + for(a=0; a<MAX_MTEX; a++) { if(la->mtex[a]) outliner_add_element(soops, &te->subtree, la->mtex[a]->tex, te, 0, a); } } @@ -551,7 +551,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i { World *wrld= (World *)id; outliner_add_element(soops, &te->subtree, wrld->ipo, te, 0, 0); - for(a=0; a<6; a++) { + for(a=0; a<MAX_MTEX; a++) { if(wrld->mtex[a]) outliner_add_element(soops, &te->subtree, wrld->mtex[a]->tex, te, 0, a); } } @@ -1600,25 +1600,23 @@ static void unlink_material_cb(TreeElement *te, TreeStoreElem *tsep) static void unlink_texture_cb(TreeElement *te, TreeStoreElem *tsep) { MTex **mtex= NULL; - int tottex= 0; int a; if( GS(tsep->id->name)==ID_MA) { Material *ma= (Material *)tsep->id; mtex= ma->mtex; - tottex= 8; } else if( GS(tsep->id->name)==ID_LA) { Lamp *la= (Lamp *)tsep->id; mtex= la->mtex; - tottex= 6; } else if( GS(tsep->id->name)==ID_WO) { World *wrld= (World *)tsep->id; mtex= wrld->mtex; - tottex= 6; } - for(a=0; a<tottex; a++) { + else return; + + for(a=0; a<MAX_MTEX; a++) { if(a==te->index && mtex[a]) { if(mtex[a]->tex) { mtex[a]->tex->id.us--; |