From 12b36168957dd27c253251555c29e8523b94fbe8 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 12 Aug 2022 10:39:03 +0200 Subject: IDType `get_owner`: add an optional hint about owner ID. In some cases, there is a chance code already knows who might be the owner of the given ID, in which case it can be more efficient to check it first (especially in cases like embedded node trees or scene collections, where the only other way is to loop over all possible owners currently). Will be used in next commit in some Outliner fix. --- source/blender/blenkernel/intern/lib_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/lib_query.c') diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c index a869bf4c4b0..6b9d2afe87a 100644 --- a/source/blender/blenkernel/intern/lib_query.c +++ b/source/blender/blenkernel/intern/lib_query.c @@ -713,7 +713,7 @@ static void lib_query_unused_ids_tag_recurse(Main *bmain, /* Directly 'by-pass' to actual real ID owner. */ const IDTypeInfo *type_info_from = BKE_idtype_get_info_from_id(id_from); BLI_assert(type_info_from->owner_get != NULL); - id_from = type_info_from->owner_get(bmain, id_from); + id_from = type_info_from->owner_get(bmain, id_from, NULL); } lib_query_unused_ids_tag_recurse( -- cgit v1.2.3