diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index f5b5cfa848d..d1ac69c8d85 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -1274,12 +1274,7 @@ void AnimationTrackEdit::_notification(int p_what) { } text_color.a *= 0.7; } else if (node) { - Ref icon; - if (has_icon(node->get_class(), "EditorIcons")) { - icon = get_icon(node->get_class(), "EditorIcons"); - } else { - icon = get_icon("Node", "EditorIcons"); - } + Ref icon = EditorNode::get_singleton()->get_object_icon(node, "Node"); draw_texture(icon, Point2(ofs, int(get_size().height - icon->get_height()) / 2)); icon_cache = icon; @@ -3500,9 +3495,7 @@ void AnimationTrackEditor::_update_tracks() { if (root && root->has_node(base_path)) { Node *n = root->get_node(base_path); if (n) { - if (has_icon(n->get_class(), "EditorIcons")) { - icon = get_icon(n->get_class(), "EditorIcons"); - } + icon = EditorNode::get_singleton()->get_object_icon(n, "Node"); name = n->get_name(); tooltip = root->get_path_to(n); } diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 38f30df1694..f5846c10f64 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -499,7 +499,6 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i for (int i = 0; i < get_custom_types()[p_inherits].size(); i++) { if (get_custom_types()[p_inherits][i].name == p_type) { - Ref icon = get_custom_types()[p_inherits][i].icon; Ref