summaryrefslogtreecommitdiff
path: root/editor/plugins/node_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-30 17:59:56 +0200
committerGitHub <noreply@github.com>2021-09-30 17:59:56 +0200
commit5b7ec95de7e9783d880eeb76b9a172085b1117a9 (patch)
tree136aa80356794489e4030a1811166d712eb07dff /editor/plugins/node_3d_editor_plugin.cpp
parent50bb0896fa05563b2dffc455955993dc983f03b4 (diff)
parent570cdc128f79e6acc4cfb37fa7d1606db9fac198 (diff)
Merge pull request #53254 from Calinou/node-rename-filename
Rename Node's `filename` property to `scene_file_path` for clarity
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index fdd4baaf7d..e5e3be8a4d 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -3917,7 +3917,7 @@ void Node3DEditorViewport::_remove_preview() {
}
bool Node3DEditorViewport::_cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node) {
- if (p_desired_node->get_filename() == p_target_scene_path) {
+ if (p_desired_node->get_scene_file_path() == p_target_scene_path) {
return true;
}
@@ -3959,15 +3959,15 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
return false;
}
- if (editor->get_edited_scene()->get_filename() != "") { // cyclical instancing
- if (_cyclical_dependency_exists(editor->get_edited_scene()->get_filename(), instantiated_scene)) {
+ if (editor->get_edited_scene()->get_scene_file_path() != "") { // cyclical instancing
+ if (_cyclical_dependency_exists(editor->get_edited_scene()->get_scene_file_path(), instantiated_scene)) {
memdelete(instantiated_scene);
return false;
}
}
if (scene != nullptr) {
- instantiated_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path));
+ instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
}
editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene);