Fix T69816: Using Transform gizmos in Sculpt Mode while MultiRes is activated crashes Blender

Reviewed By: jbakker

Maniphest Tasks: T69816

Differential Revision: https://developer.blender.org/D5779
This commit is contained in:
Pablo Dobarro 2019-09-13 16:42:33 +02:00
parent f71d89bb04
commit 27b82bbb75
Notes: blender-bot 2023-02-14 09:24:53 +01:00
Referenced by issue #69816, Using Transform gizmos in Sculpt Mode while MultiRes is activated crashes Blender
1 changed files with 6 additions and 1 deletions

View File

@ -7896,7 +7896,12 @@ static void sculpt_filter_cache_init(Object *ob, Sculpt *sd)
for (int i = 0; i < totnode; i++) {
BKE_pbvh_node_mark_normals_update(nodes[i]);
}
BKE_pbvh_update_normals(ss->pbvh, NULL);
/* mesh->runtime.subdiv_ccg is not available. Updating of the normals is done during drawing.
* Filters can't use normals in multires. */
if (BKE_pbvh_type(ss->pbvh) != PBVH_GRIDS) {
BKE_pbvh_update_normals(ss->pbvh, NULL);
}
SculptThreadedTaskData data = {
.sd = sd,