From 6368343da9a0aed8511de37b91161ea47418909d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 18 Jan 2020 17:25:59 +0100 Subject: Fix T73129: sculpt mode slow on mesh with fake user We can't use the fast path when the mesh is used by mulitple objects and so slower sculpting is expected then. But fake users should not affect this. This also fixes the same type of error in a few other areas. --- source/blender/blenkernel/intern/library.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/intern/library.c') diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index e051dc946cb..dabf44be42e 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -294,6 +294,11 @@ void id_fake_user_clear(ID *id) } } +int BKE_id_num_real_users(const ID *id) +{ + return (id->flag & LIB_FAKEUSER) ? id->us - 1 : id->us; +} + void BKE_id_clear_newpoin(ID *id) { if (id->newid) { -- cgit v1.2.3