Entirely new (and much improved) animation editor.
This commit is contained in:
parent
3cd09cd943
commit
b659fd6d74
60 changed files with 11745 additions and 5177 deletions
|
|
@ -42,8 +42,9 @@
|
|||
/**
|
||||
@author Juan Linietsky <reduzio@gmail.com>
|
||||
*/
|
||||
class AnimationKeyEditor;
|
||||
class AnimationTrackEditor;
|
||||
class AnimationPlayerEditorPlugin;
|
||||
|
||||
class AnimationPlayerEditor : public VBoxContainer {
|
||||
|
||||
GDCLASS(AnimationPlayerEditor, VBoxContainer);
|
||||
|
|
@ -53,6 +54,14 @@ class AnimationPlayerEditor : public VBoxContainer {
|
|||
AnimationPlayer *player;
|
||||
|
||||
enum {
|
||||
TOOL_NEW_ANIM,
|
||||
TOOL_LOAD_ANIM,
|
||||
TOOL_SAVE_ANIM,
|
||||
TOOL_SAVE_AS_ANIM,
|
||||
TOOL_DUPLICATE_ANIM,
|
||||
TOOL_RENAME_ANIM,
|
||||
TOOL_EDIT_TRANSITIONS,
|
||||
TOOL_REMOVE_ANIM,
|
||||
TOOL_COPY_ANIM,
|
||||
TOOL_PASTE_ANIM,
|
||||
TOOL_EDIT_RESOURCE
|
||||
|
|
@ -72,6 +81,7 @@ class AnimationPlayerEditor : public VBoxContainer {
|
|||
};
|
||||
|
||||
enum {
|
||||
ANIM_OPEN,
|
||||
ANIM_SAVE,
|
||||
ANIM_SAVE_AS
|
||||
};
|
||||
|
|
@ -89,16 +99,8 @@ class AnimationPlayerEditor : public VBoxContainer {
|
|||
Button *play_bw_from;
|
||||
|
||||
//Button *pause;
|
||||
Button *add_anim;
|
||||
Button *autoplay;
|
||||
Button *rename_anim;
|
||||
Button *duplicate_anim;
|
||||
|
||||
Button *resource_edit_anim;
|
||||
Button *load_anim;
|
||||
MenuButton *save_anim;
|
||||
Button *blend_anim;
|
||||
Button *remove_anim;
|
||||
MenuButton *tool_anim;
|
||||
MenuButton *onion_skinning;
|
||||
ToolButton *pin;
|
||||
|
|
@ -130,7 +132,7 @@ class AnimationPlayerEditor : public VBoxContainer {
|
|||
bool updating;
|
||||
bool updating_blends;
|
||||
|
||||
AnimationKeyEditor *key_editor;
|
||||
AnimationTrackEditor *track_editor;
|
||||
|
||||
// Onion skinning
|
||||
struct {
|
||||
|
|
@ -207,8 +209,8 @@ class AnimationPlayerEditor : public VBoxContainer {
|
|||
|
||||
void _unhandled_key_input(const Ref<InputEvent> &p_ev);
|
||||
void _animation_tool_menu(int p_option);
|
||||
void _animation_save_menu(int p_option);
|
||||
void _onion_skinning_menu(int p_option);
|
||||
void _animation_about_to_show_menu();
|
||||
|
||||
void _editor_visibility_changed();
|
||||
bool _are_onion_layers_valid();
|
||||
|
|
@ -219,6 +221,8 @@ class AnimationPlayerEditor : public VBoxContainer {
|
|||
void _start_onion_skinning();
|
||||
void _stop_onion_skinning();
|
||||
|
||||
void _pin_pressed();
|
||||
|
||||
AnimationPlayerEditor();
|
||||
~AnimationPlayerEditor();
|
||||
|
||||
|
|
@ -232,7 +236,9 @@ public:
|
|||
AnimationPlayer *get_player() const;
|
||||
static AnimationPlayerEditor *singleton;
|
||||
|
||||
AnimationKeyEditor *get_key_editor() { return key_editor; }
|
||||
bool is_pinned() const { return pin->is_pressed(); }
|
||||
void unpin() { pin->set_pressed(false); }
|
||||
AnimationTrackEditor *get_track_editor() { return track_editor; }
|
||||
Dictionary get_state() const;
|
||||
void set_state(const Dictionary &p_state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue