You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Merge pull request #63602 from TokageItLab/cubic-interp-time
This commit is contained in:
@@ -2114,11 +2114,11 @@ void AnimationTrackEdit::_notification(int p_what) {
|
||||
get_theme_icon(SNAME("InterpWrapClamp"), SNAME("EditorIcons")),
|
||||
get_theme_icon(SNAME("InterpWrapLoop"), SNAME("EditorIcons")),
|
||||
};
|
||||
|
||||
Ref<Texture2D> interp_icon[3] = {
|
||||
Ref<Texture2D> interp_icon[4] = {
|
||||
get_theme_icon(SNAME("InterpRaw"), SNAME("EditorIcons")),
|
||||
get_theme_icon(SNAME("InterpLinear"), SNAME("EditorIcons")),
|
||||
get_theme_icon(SNAME("InterpCubic"), SNAME("EditorIcons"))
|
||||
get_theme_icon(SNAME("InterpCubic"), SNAME("EditorIcons")),
|
||||
get_theme_icon(SNAME("InterpCubicInTime"), SNAME("EditorIcons"))
|
||||
};
|
||||
Ref<Texture2D> cont_icon[4] = {
|
||||
get_theme_icon(SNAME("TrackContinuous"), SNAME("EditorIcons")),
|
||||
@@ -2831,6 +2831,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
|
||||
menu->add_icon_item(get_theme_icon(SNAME("InterpRaw"), SNAME("EditorIcons")), TTR("Nearest"), MENU_INTERPOLATION_NEAREST);
|
||||
menu->add_icon_item(get_theme_icon(SNAME("InterpLinear"), SNAME("EditorIcons")), TTR("Linear"), MENU_INTERPOLATION_LINEAR);
|
||||
menu->add_icon_item(get_theme_icon(SNAME("InterpCubic"), SNAME("EditorIcons")), TTR("Cubic"), MENU_INTERPOLATION_CUBIC);
|
||||
menu->add_icon_item(get_theme_icon(SNAME("InterpCubicInTime"), SNAME("EditorIcons")), TTR("CubicInTime"), MENU_INTERPOLATION_CUBIC_IN_TIME);
|
||||
menu->reset_size();
|
||||
|
||||
Vector2 popup_pos = get_screen_position() + interp_mode_rect.position + Vector2(0, interp_mode_rect.size.height);
|
||||
@@ -3171,7 +3172,8 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
|
||||
} break;
|
||||
case MENU_INTERPOLATION_NEAREST:
|
||||
case MENU_INTERPOLATION_LINEAR:
|
||||
case MENU_INTERPOLATION_CUBIC: {
|
||||
case MENU_INTERPOLATION_CUBIC:
|
||||
case MENU_INTERPOLATION_CUBIC_IN_TIME: {
|
||||
Animation::InterpolationType interp_mode = Animation::InterpolationType(p_index - MENU_INTERPOLATION_NEAREST);
|
||||
undo_redo->create_action(TTR("Change Animation Interpolation Mode"));
|
||||
undo_redo->add_do_method(animation.ptr(), "track_set_interpolation_type", track, interp_mode);
|
||||
|
||||
@@ -143,6 +143,7 @@ class AnimationTrackEdit : public Control {
|
||||
MENU_INTERPOLATION_NEAREST,
|
||||
MENU_INTERPOLATION_LINEAR,
|
||||
MENU_INTERPOLATION_CUBIC,
|
||||
MENU_INTERPOLATION_CUBIC_IN_TIME,
|
||||
MENU_LOOP_WRAP,
|
||||
MENU_LOOP_CLAMP,
|
||||
MENU_KEY_INSERT,
|
||||
@@ -486,9 +487,9 @@ class AnimationTrackEditor : public VBoxContainer {
|
||||
NodePath full_path;
|
||||
NodePath base_path;
|
||||
Animation::TrackType track_type = Animation::TYPE_ANIMATION;
|
||||
Animation::InterpolationType interp_type = Animation::INTERPOLATION_CUBIC;
|
||||
Animation::InterpolationType interp_type = Animation::INTERPOLATION_CUBIC_IN_TIME;
|
||||
Animation::UpdateMode update_mode = Animation::UPDATE_CAPTURE;
|
||||
Animation::LoopMode loop_mode = Animation::LOOP_LINEAR;
|
||||
Animation::LoopMode loop_mode = Animation::LOOP_PINGPONG;
|
||||
bool loop_wrap = false;
|
||||
bool enabled = false;
|
||||
|
||||
|
||||
1
editor/icons/InterpCubicInTime.svg
Normal file
1
editor/icons/InterpCubicInTime.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg enable-background="new -595.5 420.5 16 8" height="8" viewBox="-595.5 420.5 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m-593.5 426.5c1-4 3.5-5.5 6-2s5 2 6-2" fill="none" stroke="#ff92cb" stroke-linecap="round" stroke-width="2"/></svg>
|
||||
|
After Width: | Height: | Size: 257 B |
Reference in New Issue
Block a user