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/blenloader/intern/versioning_290.c')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 63ef436d8e2..de59075559d 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1490,5 +1490,22 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
*/
{
/* Keep this block, even when empty. */
+ if (!DNA_struct_find(fd->filesdna, "NodeSetAlpha")) {
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+ bNodeTree *nodetree = scene->nodetree;
+ if (nodetree == NULL) {
+ continue;
+ }
+
+ LISTBASE_FOREACH (bNode *, node, &nodetree->nodes) {
+ if (node->type != CMP_NODE_SETALPHA) {
+ continue;
+ }
+ NodeSetAlpha *storage = MEM_callocN(sizeof(NodeSetAlpha), "NodeSetAlpha");
+ storage->mode = CMP_NODE_SETALPHA_MODE_REPLACE_ALPHA;
+ node->storage = storage;
+ }
+ }
+ }
}
}