Fix #32139: Making vertex parent hides faces

Call normals update and re-tesselate the BMesh before generating
derived mesh for vertex parent. this is needed for proper display
of mesh in edit mode.

Tried to use EDBM_update_generic, but it gave artifacts due to it
doesn't update normals. usually it's not a problem, because it's used
at the end of operator and all needed data is handles by depsgraph.
It doesn't work for vertex parent because derived mesh is being
created here outside of generic object update, so one extra manual
step seems to be needed here.
This commit is contained in:
Sergey Sharybin 2012-07-26 08:41:55 +00:00
parent 8a6a3e79de
commit 5eea2832e9

@ -135,6 +135,9 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
em = me->edit_btmesh;
EDBM_mesh_normals_update(em);
BMEdit_RecalcTessellation(em);
/* derivedMesh might be needed for solving parenting,
* so re-create it here */
makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH, 0);