Fix T49722: Appending Bug (Groups).
One day we'll have to reconsider why some many 'real' ID usages are not refcounting... :( To be backported to 2.78a.
This commit is contained in:
parent
50751d62e9
commit
44372d6441
|
@ -1714,6 +1714,12 @@ void BKE_library_make_local(Main *bmain, const Library *lib, const bool untagged
|
|||
if (id->newid) {
|
||||
bool is_local = false, is_lib = false;
|
||||
|
||||
/* Special hack for groups... Thing is, since we can't instantiate them here, we need to ensure
|
||||
* they remain 'alive' (only instantiation is a real group 'user'... *sigh* See T49722. */
|
||||
if (GS(id->name) == ID_GR && (id->tag & LIB_TAG_INDIRECT) != 0) {
|
||||
id_us_ensure_real(id->newid);
|
||||
}
|
||||
|
||||
BKE_library_ID_test_usages(bmain, id, &is_local, &is_lib);
|
||||
if (!is_local && !is_lib) {
|
||||
BKE_libblock_free(bmain, id);
|
||||
|
|
Loading…
Reference in New Issue