Fix for node group add menu, groups from old files wouldn't show up there.
authorLukas Toenne <lukas.toenne@googlemail.com>
Tue, 6 Sep 2011 16:48:28 +0000 (16:48 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Tue, 6 Sep 2011 16:48:28 +0000 (16:48 +0000)
Reason was that node trees are now associated to specific node types (NODE_GROUP in particular) by the ntree->nodetype id.

source/blender/blenloader/intern/readfile.c

index 66e38f1c5f87cd01dd991ee863b8287458392c2e..d1a19f24b9706dbb664df28e841b40568cba5e6d 100644 (file)
@@ -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 */