Fix #144014: Driver for data.shape_keys path fails with GPU subdivision

Assign the shape keys pointer to the subdiv mesh as was already done for the
evaluated mesh This could already fail before, but is more common now that
subdiv evaluation is always using the wrapper.

Pull Request: https://projects.blender.org/blender/blender/pulls/144030
This commit is contained in:
Brecht Van Lommel
2025-08-06 15:52:47 +02:00
committed by Brecht Van Lommel
parent 9b0b011f5d
commit c02b41d8bf

View File

@@ -361,6 +361,9 @@ static Mesh *mesh_wrapper_ensure_subdivision(Mesh *mesh)
}
if (subdiv_mesh != mesh) {
/* Make sure that drivers can target shapekey properties. See #mesh_build_data for details. */
subdiv_mesh->key = mesh->key;
if (mesh->runtime->mesh_eval != nullptr) {
BKE_id_free(nullptr, mesh->runtime->mesh_eval);
}