Fix re-entrant calls in some cases of mesh_evaluated generation.
`mesh_get_eval_final` and friends could call `mesh_build_data`, which in paint/sculpt mode would call `BKE_sculpt_update_mesh_elements` which would call `mesh_get_eval_final`... ugly!
This commit is contained in:
@@ -3017,8 +3017,9 @@ static void mesh_build_data(
|
||||
if ((ob->mode & OB_MODE_ALL_SCULPT) && ob->sculpt) {
|
||||
/* create PBVH immediately (would be created on the fly too,
|
||||
* but this avoids waiting on first stroke) */
|
||||
|
||||
BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, false, false);
|
||||
/* XXX Disabled for now.
|
||||
* This can create horrible nasty bugs by generating re-entrant call of mesh_get_eval_final! */
|
||||
// BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, false, false);
|
||||
}
|
||||
|
||||
BLI_assert(!(ob->derivedFinal->dirty & DM_DIRTY_NORMALS));
|
||||
|
||||
Reference in New Issue
Block a user