| 778 | } |
| 779 | |
| 780 | void EditorData::set_edited_scene_root(Node *p_root) { |
| 781 | ERR_FAIL_INDEX(current_edited_scene, edited_scene.size()); |
| 782 | edited_scene.write[current_edited_scene].root = p_root; |
| 783 | if (p_root) { |
| 784 | if (!p_root->get_scene_file_path().is_empty()) { |
| 785 | edited_scene.write[current_edited_scene].path = p_root->get_scene_file_path(); |
| 786 | } else { |
| 787 | p_root->set_scene_file_path(edited_scene[current_edited_scene].path); |
| 788 | } |
| 789 | } |
| 790 | |
| 791 | if (!edited_scene[current_edited_scene].path.is_empty()) { |
| 792 | edited_scene.write[current_edited_scene].file_modified_time = FileAccess::get_modified_time(edited_scene[current_edited_scene].path); |
| 793 | } |
| 794 | } |
| 795 | |
| 796 | int EditorData::get_edited_scene_count() const { |
| 797 | return edited_scene.size(); |
no test coverage detected