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:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-09-06 20:48:28 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2011-09-06 20:48:28 +0400
commit84b8ec2ec37e21f6672044c4bff1339365d76b55 (patch)
tree03b49d4da66c8d83b97a7e68b15fb19cd6b5ff81 /source/blender/blenloader/intern
parent884fc84793be1c5fdd6643ad267331381f8e1c6b (diff)
Fix for node group add menu, groups from old files wouldn't show up there.
Reason was that node trees are now associated to specific node types (NODE_GROUP in particular) by the ntree->nodetype id.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 66e38f1c5f8..d1a19f24b97 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -11991,6 +11991,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
ntree->update |= NTREE_UPDATE;
}
}
+
+ {
+ /* Initialize group tree nodetypes.
+ * These are used to distinguish tree types and
+ * associate them with specific node types for polling.
+ */
+ bNodeTree *ntree;
+ /* all node trees in main->nodetree are considered groups */
+ for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next)
+ ntree->nodetype = NODE_GROUP;
+ }
}
/* put compatibility code here until next subversion bump */