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.
This commit is contained in:
Lukas Toenne 2011-09-06 16:48:28 +00:00
parent 884fc84793
commit 84b8ec2ec3

@ -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 */