diff options
Diffstat (limited to 'editor/animation_track_editor.cpp')
-rw-r--r-- | editor/animation_track_editor.cpp | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index e724d4ccdb..c425613262 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -358,7 +358,7 @@ public: setting = true; undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS); - RES prev = animation->audio_track_get_key_stream(track, key); + Ref<Resource> prev = animation->audio_track_get_key_stream(track, key); undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_stream", track, key, stream); undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev); undo_redo->add_do_method(this, "_update_obj", animation); @@ -992,7 +992,7 @@ public: setting = true; undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS); } - RES prev = animation->audio_track_get_key_stream(track, key); + Ref<Resource> prev = animation->audio_track_get_key_stream(track, key); undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_stream", track, key, stream); undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev); update_obj = true; @@ -1886,10 +1886,7 @@ void AnimationTimelineEdit::_bind_methods() { AnimationTimelineEdit::AnimationTimelineEdit() { name_limit = 150 * EDSCALE; - zoom = nullptr; - track_edit = nullptr; - play_position_pos = 0; play_position = memnew(Control); play_position->set_mouse_filter(MOUSE_FILTER_PASS); add_child(play_position); @@ -2531,7 +2528,7 @@ bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant return false; } - RES res; + Ref<Resource> res; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path); @@ -2692,7 +2689,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { } break; case Animation::TYPE_AUDIO: { String stream_name = "null"; - RES stream = animation->audio_track_get_key_stream(track, key_idx); + Ref<Resource> stream = animation->audio_track_get_key_stream(track, key_idx); if (stream.is_valid()) { if (stream->get_path().is_resource_file()) { stream_name = stream->get_path().get_file(); @@ -3217,17 +3214,6 @@ void AnimationTrackEdit::_bind_methods() { } AnimationTrackEdit::AnimationTrackEdit() { - undo_redo = nullptr; - timeline = nullptr; - root = nullptr; - path = nullptr; - path_popup = nullptr; - menu = nullptr; - dropping_at = 0; - - select_single_attempt = -1; - - play_position_pos = 0; play_position = memnew(Control); play_position->set_mouse_filter(MOUSE_FILTER_PASS); add_child(play_position); @@ -4128,7 +4114,7 @@ PropertyInfo AnimationTrackEditor::_find_hint_for_track(int p_idx, NodePath &r_b return PropertyInfo(); } - RES res; + Ref<Resource> res; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(path, res, leftover_path, true); @@ -4424,7 +4410,7 @@ void AnimationTrackEditor::_update_tracks() { NodePath path = animation->track_get_path(i); if (root && root->has_node_and_resource(path)) { - RES res; + Ref<Resource> res; NodePath base_path; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(path, res, leftover_path, true); @@ -5030,7 +5016,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) { } break; case Animation::TYPE_AUDIO: { Dictionary ak; - ak["stream"] = RES(); + ak["stream"] = Ref<Resource>(); ak["start_offset"] = 0; ak["end_offset"] = 0; @@ -6029,7 +6015,7 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) { Variant::Type valid_type = Variant::NIL; Object *obj = nullptr; - RES res; + Ref<Resource> res; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(p_animation->track_get_path(i), res, leftover_path); @@ -6238,8 +6224,6 @@ void AnimationTrackEditor::_pick_track_filter_input(const Ref<InputEvent> &p_ie) } AnimationTrackEditor::AnimationTrackEditor() { - root = nullptr; - undo_redo = EditorNode::get_singleton()->get_undo_redo(); main_panel = memnew(PanelContainer); @@ -6452,8 +6436,6 @@ AnimationTrackEditor::AnimationTrackEditor() { insert_confirm_reset->set_text(TTR("Create RESET Track(s)", "")); insert_confirm_reset->set_pressed(EDITOR_GET("editors/animation/default_create_reset_tracks")); ichb->add_child(insert_confirm_reset); - key_edit = nullptr; - multi_key_edit = nullptr; box_selection = memnew(Control); add_child(box_selection); |