diff options
Diffstat (limited to 'source/blender/blenkernel/intern/lib_id.c')
-rw-r--r-- | source/blender/blenkernel/intern/lib_id.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c index 0f880d16358..aa458bc1b27 100644 --- a/source/blender/blenkernel/intern/lib_id.c +++ b/source/blender/blenkernel/intern/lib_id.c @@ -153,7 +153,7 @@ static int lib_id_clear_library_data_users_update_cb(LibraryIDLinkCallbackData * * Pull an ID out of a library (make it local). Only call this for IDs that * don't have other library users. */ -static void lib_id_clear_library_data_ex(Main *bmain, ID *id) +void BKE_lib_id_clear_library_data(Main *bmain, ID *id) { const bool id_in_mainlist = (id->tag & LIB_TAG_NO_MAIN) == 0 && (id->flag & LIB_EMBEDDED_DATA) == 0; @@ -193,17 +193,12 @@ static void lib_id_clear_library_data_ex(Main *bmain, ID *id) * IDs here, this is down automatically in `lib_id_expand_local_cb()`. */ Key *key = BKE_key_from_id(id); if (key != NULL) { - lib_id_clear_library_data_ex(bmain, &key->id); + BKE_lib_id_clear_library_data(bmain, &key->id); } DEG_relations_tag_update(bmain); } -void BKE_lib_id_clear_library_data(Main *bmain, ID *id) -{ - lib_id_clear_library_data_ex(bmain, id); -} - void id_lib_extern(ID *id) { if (id && ID_IS_LINKED(id)) { @@ -369,7 +364,7 @@ static int lib_id_expand_local_cb(LibraryIDLinkCallbackData *cb_data) if (*id_pointer != NULL && ID_IS_LINKED(*id_pointer)) { BLI_assert(*id_pointer != id_self); - lib_id_clear_library_data_ex(bmain, *id_pointer); + BKE_lib_id_clear_library_data(bmain, *id_pointer); } return IDWALK_RET_NOP; } @@ -429,7 +424,7 @@ void BKE_lib_id_make_local_generic(Main *bmain, ID *id, const int flags) if (lib_local || is_local) { if (!is_lib) { - lib_id_clear_library_data_ex(bmain, id); + BKE_lib_id_clear_library_data(bmain, id); BKE_lib_id_expand_local(bmain, id); } else { @@ -1481,7 +1476,7 @@ static bool id_name_final_build(char *name, char *base_name, size_t base_name_le /* Code above may have generated invalid utf-8 string, due to raw truncation. * Ensure we get a valid one now. */ - base_name_len -= (size_t)BLI_utf8_invalid_strip(base_name, base_name_len); + base_name_len -= (size_t)BLI_str_utf8_invalid_strip(base_name, base_name_len); /* Also truncate orig name, and start the whole check again. */ name[base_name_len] = '\0'; @@ -1731,7 +1726,7 @@ bool BKE_id_new_name_validate(ListBase *lb, ID *id, const char *tname, const boo else { /* disallow non utf8 chars, * the interface checks for this but new ID's based on file names don't */ - BLI_utf8_invalid_strip(name, strlen(name)); + BLI_str_utf8_invalid_strip(name, strlen(name)); } ID *id_sorting_hint = NULL; @@ -2014,7 +2009,7 @@ void BKE_library_make_local(Main *bmain, * currently there are some indirect usages. So instead of making a copy that we'll likely * get rid of later, directly make that data block local. * Saves a tremendous amount of time with complex scenes... */ - lib_id_clear_library_data_ex(bmain, id); + BKE_lib_id_clear_library_data(bmain, id); BKE_lib_id_expand_local(bmain, id); id->tag &= ~LIB_TAG_DOIT; |