Implement drawing and editing all anim beziers

* Move bezier edit from track to button in toolbar
* Draw, edit all bezier curves simultaneously
* Add click on curve to select tracks
* Tie track editor's filter view to bezier editor
* Implement visibility and locking
* Fix editor spacing issues
* Fix track buttons spacing
* Add keyframe focus and (de)select all key handling
This commit is contained in:
Francois Belair 2021-11-09 10:05:28 -05:00
parent 8161e28512
commit 13a0d9177d
5 changed files with 803 additions and 303 deletions

View file

@ -164,7 +164,6 @@ class AnimationTrackEdit : public Control {
Rect2 interp_mode_rect;
Rect2 loop_wrap_rect;
Rect2 remove_rect;
Rect2 bezier_edit_rect;
Ref<Texture2D> type_icon;
Ref<Texture2D> selected_icon;
@ -300,6 +299,7 @@ class AnimationTrackEditor : public VBoxContainer {
EditorSpinSlider *step;
TextureRect *zoom_icon;
Button *snap;
Button *bezier_edit_icon;
OptionButton *snap_mode;
Button *imported_anim_warning;
@ -406,7 +406,7 @@ class AnimationTrackEditor : public VBoxContainer {
Map<SelectedKey, KeyInfo> selection;
void _key_selected(int p_key, bool p_single, int p_track);
void _key_selected(int p_track, int p_key, bool p_single);
void _key_deselected(int p_key, int p_track);
bool moving_selection;
@ -431,6 +431,7 @@ class AnimationTrackEditor : public VBoxContainer {
Vector<Ref<AnimationTrackEditPlugin>> track_edit_plugins;
void _toggle_bezier_edit();
void _cancel_bezier_edit();
void _bezier_edit(int p_for_track);