Material Node Shader crash: new "layered UV" option required a better
version patch... now patches all 2.42.x files, and not only the 2.42.2 and
older :). Yes, subversioning doesn't always make things easier.
This commit is contained in:
Ton Roosendaal 2007-01-13 10:52:39 +00:00
parent cc041b114b
commit 5fd071070b

@ -4191,6 +4191,12 @@ static void ntree_version_242(bNodeTree *ntree)
} }
} }
} }
else if(ntree->type==NTREE_SHADER) {
for(node= ntree->nodes.first; node; node= node->next)
if(node->type == SH_NODE_GEOMETRY && node->storage == NULL)
node->storage= MEM_callocN(sizeof(NodeGeometry), "NodeGeometry");
}
} }
@ -4328,11 +4334,6 @@ static void do_version_ntree_242_2(bNodeTree *ntree)
} }
} }
} }
else if(ntree->type==NTREE_SHADER) {
for(node= ntree->nodes.first; node; node= node->next)
if(node->type == SH_NODE_GEOMETRY && node->storage == NULL)
node->storage= MEM_callocN(sizeof(NodeGeometry), "NodeGeometry");
}
} }
static void do_versions(FileData *fd, Library *lib, Main *main) static void do_versions(FileData *fd, Library *lib, Main *main)
@ -6254,6 +6255,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for(ma = main->mat.first; ma; ma= ma->id.next) { for(ma = main->mat.first; ma; ma= ma->id.next) {
if(ma->shad_alpha==0.0f) if(ma->shad_alpha==0.0f)
ma->shad_alpha= 1.0f; ma->shad_alpha= 1.0f;
if(ma->nodetree)
ntree_version_242(ma->nodetree);
} }
for(me=main->mesh.first; me; me=me->id.next) for(me=main->mesh.first; me; me=me->id.next)