Description
Tested versions
Reproducible in:
Master
4.4.1.stable
3.6.stable
System information
Godot v4.4.1.stable - Windows 11 (build 26100) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Laptop GPU (NVIDIA; 32.0.15.6614) - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 threads)
Issue description
Scale from Cursor
option does the same as Scale Selection
. It uses the first key as pivot.
Godot_v4.4.1-stable_win64_LO6lnHDjh7.mp4
This is because last_menu_track_opt is set to EDIT_SCALE_CONFIRM
by the time it's checked:
godot/editor/animation_track_editor.cpp
Line 6728 in 1f787b6
The actual function for scaling is also incorrect, while the pivot is not set correctly because of the above, it is also not used correctly in the function:
current:
#define NEW_POS(m_ofs) (((s > 0) ? m_ofs : from_t + (len - (m_ofs - from_t))) - pivot) * Math::abs(s) + from_t
suggested:
#define NEW_POS(m_ofs) (((s > 0) ? m_ofs : from_t + (len - (m_ofs - from_t))) - pivot) * Math::abs(s) + pivot
Steps to reproduce
Select some keys and use the function.
Minimal reproduction project (MRP)
NA