An oldie; if you have a referenced (lib-linked) scene, and copy that one
(use "Full Copy"), the objects in that scene disappeared after saving.
Caused by manual increasing id->us, instead of using the library.c call
id_us_plus(). The latter keeps track of linking issues.
This commit is contained in:
Ton Roosendaal
2006-11-15 11:21:17 +00:00
parent e50112d441
commit d6e96bd605

View File

@@ -320,7 +320,7 @@ Scene *copy_scene(Scene *sce, int level)
obase= sce->base.first;
base= scen->base.first;
while(base) {
base->object->id.us++;
id_us_plus(&base->object->id);
if(obase==sce->basact) scen->basact= base;
obase= obase->next;
@@ -340,7 +340,7 @@ Scene *copy_scene(Scene *sce, int level)
/* level 2 */
if(level>=2) {
if(scen->world) {
scen->world->id.us--;
id_us_plus(&scen->world->id);
scen->world= copy_world(scen->world);
}
single_obdata_users(0);