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:
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenloader/intern/readfile.c28
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c7
2 files changed, 34 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e663bd35fa4..33fe1b36f52 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4633,6 +4633,26 @@ static void do_version_ntree_242_2(bNodeTree *ntree)
}
}
+static void ntree_version_245(bNodeTree *ntree)
+{
+ bNode *node;
+ NodeTwoFloats *ntf;
+
+ if(ntree->type==NTREE_COMPOSIT) {
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->type == CMP_NODE_ALPHAOVER) {
+ if(!node->storage) {
+ ntf= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
+ node->storage= ntf;
+ if(node->custom1)
+ ntf->x= 1.0f;
+ }
+ }
+ }
+ }
+}
+
+
static void do_versions(FileData *fd, Library *lib, Main *main)
{
/* WATCH IT!!!: pointers from libdata have not been converted */
@@ -6789,6 +6809,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
ParticleSettings *part;
World *wrld;
Mesh *me;
+ bNodeTree *ntree;
/* unless the file was created 2.44.3 but not 2.45, update the constraints */
if ( !(main->versionfile==244 && main->subversionfile==3) &&
@@ -6973,6 +6994,13 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
wrld->ao_approx_error= 0.25f;
}
+ for(sce= main->scene.first; sce; sce= sce->id.next)
+ if(sce->nodetree)
+ ntree_version_245(sce->nodetree);
+
+ for(ntree=main->nodetree.first; ntree; ntree= ntree->id.next)
+ ntree_version_245(ntree);
+
if (main->versionfile < 245 || main->subversionfile < 12)
{
/* initialize skeleton generation toolsettings */
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c b/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
index 8e8eb07c1cc..4972ff4ae5a 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
@@ -135,6 +135,11 @@ static void node_composit_exec_alphaover(void *data, bNode *node, bNodeStack **i
}
}
+static void node_alphaover_init(bNode* node)
+{
+ node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
+}
+
bNodeType cmp_node_alphaover= {
/* *next,*prev */ NULL, NULL,
/* type code */ CMP_NODE_ALPHAOVER,
@@ -146,7 +151,7 @@ bNodeType cmp_node_alphaover= {
/* storage */ "NodeTwoFloats",
/* execfunc */ node_composit_exec_alphaover,
/* butfunc */ NULL,
- /* initfunc */ NULL,
+ /* initfunc */ node_alphaover_init,
/* freestoragefunc */ node_free_standard_storage,
/* copystoragefunc */ node_copy_standard_storage,
/* id */ NULL