Bugfix #5232
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user