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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 22:35:32 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 22:35:32 +0300
commit2156ddc52947bb7667699478d06256b0362286bb (patch)
tree80c925c4ea7a1e187e2d87ac6a44bec03368723f /source/blender/blenloader
parent58b89bbac30a65ae8a7bc0f2063422670e3ec0b1 (diff)
Fix part of #19858: texture node outputs don't work separately, the meaning
of node output indices was changed without a version patch.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 14995944048..84cb61af5ae 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9632,6 +9632,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
bSound *sound;
Sequence *seq;
bActuator *act;
+ int a;
for(sound = main->sound.first; sound; sound = sound->id.next)
{
@@ -9704,6 +9705,15 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for(ma= main->mat.first; ma; ma= ma->id.next) {
if(ma->nodetree && strlen(ma->nodetree->id.name)==0)
strcpy(ma->nodetree->id.name, "NTShader Nodetree");
+
+ /* which_output 0 is now "not specified" */
+ for(a=0; a<MAX_MTEX; a++) {
+ if(ma->mtex[a]) {
+ tx= newlibadr(fd, lib, ma->mtex[a]->tex);
+ if(tx && tx->use_nodes)
+ ma->mtex[a]->which_output++;
+ }
+ }
}
/* and composit trees */
for(sce= main->scene.first; sce; sce= sce->id.next) {
@@ -9726,8 +9736,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
/* and texture trees */
for(tx= main->tex.first; tx; tx= tx->id.next) {
- if(tx->nodetree && strlen(tx->nodetree->id.name)==0)
- strcpy(tx->nodetree->id.name, "NTTexture Nodetree");
+ bNode *node;
+
+ if(tx->nodetree) {
+ if(strlen(tx->nodetree->id.name)==0)
+ strcpy(tx->nodetree->id.name, "NTTexture Nodetree");
+
+ /* which_output 0 is now "not specified" */
+ for(node=tx->nodetree->nodes.first; node; node=node->next)
+ if(node->type == TEX_NODE_OUTPUT)
+ node->custom1++;
+ }
}
/* copy standard draw flag to meshes(used to be global, is not available here) */