diff options
| author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-09-30 16:30:55 +0200 |
|---|---|---|
| committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-09-30 16:50:25 +0200 |
| commit | 570cdc128f79e6acc4cfb37fa7d1606db9fac198 (patch) | |
| tree | ff0dfeba52fbcd1c66135327e07bc32aa4a3188e /editor/plugins/node_3d_editor_plugin.cpp | |
| parent | bc0f5d3dde0f847dffdad927157a209271ced923 (diff) | |
| download | redot-engine-570cdc128f79e6acc4cfb37fa7d1606db9fac198.tar.gz | |
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.cpp | 8 |
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); |
