Fix T47951: UserId problem on reload.

readfile.c would increment object usercount in three places, where it should not.
Remember kids: Objects are **only** refcounted by Scene's bases, and Object->proxy!
This commit is contained in:
Bastien Montagne 2016-03-26 16:22:17 +01:00
parent 6483c3c280
commit 112f431c3b

@ -3308,7 +3308,7 @@ static void lib_link_camera(FileData *fd, Main *main)
ca->ipo = newlibadr_us(fd, ca->id.lib, ca->ipo); // XXX deprecated - old animation system
ca->dof_ob = newlibadr_us(fd, ca->id.lib, ca->dof_ob);
ca->dof_ob = newlibadr(fd, ca->id.lib, ca->dof_ob);
ca->id.tag &= ~LIB_TAG_NEED_LINK;
}
@ -4011,7 +4011,7 @@ static void lib_link_partdeflect(FileData *fd, ID *id, PartDeflect *pd)
if (pd && pd->tex)
pd->tex = newlibadr_us(fd, id->lib, pd->tex);
if (pd && pd->f_source)
pd->f_source = newlibadr_us(fd, id->lib, pd->f_source);
pd->f_source = newlibadr(fd, id->lib, pd->f_source);
}
static void lib_link_particlesettings(FileData *fd, Main *main)
@ -5577,7 +5577,7 @@ static void lib_link_scene(FileData *fd, Main *main)
if (sce->toolsettings->sculpt)
sce->toolsettings->sculpt->gravity_object =
newlibadr_us(fd, sce->id.lib, sce->toolsettings->sculpt->gravity_object);
newlibadr(fd, sce->id.lib, sce->toolsettings->sculpt->gravity_object);
if (sce->toolsettings->imapaint.stencil)
sce->toolsettings->imapaint.stencil =