MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / set_edited_scene_root

Method set_edited_scene_root

editor/editor_data.cpp:780–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780void 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
796int EditorData::get_edited_scene_count() const {
797 return edited_scene.size();

Callers 1

clear_edited_scenesMethod · 0.45

Calls 4

get_scene_file_pathMethod · 0.80
set_scene_file_pathMethod · 0.80
sizeMethod · 0.65
is_emptyMethod · 0.45

Tested by

no test coverage detected