Cleanup: factorize the 'ensure local' part of datablock copy into a single BKE_id_copy_ensure_local function.

This commit is contained in:
2016-07-25 16:15:37 +02:00
parent d9cc3ea2c6
commit 1870e166de
24 changed files with 34 additions and 88 deletions

View File

@@ -119,10 +119,7 @@ MetaBall *BKE_mball_copy(Main *bmain, MetaBall *mb)
mbn->editelems = NULL;
mbn->lastelem = NULL;
if (ID_IS_LINKED_DATABLOCK(mb)) {
BKE_id_expand_local(&mbn->id);
BKE_id_lib_local_paths(bmain, mb->id.lib, &mbn->id);
}
BKE_id_copy_ensure_local(bmain, &mb->id, &mbn->id);
return mbn;
}