diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-20 19:19:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-20 19:20:10 +0300 |
commit | 15d6521de94c80adbb47b6318dd24f2e0fe76925 (patch) | |
tree | cf8242f2c63aca606e53ab6a32112f3efe1171c9 /source/blender/editors/object | |
parent | afd9e87f8d65c49c2b07a8ad72d755e33640e589 (diff) |
Fix assert on vertex parent
The evaluation was done on an original object, which is not allowed.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 81925f42113..777770e5812 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -151,9 +151,12 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) EDBM_mesh_normals_update(em); BKE_editmesh_tessface_calc(em); - /* derivedMesh might be needed for solving parenting, - * so re-create it here */ - makeDerivedMesh(depsgraph, scene, obedit, em, &CD_MASK_BAREMESH_ORIGINDEX, false); + /* Make sure the evaluated mesh is updates. + * + * Most reliable way is to update the tagged objects, which will ensure + * proper copy-on-write update, but also will make sure all dependent + * objects are also up to date. */ + BKE_scene_graph_update_tagged(depsgraph, bmain); BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) { if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) { |