Fix T84646: Compositor: In Blender 292 "Set Alpha" node is undefined

Incorrect version code introduced by 9dbea1db66 would not check inside
node groups.
This commit is contained in:
2021-01-13 12:07:26 +01:00
parent aed5b88ec1
commit 38df935c09

View File

@@ -1491,13 +1491,11 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (!MAIN_VERSION_ATLEAST(bmain, 292, 10)) {
if (!DNA_struct_find(fd->filesdna, "NodeSetAlpha")) {
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
bNodeTree *nodetree = scene->nodetree;
if (nodetree == NULL) {
LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
if (ntree->type != NTREE_COMPOSIT) {
continue;
}
LISTBASE_FOREACH (bNode *, node, &nodetree->nodes) {
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
if (node->type != CMP_NODE_SETALPHA) {
continue;
}