diff options
author | Bastien Montagne <bastien@blender.org> | 2021-06-01 12:39:28 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-06-01 13:01:06 +0300 |
commit | db15c9d1bd9dd85ef1db0df24f4ad56c0b2012fe (patch) | |
tree | 99b5766f6a4034cb14b94e66bc227c09c6c6f3c9 /source/blender/blenkernel/BKE_lib_id.h | |
parent | 27910ccce6a0a6a79b09144631309331cb557a25 (diff) |
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`.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_id.h')
-rw-r--r-- | source/blender/blenkernel/BKE_lib_id.h | 6 |
1 files changed, 4 insertions, 2 deletions
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. */ |