#include "animation_player_editor_plugin.h"
#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
#include "core/os/keyboard.h"
#include "editor/editor_command_palette.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/gui/editor_bottom_panel.h"
#include "editor/gui/editor_file_dialog.h"
#include "editor/gui/editor_validation_panel.h"
#include "editor/inspector_dock.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/scene_tree_dock.h"
#include "editor/themes/editor_scale.h"
#include "editor/themes/editor_theme_manager.h"
#include "scene/animation/animation_tree.h"
#include "scene/gui/separator.h"
#include "scene/main/window.h"
#include "scene/resources/animation.h"
#include "scene/resources/image_texture.h"
#include "servers/rendering_server.h"
void AnimationPlayerEditor::_node_removed(Node *p_node) { … }
void AnimationPlayerEditor::_notification(int p_what) { … }
void AnimationPlayerEditor::_autoplay_pressed() { … }
void AnimationPlayerEditor::_go_to_nearest_keyframe(bool p_backward) { … }
void AnimationPlayerEditor::_play_pressed() { … }
void AnimationPlayerEditor::_play_from_pressed() { … }
String AnimationPlayerEditor::_get_current() const { … }
void AnimationPlayerEditor::_play_bw_pressed() { … }
void AnimationPlayerEditor::_play_bw_from_pressed() { … }
void AnimationPlayerEditor::_stop_pressed() { … }
void AnimationPlayerEditor::_animation_selected(int p_which) { … }
void AnimationPlayerEditor::_animation_new() { … }
void AnimationPlayerEditor::_animation_rename() { … }
void AnimationPlayerEditor::_animation_remove() { … }
void AnimationPlayerEditor::_animation_remove_confirmed() { … }
void AnimationPlayerEditor::_select_anim_by_name(const String &p_anim) { … }
float AnimationPlayerEditor::_get_editor_step() const { … }
void AnimationPlayerEditor::_animation_name_edited() { … }
void AnimationPlayerEditor::_blend_editor_next_changed(const int p_idx) { … }
void AnimationPlayerEditor::_edit_animation_blend() { … }
void AnimationPlayerEditor::_update_animation_blend() { … }
void AnimationPlayerEditor::_blend_edited() { … }
void AnimationPlayerEditor::ensure_visibility() { … }
Dictionary AnimationPlayerEditor::get_state() const { … }
void AnimationPlayerEditor::set_state(const Dictionary &p_state) { … }
void AnimationPlayerEditor::_animation_resource_edit() { … }
void AnimationPlayerEditor::_animation_edit() { … }
void AnimationPlayerEditor::_scale_changed(const String &p_scale) { … }
void AnimationPlayerEditor::_update_animation() { … }
void AnimationPlayerEditor::_update_player() { … }
void AnimationPlayerEditor::_set_controls_disabled(bool p_disabled) { … }
void AnimationPlayerEditor::_update_animation_list_icons() { … }
void AnimationPlayerEditor::_update_name_dialog_library_dropdown() { … }
void AnimationPlayerEditor::_ensure_dummy_player() { … }
void AnimationPlayerEditor::edit(AnimationMixer *p_node, AnimationPlayer *p_player, bool p_is_dummy) { … }
void AnimationPlayerEditor::forward_force_draw_over_viewport(Control *p_overlay) { … }
void AnimationPlayerEditor::_animation_duplicate() { … }
Ref<Animation> AnimationPlayerEditor::_animation_clone(Ref<Animation> p_anim) { … }
void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_timeline_only) {
if (updating || !player || player->is_playing()) {
return;
};
updating = true;
String current = player->get_assigned_animation();
if (current.is_empty() || !player->has_animation(current)) {
updating = false;
current = "";
return;
};
Ref<Animation> anim;
anim = player->get_animation(current);
double pos = CLAMP((double)anim->get_length() * (p_value / frame->get_max()), 0, (double)anim->get_length());
if (track_editor->is_snap_timeline_enabled()) {
pos = Math::snapped(pos, _get_editor_step());
}
pos = CLAMP(pos, 0, (double)anim->get_length() - CMP_EPSILON2);
if (!p_timeline_only && anim.is_valid() && (!player->is_valid() || !Math::is_equal_approx(pos, player->get_current_animation_position()))) {
player->seek_internal(pos, true, true, false);
}
track_editor->set_anim_pos(pos);
};
void AnimationPlayerEditor::_animation_player_changed(Object *p_pl) { … }
void AnimationPlayerEditor::_animation_libraries_updated() { … }
void AnimationPlayerEditor::_list_changed() { … }
void AnimationPlayerEditor::_current_animation_changed(const String &p_name) { … }
void AnimationPlayerEditor::_animation_key_editor_anim_len_changed(float p_len) { … }
void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos, bool p_timeline_only, bool p_update_position_only) { … }
void AnimationPlayerEditor::_animation_update_key_frame() { … }
void AnimationPlayerEditor::_animation_tool_menu(int p_option) { … }
void AnimationPlayerEditor::_onion_skinning_menu(int p_option) { … }
void AnimationPlayerEditor::shortcut_input(const Ref<InputEvent> &p_ev) { … }
void AnimationPlayerEditor::_editor_visibility_changed() { … }
bool AnimationPlayerEditor::_are_onion_layers_valid() { … }
void AnimationPlayerEditor::_allocate_onion_layers() { … }
void AnimationPlayerEditor::_free_onion_layers() { … }
void AnimationPlayerEditor::_prepare_onion_layers_1() { … }
void AnimationPlayerEditor::_prepare_onion_layers_2_prolog() { … }
void AnimationPlayerEditor::_prepare_onion_layers_2_step_prepare(int p_step_offset, uint32_t p_capture_idx) { … }
void AnimationPlayerEditor::_prepare_onion_layers_2_step_capture(int p_step_offset, uint32_t p_capture_idx) { … }
void AnimationPlayerEditor::_prepare_onion_layers_2_epilog() { … }
void AnimationPlayerEditor::_start_onion_skinning() { … }
void AnimationPlayerEditor::_stop_onion_skinning() { … }
void AnimationPlayerEditor::_pin_pressed() { … }
AnimationMixer *AnimationPlayerEditor::fetch_mixer_for_library() const { … }
Node *AnimationPlayerEditor::get_cached_root_node() const { … }
bool AnimationPlayerEditor::_validate_tracks(const Ref<Animation> p_anim) { … }
void AnimationPlayerEditor::_bind_methods() { … }
AnimationPlayerEditor *AnimationPlayerEditor::singleton = …;
AnimationPlayer *AnimationPlayerEditor::get_player() const { … }
AnimationMixer *AnimationPlayerEditor::get_editing_node() const { … }
AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plugin) { … }
AnimationPlayerEditor::~AnimationPlayerEditor() { … }
void AnimationPlayerEditorPlugin::_notification(int p_what) { … }
void AnimationPlayerEditorPlugin::_property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance) { … }
void AnimationPlayerEditorPlugin::_transform_key_request(Object *sp, const String &p_sub, const Transform3D &p_key) { … }
void AnimationPlayerEditorPlugin::_update_keying() { … }
void AnimationPlayerEditorPlugin::edit(Object *p_object) { … }
void AnimationPlayerEditorPlugin::_clear_dummy_player() { … }
void AnimationPlayerEditorPlugin::_update_dummy_player(AnimationMixer *p_mixer) { … }
bool AnimationPlayerEditorPlugin::handles(Object *p_object) const { … }
void AnimationPlayerEditorPlugin::make_visible(bool p_visible) { … }
AnimationPlayerEditorPlugin::AnimationPlayerEditorPlugin() { … }
AnimationPlayerEditorPlugin::~AnimationPlayerEditorPlugin() { … }
bool EditorInspectorPluginAnimationTrackKeyEdit::can_handle(Object *p_object) { … }
void EditorInspectorPluginAnimationTrackKeyEdit::parse_begin(Object *p_object) { … }
AnimationTrackKeyEditEditorPlugin::AnimationTrackKeyEditEditorPlugin() { … }
bool AnimationTrackKeyEditEditorPlugin::handles(Object *p_object) const { … }
bool EditorInspectorPluginAnimationMarkerKeyEdit::can_handle(Object *p_object) { … }
void EditorInspectorPluginAnimationMarkerKeyEdit::parse_begin(Object *p_object) { … }
AnimationMarkerKeyEditEditorPlugin::AnimationMarkerKeyEditEditorPlugin() { … }
bool AnimationMarkerKeyEditEditorPlugin::handles(Object *p_object) const { … }