diff options
Diffstat (limited to 'editor/animation_track_editor.h')
-rw-r--r-- | editor/animation_track_editor.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index deefe6c6fd..5ac5999b68 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -76,7 +76,7 @@ class AnimationTimelineEdit : public Range { Rect2 hsize_rect; bool editing; - bool *block_animation_update_ptr; //used to block all tracks re-gen (speed up) + bool use_fps; bool panning_timeline; float panning_timeline_from; @@ -104,7 +104,6 @@ public: void set_zoom(Range *p_zoom); Range *get_zoom() const { return zoom; } void set_undo_redo(UndoRedo *p_undo_redo); - void set_block_animation_update_ptr(bool *p_block_ptr); void set_play_position(float p_pos); float get_play_position() const; @@ -112,6 +111,9 @@ public: void update_values(); + void set_use_fps(bool p_use_fps); + bool is_using_fps() const; + void set_hscroll(HScrollBar *p_hscroll); AnimationTimelineEdit(); @@ -143,6 +145,7 @@ class AnimationTrackEdit : public Control { Node *root; Control *play_position; //separate control used to draw so updates for only position changed are much faster float play_position_pos; + NodePath node_path; Ref<Animation> animation; int track; @@ -170,8 +173,6 @@ class AnimationTrackEdit : public Control { void _menu_selected(int p_index); - bool *block_animation_update_ptr; //used to block all tracks re-gen (speed up) - void _path_entered(const String &p_text); void _play_position_draw(); mutable int dropping_at; @@ -216,8 +217,7 @@ public: AnimationTimelineEdit *get_timeline() const { return timeline; } AnimationTrackEditor *get_editor() const { return editor; } UndoRedo *get_undo_redo() const { return undo_redo; } - bool *get_block_animation_update_ptr() { return block_animation_update_ptr; } - + NodePath get_path() const; void set_animation_and_track(const Ref<Animation> &p_animation, int p_track); virtual Size2 get_minimum_size() const; @@ -226,8 +226,6 @@ public: void set_editor(AnimationTrackEditor *p_editor); void set_root(Node *p_root); - void set_block_animation_update_ptr(bool *p_block_ptr); - void set_play_position(float p_pos); void update_play_position(); void cancel_drop(); @@ -309,12 +307,14 @@ class AnimationTrackEditor : public VBoxContainer { EditorSpinSlider *step; TextureRect *zoom_icon; ToolButton *snap; + OptionButton *snap_mode; + void _snap_mode_changed(int p_mode); Vector<AnimationTrackEdit *> track_edits; Vector<AnimationTrackEditGroup *> groups; - bool block_animation_update; - + bool animation_changing_awaiting_update; + void _animation_update(); int _get_track_selected(); void _animation_changed(); void _update_tracks(); @@ -334,6 +334,8 @@ class AnimationTrackEditor : public VBoxContainer { void _new_track_node_selected(NodePath p_path); void _new_track_property_selected(String p_name); + void _update_step_spinbox(); + PropertySelector *prop_selector; PropertySelector *method_selector; SceneTreeDialog *pick_track; @@ -490,6 +492,9 @@ public: void update_keying(); bool has_keying() const; + Dictionary get_state() const; + void set_state(const Dictionary &p_state); + void cleanup(); void set_anim_pos(float p_pos); |