diff options
author | Bastien Montagne <bastien@blender.org> | 2022-09-06 19:21:16 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-09-06 19:21:16 +0300 |
commit | 0c242ff72b15fd21d4d2d9af0e3382c9197d4ab5 (patch) | |
tree | 17f0af0a941be6ff1c3f31b1f329fdcdb02673d1 /source/blender/makesrna | |
parent | e46687c3aacfd69bde83187233e73a8cc6fa5d8d (diff) |
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.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_path.cc | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 |
2 files changed, 2 insertions, 2 deletions
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); |