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
This commit is contained in:
parent
dcd7dacc4f
commit
7d827d0e9e
Notes:
blender-bot
2023-02-13 19:18:31 +01:00
Referenced by issue #86422, Mask Expand crash in Eevee
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue