forked from bartvdbraak/blender
Fix #37110, After deletion of large scene, file still huge.
Objects were not being freed when unlinked from all scenes, due to user count increments on the ParticleSystem->parent pointers. These were referencing the objects themselves, creating a user count of 1 and preventing free. Object pointers should not usually do user counting, except in some cases like scenes and groups (thanks to Brecht for clarifying this).
This commit is contained in:
parent
4230b8f9c4
commit
2871b0d7df
@ -3806,7 +3806,7 @@ static void lib_link_particlesystems(FileData *fd, Object *ob, ID *id, ListBase
|
|||||||
for (; pt; pt=pt->next)
|
for (; pt; pt=pt->next)
|
||||||
pt->ob=newlibadr(fd, id->lib, pt->ob);
|
pt->ob=newlibadr(fd, id->lib, pt->ob);
|
||||||
|
|
||||||
psys->parent = newlibadr_us(fd, id->lib, psys->parent);
|
psys->parent = newlibadr(fd, id->lib, psys->parent);
|
||||||
psys->target_ob = newlibadr(fd, id->lib, psys->target_ob);
|
psys->target_ob = newlibadr(fd, id->lib, psys->target_ob);
|
||||||
|
|
||||||
if (psys->clmd) {
|
if (psys->clmd) {
|
||||||
|
Loading…
Reference in New Issue
Block a user