diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-01-18 19:25:59 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-01-20 11:39:54 +0300 |
commit | 6368343da9a0aed8511de37b91161ea47418909d (patch) | |
tree | 3ee51bc974b002e380e2caf1c6fea91f12ce12b9 /source/blender/editors/sculpt_paint/sculpt_undo.c | |
parent | 6395937b01f0f6ca8669d694edcf9e7d258a30a1 (diff) |
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.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 2e77c7cceeb..a069b231150 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -46,6 +46,7 @@ #include "BKE_multires.h" #include "BKE_paint.h" #include "BKE_key.h" +#include "BKE_library.h" #include "BKE_mesh.h" #include "BKE_scene.h" #include "BKE_subsurf.h" @@ -632,7 +633,7 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase } } - tag_update |= ((Mesh *)ob->data)->id.us > 1 || !BKE_sculptsession_use_pbvh_draw(ob, v3d); + tag_update |= BKE_id_num_real_users(ob->data) > 1 || !BKE_sculptsession_use_pbvh_draw(ob, v3d); if (ss->shapekey_active || ss->deform_modifiers_active) { Mesh *mesh = ob->data; |