Fix #111698: Sculpt draws unchanged normals on first stroke
When entering sculpt mode, the normals cache is shared with the evaluated mesh. `SharedCache::ensure()` un-shares the cache in order to update it, so the pointers in the pbvh must be reset.
This commit is contained in:
@@ -1351,6 +1351,10 @@ static void pbvh_faces_update_normals(PBVH *pbvh, Span<PBVHNode *> nodes, Mesh &
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* #SharedCache::update() reallocates the cached vectors if they were shared initially. */
|
||||
pbvh->face_normals = mesh.runtime->face_normals_cache.data();
|
||||
pbvh->vert_normals = mesh.runtime->vert_normals_cache.data();
|
||||
}
|
||||
|
||||
static void node_update_mask_redraw(PBVH &pbvh, PBVHNode &node)
|
||||
|
||||
Reference in New Issue
Block a user