| 4130 | } |
| 4131 | |
| 4132 | void SceneTreeDock::_focus_node() { |
| 4133 | Node *node = scene_tree->get_selected(); |
| 4134 | ERR_FAIL_NULL(node); |
| 4135 | |
| 4136 | if (node->is_class("CanvasItem")) { |
| 4137 | CanvasItemEditorPlugin *editor = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor_by_name("2D")); |
| 4138 | editor->get_canvas_item_editor()->focus_selection(); |
| 4139 | } else { |
| 4140 | Node3DEditorPlugin *editor = Object::cast_to<Node3DEditorPlugin>(editor_data->get_editor_by_name("3D")); |
| 4141 | editor->get_spatial_editor()->get_editor_viewport(0)->focus_selection(); |
| 4142 | } |
| 4143 | } |
| 4144 | |
| 4145 | void SceneTreeDock::attach_script_to_selected(bool p_extend) { |
| 4146 | if (ScriptServer::get_language_count() == 0) { |
nothing calls this directly
no test coverage detected