mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Use a different icon for eased keyframes in the animation editor
This makes easing tracks easier to recognize, in a way similar to curved lines in the Path2D editor.
This commit is contained in:
parent
a79e4d0ae5
commit
9381b236ab
3 changed files with 7 additions and 0 deletions
|
|
@ -2191,6 +2191,11 @@ void AnimationTrackEdit::draw_key(int p_index, float p_pixels_sec, int p_x, bool
|
|||
|
||||
Ref<Texture> icon_to_draw = p_selected ? selected_icon : type_icon;
|
||||
|
||||
if (animation->track_get_type(track) == Animation::TYPE_VALUE && !Math::is_equal_approx(animation->track_get_key_transition(track, p_index), 1.0f)) {
|
||||
// Use a different icon for keys with non-linear easing.
|
||||
icon_to_draw = get_icon(p_selected ? "KeyEasedSelected" : "KeyValueEased", "EditorIcons");
|
||||
}
|
||||
|
||||
// Override type icon for invalid value keys, unless selected.
|
||||
if (!p_selected && animation->track_get_type(track) == Animation::TYPE_VALUE) {
|
||||
const Variant &v = animation->track_get_key_value(track, p_index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue