From 0c242ff72b15fd21d4d2d9af0e3382c9197d4ab5 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 6 Sep 2022 18:21:16 +0200 Subject: Cleanup: IDManagement: Simplify `owner_get` calllback of IDTypeInfo. Now that all embedded IDs have a loopback pointer to their owner, we do need anymore extra parameters for this accessor. --- source/blender/makesrna/intern/rna_path.cc | 2 +- source/blender/makesrna/intern/rna_scene.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_path.cc b/source/blender/makesrna/intern/rna_path.cc index 72416401344..4f5e852a12c 100644 --- a/source/blender/makesrna/intern/rna_path.cc +++ b/source/blender/makesrna/intern/rna_path.cc @@ -944,7 +944,7 @@ ID *RNA_find_real_ID_and_path(Main *bmain, ID *id, const char **r_path) BLI_assert_msg(0, "Missing handling of embedded id type."); return id; } - return id_type->owner_get(bmain, id, nullptr); + return id_type->owner_get(id); } static char *rna_prepend_real_ID_path(Main *bmain, ID *id, char *path, ID **r_real_id) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index bedf823656a..61eb2a11c02 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1483,7 +1483,7 @@ static void rna_ImageFormatSettings_color_management_set(PointerRNA *ptr, int va if (owner_id && GS(owner_id->name) == ID_NT) { /* For compositing nodes, find the corresponding scene. */ const IDTypeInfo *type_info = BKE_idtype_get_info_from_id(owner_id); - owner_id = type_info->owner_get(G_MAIN, owner_id, NULL); + owner_id = type_info->owner_get(owner_id); } if (owner_id && GS(owner_id->name) == ID_SCE) { BKE_image_format_color_management_copy_from_scene(imf, (Scene *)owner_id); -- cgit v1.2.3