[Bf-blender-cvs] [9e2dca933e] master: Fix T50524: Basis shapekey editing while rendering bug.
Bastien Montagne
noreply at git.blender.org
Thu Feb 2 17:05:59 CET 2017
Commit: 9e2dca933e3e1541c5d40a89e10a0277be94e2fe
Author: Bastien Montagne
Date: Thu Feb 2 17:00:52 2017 +0100
Branches: master
https://developer.blender.org/rB9e2dca933e3e1541c5d40a89e10a0277be94e2fe
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.
===================================================================
M source/blender/bmesh/intern/bmesh_mesh_conv.c
===================================================================
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index bb61f66e26..59ce91a3e7 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;
More information about the Bf-blender-cvs
mailing list