From 9e2dca933e3e1541c5d40a89e10a0277be94e2fe Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 2 Feb 2017 17:00:52 +0100 Subject: Fix T50524: Basis shapekey editing while rendering bug. Root of the issue was BM_mesh_bm_to_me() breaking application of basis offset to 'child' shapekeys, when called more than once from same BMesh. --- source/blender/bmesh/intern/bmesh_mesh_conv.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c index bb61f66e267..59ce91a3e70 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_conv.c +++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c @@ -945,6 +945,10 @@ void BM_mesh_bm_to_me( /* propagate edited basis offsets to other shapes */ if (apply_offset) { add_v3_v3(fp, *ofs_pt++); + /* Apply back new coordinates of offsetted shapekeys into BMesh. + * Otherwise, in case we call again BM_mesh_bm_to_me on same BMesh, we'll apply diff from previous + * call to BM_mesh_bm_to_me, to shapekey values from *original creation of the BMesh*. See T50524. */ + copy_v3_v3(BM_ELEM_CD_GET_VOID_P(eve, cd_shape_offset), fp); } fp += 3; -- cgit v1.2.3