diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-08-31 17:42:14 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-08-31 17:48:27 +0300 |
commit | bfd8da753d34881c6f1205938ce9e6e25e3bf4e8 (patch) | |
tree | 35227aeb458ef14d5dc40718fe262e6fd39a8b19 /source/blender/blenkernel/intern/world.c | |
parent | 8fb9f2dbe9cb69476bf1f98c8503e5acd446c5b0 (diff) |
Fix T49210: Issue with User Count on Images in some shader nodetrees when rendering previews
Our usercount handling was really... infuriating :|
Here, localization (i.e. 'shalow' copy that should not touch to usercounts) was incrementing
usercounts of the sole Textures IDs of lamps and worlds (on the weak and fallacious pretext
that related BKE_free... functions would decrement those counts)... Seriously...
So now, localize funcs do not increment any usercount anymore (since matching BKE_free... ones do
not decrement any either), and we do not call anymore that stupid unlink when freeing temp
localized copies of lamps/materials at end of preview generation.
Note that we probably still have a lot to do to cleanup that copy/localize code, pretty sure
we can dedpulicate a lot more.
Diffstat (limited to 'source/blender/blenkernel/intern/world.c')
-rw-r--r-- | source/blender/blenkernel/intern/world.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index de1e3187a70..caa9a1e357f 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -158,8 +158,6 @@ World *localize_world(World *wrld) if (wrld->mtex[a]) { wrldn->mtex[a] = MEM_mallocN(sizeof(MTex), "localize_world"); memcpy(wrldn->mtex[a], wrld->mtex[a], sizeof(MTex)); - /* free world decrements */ - id_us_plus((ID *)wrldn->mtex[a]->tex); } } |