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:
authorHans Goudey <h.goudey@me.com>2022-11-06 00:40:17 +0300
committerHans Goudey <h.goudey@me.com>2022-11-06 12:23:14 +0300
commit3852094b35ea659094ab30ffca9e2fe086b1a368 (patch)
treeea9e3a0a562ded9795b8ab6bce969a89b506bee4 /source/blender/editors/object
parent28e952dacd83bfeff1edb303d480ae5b32cf59c9 (diff)
Cleanup: Nodes: Use const arguments, avoid recursive iteration
Use the node topology cache and avoid modifying the node tree in a non-threadsafe way to improve the predictability of using the helper function. Replaces the implementation from e0d40471364aafca967b6ebd52.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_bake_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 260d65fc5dc..d647578dc50 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -467,8 +467,8 @@ static bool bake_object_check(const Scene *scene,
}
for (int i = 0; i < ob->totcol; i++) {
- bNodeTree *ntree = NULL;
- bNode *node = NULL;
+ const bNodeTree *ntree = NULL;
+ const bNode *node = NULL;
const int mat_nr = i + 1;
Image *image;
ED_object_get_active_image(ob, mat_nr, &image, NULL, &node, &ntree);