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.
This commit is contained in:
parent
cae18abef4
commit
c7b12e31e6
Notes:
blender-bot
2023-02-14 03:31:57 +01:00
Referenced by issue #89976, Mirror Keys By Value Over Cursor Value gives outrageous results on rotation keyframes
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue