Fix `BKE_library_make_local()` trying to also make local proxified objects.

Proxified objects can never be local, we can totally ignore them here.

This 'fixes' the asserts related to usercount when trying to remap poselib
of localized proxified objects (not sure what exactly was going on wrong here,
but proxies are a giant can of worms for sane data-blocks handling anyway :/).
This commit is contained in:
Bastien Montagne 2016-11-10 17:05:36 +01:00
parent f0d53ac109
commit e316636fa8
1 changed files with 3 additions and 2 deletions

View File

@ -1672,9 +1672,10 @@ void BKE_library_make_local(
/* The check on the second line (LIB_TAG_PRE_EXISTING) is done so its
* possible to tag data you don't want to be made local, used for
* appending data, so any libdata already linked wont become local
* (very nasty to discover all your links are lost after appending)
* */
* (very nasty to discover all your links are lost after appending).
* Also, never ever make proxified objects local, would not make any sense. */
if (!do_skip && id->tag & (LIB_TAG_EXTERN | LIB_TAG_INDIRECT | LIB_TAG_NEW) &&
!(GS(id->name) == ID_OB && ((Object *)id)->proxy_from != NULL) &&
((untagged_only == false) || !(id->tag & LIB_TAG_PRE_EXISTING)))
{
if (lib == NULL || id->lib == lib) {