diff options
author | Jacques Lucke <jacques@blender.org> | 2021-02-17 15:17:50 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-02-17 15:17:50 +0300 |
commit | 55a69d5707ffef12a0f423ba4fa646f45af82375 (patch) | |
tree | b0dd927bcbe52d59646582409bda5c2407dcc9df | |
parent | 96da8e9ca302b8d879744318c5ad12c64a5b3c2c (diff) |
Geometry Nodes: realize instances before deform modifier
This is a follow up commit for rB96da8e9ca302b8d879744.
Ref T85281.
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc index 3aef53de64e..213e72d496b 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.cc +++ b/source/blender/blenkernel/intern/DerivedMesh.cc @@ -1189,6 +1189,14 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph, /* No existing verts to deform, need to build them. */ if (!deformed_verts) { if (mesh_final) { + Mesh *mesh_final_new = prepare_geometry_set_for_mesh_modifier(mesh_final, + geometry_set_final); + if (mesh_final_new != mesh_final) { + BLI_assert(mesh_final != mesh_input); + BKE_id_free(nullptr, mesh_final); + mesh_final = mesh_final_new; + } + /* Deforming a mesh, read the vertex locations * out of the mesh and deform them. Once done with this * run of deformers verts will be written back. */ |