svn merge ^/trunk/blender -r42080:42095
[blender.git] / source / blender / editors / object / object_relations.c
index ae6ec15e911275b318fbe9e2a3ff5713f8def930..ab4ff20d503b866c7aac71ac933e44a3e05629c6 100644 (file)
@@ -61,6 +61,7 @@
 #include "BKE_constraint.h"
 #include "BKE_curve.h"
 #include "BKE_depsgraph.h"
+#include "BKE_DerivedMesh.h"
 #include "BKE_displist.h"
 #include "BKE_global.h"
 #include "BKE_fcurve.h"
@@ -132,6 +133,10 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
 
                em= me->edit_btmesh;
 
+               /* derivedMesh might be needed for solving parenting,
+                  so re-create it here */
+               makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH, 0);
+
                BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_TestHFlag(eve, BM_SELECT)) {
                                if(v1==0) v1= nr;