From db15c9d1bd9dd85ef1db0df24f4ad56c0b2012fe Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 1 Jun 2021 11:39:28 +0200 Subject: ID Management: Allow unique name check for linked IDs too. This is mandatory for liboverride resync, since this feature may imply we have to create linked overrides in libraries, and there may be several copies of those. This is also a first step to a more general support of IDmanagement-editing library data. Note that this commit should have absolutely no effect on current code, as the only function allowed to check unique names for linked IDs currently is `BKE_libblock_management_main_add`, which is unused. This commit also adds some basic testing for `BKE_id_new_name_validate`. --- source/blender/blenkernel/BKE_lib_id.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_lib_id.h') diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index 7ac45ac4883..e16507bf3cc 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -258,8 +258,10 @@ void BKE_lib_id_swap_full(struct Main *bmain, struct ID *id_a, struct ID *id_b); void id_sort_by_name(struct ListBase *lb, struct ID *id, struct ID *id_sorting_hint); void BKE_lib_id_expand_local(struct Main *bmain, struct ID *id); -bool BKE_id_new_name_validate(struct ListBase *lb, struct ID *id, const char *name) - ATTR_NONNULL(1, 2); +bool BKE_id_new_name_validate(struct ListBase *lb, + struct ID *id, + const char *name, + const bool do_linked_data) ATTR_NONNULL(1, 2); void BKE_lib_id_clear_library_data(struct Main *bmain, struct ID *id); /* Affect whole Main database. */ -- cgit v1.2.3