Minor tweaks to new append code.
* Name generated 'append' collection, instead of getting a generic meaningless name. * Do not check if a collections's objects are already instantiated, when we already know that we want to instantiate that collection.
This commit is contained in:
parent
101fa4a425
commit
1c6d3d614a
|
@ -52,6 +52,8 @@
|
|||
|
||||
#include "BLO_readfile.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "BKE_armature.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_global.h"
|
||||
|
@ -354,7 +356,8 @@ static void wm_append_loose_data_instantiate_ensure_active_collection(
|
|||
*r_active_collection = lc->collection;
|
||||
}
|
||||
else {
|
||||
*r_active_collection = BKE_collection_add(bmain, scene->master_collection, NULL);
|
||||
*r_active_collection = BKE_collection_add(
|
||||
bmain, scene->master_collection, DATA_("Appended Data"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -438,11 +441,13 @@ static void wm_append_loose_data_instantiate(WMLinkAppendData *lapp_data,
|
|||
Collection *collection = (Collection *)id;
|
||||
/* We always add collections directly selected by the user. */
|
||||
bool do_add_collection = (item->append_tag & WM_APPEND_TAG_INDIRECT) == 0;
|
||||
LISTBASE_FOREACH (CollectionObject *, coll_ob, &collection->gobject) {
|
||||
Object *ob = coll_ob->ob;
|
||||
if (!object_in_any_scene(bmain, ob)) {
|
||||
do_add_collection = true;
|
||||
break;
|
||||
if (!do_add_collection) {
|
||||
LISTBASE_FOREACH (CollectionObject *, coll_ob, &collection->gobject) {
|
||||
Object *ob = coll_ob->ob;
|
||||
if (!object_in_any_scene(bmain, ob)) {
|
||||
do_add_collection = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (do_add_collection) {
|
||||
|
|
Loading…
Reference in New Issue