summaryrefslogtreecommitdiff
path: root/editor/editor_data.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_data.cpp')
-rw-r--r--editor/editor_data.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 49d55e6305..4acee1363c 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -701,6 +701,15 @@ String EditorData::get_scene_title(int p_idx) const {
return name;
}
+void EditorData::set_scene_path(int p_idx, const String &p_path) {
+
+ ERR_FAIL_INDEX(p_idx, edited_scene.size());
+
+ if (!edited_scene[p_idx].root)
+ return;
+ edited_scene[p_idx].root->set_filename(p_path);
+}
+
String EditorData::get_scene_path(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), String());