[Bf-blender-cvs] [7d827d0e9e1] master: Fix T86422: Expand crashing with EEVEE enabled

Pablo Dobarro noreply at git.blender.org
Tue Mar 9 21:22:04 CET 2021


Commit: 7d827d0e9e1a396580be988313bfd9ee4273a517
Author: Pablo Dobarro
Date:   Tue Mar 9 20:41:06 2021 +0100
Branches: master
https://developer.blender.org/rB7d827d0e9e1a396580be988313bfd9ee4273a517

Fix T86422: Expand crashing with EEVEE enabled

Using EEVEE (as well as some other actions like saving the file or
tweaking mesh parameters) can cause a PBVH rebuild. The different sculpt
tools can store PBVH nodes or other related data in their caches, so
this data becomes invalid if the PBVH rebuilds during evaluation. This
ensures that the PBVH does not rebuild while the cache of Expand is
being used, like it already happens for brushes and filters.

Reviewed By: JacquesLucke

Maniphest Tasks: T86422

Differential Revision: https://developer.blender.org/D10675

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

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

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

diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 08c5beedbf3..2e81b61ad8c 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -1760,7 +1760,7 @@ void BKE_sculpt_update_object_before_eval(Object *ob)
   SculptSession *ss = ob->sculpt;
 
   if (ss && ss->building_vp_handle == false) {
-    if (!ss->cache && !ss->filter_cache) {
+    if (!ss->cache && !ss->filter_cache && !ss->expand_cache) {
       /* We free pbvh on changes, except in the middle of drawing a stroke
        * since it can't deal with changing PVBH node organization, we hope
        * topology does not change in the meantime .. weak. */



More information about the Bf-blender-cvs mailing list