From 3852094b35ea659094ab30ffca9e2fe086b1a368 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sat, 5 Nov 2022 22:40:17 +0100 Subject: 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. --- source/blender/editors/object/object_bake_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/object') 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); -- cgit v1.2.3