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.
This commit is contained in:
Bastien Montagne 2017-02-02 17:00:52 +01:00
parent feb588060a
commit 9e2dca933e
Notes: blender-bot 2023-02-14 11:21:40 +01:00
Referenced by issue #50524, Basis shapekey editing while rendering bug
1 changed files with 4 additions and 0 deletions

View File

@ -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;