diff options
author | Webster Sheets <webster@web-eworks.com> | 2017-11-10 16:31:53 -0500 |
---|---|---|
committer | Webster Sheets <webster@web-eworks.com> | 2017-11-10 16:31:53 -0500 |
commit | 5c88ad9457a180fefc07707ed29f392e2cb98dce (patch) | |
tree | a67126adb38188270eaaa6029eeb22bf1505e188 /editor/plugins/spatial_editor_plugin.cpp | |
parent | 19b1ff0fc5f7acce23176ad6c8752604357472f0 (diff) |
Dropping a mesh file into the scene no longer creates an instanced scene.
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index e8714cece6..cc144344a6 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -2917,7 +2917,9 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P } } - instanced_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path)); + if (scene != NULL) { + instanced_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path)); + } editor_data->get_undo_redo().add_do_method(parent, "add_child", instanced_scene); editor_data->get_undo_redo().add_do_method(instanced_scene, "set_owner", editor->get_edited_scene()); |