Sculpt: Fix T100941: Draw cache invalidation loop

PBVH draw was invalidating the draw cache even
when disabled (e.g. if modifiers exist).
This commit is contained in:
Joseph Eagar 2022-09-12 11:09:03 -07:00 committed by Philipp Oeser
parent 440c29f65b
commit 2a43bb5ed7
Notes: blender-bot 2023-02-14 06:25:25 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #100941, Smear brush gives artifact when the strength  is above 1
1 changed files with 1 additions and 2 deletions

View File

@ -555,8 +555,7 @@ static bool mesh_batch_cache_valid(Object *object, Mesh *me)
}
if (object->sculpt && object->sculpt->pbvh) {
if (cache->pbvh_is_drawing != BKE_pbvh_is_drawing(object->sculpt->pbvh) ||
BKE_pbvh_draw_cache_invalid(object->sculpt->pbvh)) {
if (cache->pbvh_is_drawing != BKE_pbvh_is_drawing(object->sculpt->pbvh)) {
return false;
}