[Bf-blender-cvs] [7587e82] master: Fix T40364: Texture images are not properly displayed in the material preview in BI when using SSS

Sergey Sharybin noreply at git.blender.org
Wed Jul 2 10:03:14 CEST 2014


Commit: 7587e82c288e46ef257e1de12cb0952ad234abff
Author: Sergey Sharybin
Date:   Wed Jul 2 13:59:49 2014 +0600
https://developer.blender.org/rB7587e82c288e46ef257e1de12cb0952ad234abff

Fix T40364: Texture images are not properly displayed in the material preview in BI when using SSS

Blender Internal only uses materials with non-zero user counter for SSS and new
mutable libblock copy was keeping users counter at zero.

Now it sets user counter to 1, which is a bit of arguable decision, but which
also kind of makes sense -- meaning callee owns the copied block.

===================================================================

M	source/blender/blenkernel/intern/library.c

===================================================================

diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index c8173ae..1f3327b 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -829,6 +829,7 @@ void *BKE_libblock_copy_nolib(ID *id, const bool do_action)
 
 	id->newid = idn;
 	idn->flag |= LIB_NEW;
+	idn->us = 1;
 
 	BKE_libblock_copy_data(idn, id, do_action);




More information about the Bf-blender-cvs mailing list