|
@@ -7852,6 +7852,14 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|
box_selection_container->set_clip_contents(true);
|
|
box_selection_container->set_clip_contents(true);
|
|
timeline_vbox->add_child(box_selection_container);
|
|
timeline_vbox->add_child(box_selection_container);
|
|
|
|
|
|
|
|
+ bezier_edit = memnew(AnimationBezierTrackEdit);
|
|
|
|
+ timeline_vbox->add_child(bezier_edit);
|
|
|
|
+ bezier_edit->set_editor(this);
|
|
|
|
+ bezier_edit->set_timeline(timeline);
|
|
|
|
+ bezier_edit->hide();
|
|
|
|
+ bezier_edit->set_v_size_flags(SIZE_EXPAND_FILL);
|
|
|
|
+ bezier_edit->connect("timeline_changed", callable_mp(this, &AnimationTrackEditor::_timeline_changed));
|
|
|
|
+
|
|
marker_edit = memnew(AnimationMarkerEdit);
|
|
marker_edit = memnew(AnimationMarkerEdit);
|
|
timeline->get_child(0)->add_child(marker_edit);
|
|
timeline->get_child(0)->add_child(marker_edit);
|
|
marker_edit->set_editor(this);
|
|
marker_edit->set_editor(this);
|
|
@@ -7860,6 +7868,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|
marker_edit->set_anchors_and_offsets_preset(Control::LayoutPreset::PRESET_FULL_RECT);
|
|
marker_edit->set_anchors_and_offsets_preset(Control::LayoutPreset::PRESET_FULL_RECT);
|
|
marker_edit->connect(SceneStringName(draw), callable_mp(this, &AnimationTrackEditor::_redraw_groups));
|
|
marker_edit->connect(SceneStringName(draw), callable_mp(this, &AnimationTrackEditor::_redraw_groups));
|
|
marker_edit->connect(SceneStringName(draw), callable_mp(this, &AnimationTrackEditor::_redraw_tracks));
|
|
marker_edit->connect(SceneStringName(draw), callable_mp(this, &AnimationTrackEditor::_redraw_tracks));
|
|
|
|
+ marker_edit->connect(SceneStringName(draw), callable_mp((CanvasItem *)bezier_edit, &CanvasItem::queue_redraw));
|
|
|
|
|
|
scroll = memnew(ScrollContainer);
|
|
scroll = memnew(ScrollContainer);
|
|
box_selection_container->add_child(scroll);
|
|
box_selection_container->add_child(scroll);
|
|
@@ -7875,14 +7884,6 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|
scroll->get_v_scroll_bar()->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTrackEditor::_v_scroll_changed));
|
|
scroll->get_v_scroll_bar()->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTrackEditor::_v_scroll_changed));
|
|
scroll->get_h_scroll_bar()->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTrackEditor::_h_scroll_changed));
|
|
scroll->get_h_scroll_bar()->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTrackEditor::_h_scroll_changed));
|
|
|
|
|
|
- bezier_edit = memnew(AnimationBezierTrackEdit);
|
|
|
|
- timeline_vbox->add_child(bezier_edit);
|
|
|
|
- bezier_edit->set_editor(this);
|
|
|
|
- bezier_edit->set_timeline(timeline);
|
|
|
|
- bezier_edit->hide();
|
|
|
|
- bezier_edit->set_v_size_flags(SIZE_EXPAND_FILL);
|
|
|
|
- bezier_edit->connect("timeline_changed", callable_mp(this, &AnimationTrackEditor::_timeline_changed));
|
|
|
|
-
|
|
|
|
timeline_vbox->set_custom_minimum_size(Size2(0, 150) * EDSCALE);
|
|
timeline_vbox->set_custom_minimum_size(Size2(0, 150) * EDSCALE);
|
|
|
|
|
|
hscroll = memnew(HScrollBar);
|
|
hscroll = memnew(HScrollBar);
|