[Bf-blender-cvs] [f2132b02373] blender2.8: UI: Fix showing '2' number of users in ID templates for fake-user IDs.

Bastien Montagne noreply at git.blender.org
Fri Nov 2 15:12:22 CET 2018


Commit: f2132b0237346d97a95b4f794f1a88868a7c131f
Author: Bastien Montagne
Date:   Fri Nov 2 14:33:38 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBf2132b0237346d97a95b4f794f1a88868a7c131f

UI: Fix showing '2' number of users in ID templates for fake-user IDs.

Using FakeUser on an ID sill put its usercount to 2 if it is actually
also 'really' used once. But we do not want to show that to user
(especially not since it also allows to 'make single user' of an ID
already only used once...).

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

M	source/blender/editors/interface/interface_templates.c

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

diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index b469d87f737..e32748f3a81 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -722,7 +722,7 @@ static void template_ID(
 			UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_OVERRIDE));
 		}
 
-		if (id->us > 1) {
+		if (ID_REAL_USERS(id) > 1) {
 			char numstr[32];
 			short numstr_len;



More information about the Bf-blender-cvs mailing list