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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_nodes.cc')
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 79838f61dfe..211257597cb 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -268,18 +268,19 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
}
}
-static bool checkForTimeNode(bNodeTree *tree, Set<bNodeTree *> &r_checked_trees)
+static bool check_tree_for_time_node(const bNodeTree &tree,
+ Set<const bNodeTree *> &r_checked_trees)
{
- if (!r_checked_trees.add(tree)) {
+ if (!r_checked_trees.add(&tree)) {
return false;
}
- LISTBASE_FOREACH (bNode *, node, &tree->nodes) {
+ LISTBASE_FOREACH (const bNode *, node, &tree.nodes) {
if (node->type == GEO_NODE_INPUT_SCENE_TIME) {
return true;
}
if (node->type == NODE_GROUP) {
- bNodeTree *subtree = (bNodeTree *)node->id;
- if (checkForTimeNode(subtree, r_checked_trees)) {
+ const bNodeTree *sub_tree = reinterpret_cast<const bNodeTree *>(node->id);
+ if (check_tree_for_time_node(*sub_tree, r_checked_trees)) {
return true;
}
}
@@ -291,13 +292,13 @@ static bool dependsOnTime(struct Scene *UNUSED(scene),
ModifierData *md,
const int UNUSED(dag_eval_mode))
{
- NodesModifierData *nmd = reinterpret_cast<NodesModifierData *>(md);
- bNodeTree *tree = nmd->node_group;
+ const NodesModifierData *nmd = reinterpret_cast<NodesModifierData *>(md);
+ const bNodeTree *tree = nmd->node_group;
if (tree == nullptr) {
return false;
}
- Set<bNodeTree *> checked_trees;
- return checkForTimeNode(tree, checked_trees);
+ Set<const bNodeTree *> checked_trees;
+ return check_tree_for_time_node(*tree, checked_trees);
}
static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)