Fix T103937: Applying modifier resets shape keys

The order of arguments to memcpy was reversed, which is sadly possible
because the constness `KeyBlock` of keyblock doesn't propagate to
pointers it contains.
This commit is contained in:
Hans Goudey 2023-01-17 10:20:16 -06:00
parent d411de96f7
commit 873794b196
Notes: blender-bot 2023-02-13 13:33:45 +01:00
Referenced by issue #103937, Regression: applying NonGeometrical modifiers (UVProject, DataTransfer, ...) looses shape key data
1 changed files with 1 additions and 1 deletions

View File

@ -2218,7 +2218,7 @@ void BKE_keyblock_convert_to_mesh(const KeyBlock *kb,
const int totvert)
{
const int tot = min_ii(kb->totelem, totvert);
memcpy(kb->data, vert_positions, sizeof(float[3]) * tot);
memcpy(vert_positions, kb->data, sizeof(float[3]) * tot);
}
void BKE_keyblock_mesh_calc_normals(const KeyBlock *kb,