Fix T82962: Crash changing lattice resolution with Vertex Group

Regression introduced by {rB042143440d76}. The deform group lookup was
performed on the wrong object. Before the lookup was performed on
the lattice object. This patch changes this back.

Reviewed By: Bastien Montagne

Differential Revision: https://developer.blender.org/D9638
This commit is contained in:
Jeroen Bakker 2020-11-24 11:18:24 +01:00
parent aca8eadb63
commit bb5c4de009
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ LatticeDeformData *BKE_lattice_deform_data_create(const Object *oblatt, const Ob
int defgrp_index = -1;
const MDeformVert *dvert = BKE_lattice_deform_verts_get(oblatt);
if (lt->vgroup[0] && dvert) {
defgrp_index = BKE_object_defgroup_name_index(ob, lt->vgroup);
defgrp_index = BKE_object_defgroup_name_index(oblatt, lt->vgroup);
if (defgrp_index != -1) {
lattice_weights = MEM_malloc_arrayN(sizeof(float), num_points, "lattice_weights");