Cleanup: Use utility function to find groups in node tree #104465

Merged
Hans Goudey merged 23 commits from mod_moder/blender:is_contains into main 2023-02-10 17:30:57 +01:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 1f3280745f - Show all commits

View File

@ -3460,6 +3460,7 @@ bool ntreeContainsTree(const bNodeTree *parent_tree, const bNodeTree *sub_tree)
if (parent_tree == sub_tree) {
return true;
}
parent_tree->ensure_topology_cache();
mod_moder marked this conversation as resolved
Review

reinterpret_cast<bNodeTree *> -> reinterpret_cast<const bNodeTree *>

`reinterpret_cast<bNodeTree *>` -> `reinterpret_cast<const bNodeTree *>`
for (const bNode *node_group : parent_tree->group_nodes()) {
const bNodeTree *tree = reinterpret_cast<bNodeTree *>(node_group->id);
@ -3467,6 +3468,7 @@ bool ntreeContainsTree(const bNodeTree *parent_tree, const bNodeTree *sub_tree)
return true;
}
}
return false;
}