diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-07-29 18:02:38 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-07-29 19:34:10 +0300 |
commit | c7b12e31e6f752f05aacdc0dca5e0e0783faa2e7 (patch) | |
tree | 3eb3f4f502949fd889ba1f7cbcb905866494e7eb /source | |
parent | cae18abef47d6aeacf54ccf8f05c5cece11afd91 (diff) |
Fix T89976: Mirror Keys By Value performs wrong scale conversion
In the graph editor, Mirror Keys by Value would convert the value to mirror
over, to account for different units for linear & rotational properties.
The conversion was done in the different direction, though, resulting in
values that were too large by a factor of (180/pi)^2.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 9f9869a854c..8bfafc6bef8 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -2447,7 +2447,7 @@ static void mirror_graph_keys(bAnimContext *ac, short mode) float unit_scale = ANIM_unit_mapping_get_factor( ac->scene, ale->id, ale->key_data, mapping_flag | ANIM_UNITCONV_ONLYKEYS, &offset); - ked.f1 = (cursor_value + offset) * unit_scale; + ked.f1 = (cursor_value - offset) / unit_scale; } /* Perform actual mirroring. */ |