forked from bartvdbraak/blender
when appending with a NULL context dont print warnigns about scene not being set - was annoying for BGE LibLoad.
This commit is contained in:
parent
af786843b0
commit
0578d55f1e
@ -13047,10 +13047,10 @@ static void append_do_cursor(Scene *scene, Library *curlib, short flag)
|
||||
}
|
||||
}
|
||||
|
||||
/* Context == NULL signifies not to do any scene manipulation */
|
||||
static void library_append_end(const bContext *C, Main *mainl, FileData **fd, int idcode, short flag)
|
||||
{
|
||||
Main *mainvar;
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
Library *curlib;
|
||||
|
||||
/* make main consistent */
|
||||
@ -13079,22 +13079,28 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
|
||||
lib_verify_nodetree(mainvar, FALSE);
|
||||
fix_relpaths_library(G.main->name, mainvar); /* make all relative paths, relative to the open blend file */
|
||||
|
||||
/* give a base to loose objects. If group append, do it for objects too */
|
||||
if(scene) {
|
||||
const short is_link= (flag & FILE_LINK) != 0;
|
||||
if(idcode==ID_SCE) {
|
||||
/* dont instance anything when linking in scenes, assume the scene its self instances the data */
|
||||
}
|
||||
else {
|
||||
give_base_to_objects(mainvar, scene, curlib, idcode, is_link);
|
||||
if(C) {
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
|
||||
if (flag & FILE_GROUP_INSTANCE) {
|
||||
give_base_to_groups(mainvar, scene);
|
||||
/* give a base to loose objects. If group append, do it for objects too */
|
||||
if(scene) {
|
||||
const short is_link= (flag & FILE_LINK) != 0;
|
||||
if(idcode==ID_SCE) {
|
||||
/* dont instance anything when linking in scenes, assume the scene its self instances the data */
|
||||
}
|
||||
else {
|
||||
give_base_to_objects(mainvar, scene, curlib, idcode, is_link);
|
||||
|
||||
if (flag & FILE_GROUP_INSTANCE) {
|
||||
give_base_to_groups(mainvar, scene);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
printf("library_append_end, scene is NULL (objects wont get bases)\n");
|
||||
else {
|
||||
printf("library_append_end, scene is NULL (objects wont get bases)\n");
|
||||
}
|
||||
|
||||
append_do_cursor(scene, curlib, flag);
|
||||
}
|
||||
/* has been removed... erm, why? s..ton) */
|
||||
/* 20040907: looks like they are give base already in append_named_part(); -Nathan L */
|
||||
@ -13105,8 +13111,6 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
|
||||
blo_freefiledata( *fd );
|
||||
*fd = NULL;
|
||||
}
|
||||
|
||||
append_do_cursor(scene, curlib, flag);
|
||||
}
|
||||
|
||||
void BLO_library_append_end(const bContext *C, struct Main *mainl, BlendHandle** bh, int idcode, short flag)
|
||||
|
Loading…
Reference in New Issue
Block a user