2
0
mirror of https://github.com/godotengine/godot.git synced 2025-04-13 01:00:35 +08:00

Merge pull request from Web-eWorks/meshdropfix

Fix : Dragging OBJ mesh files no longer instances a scene
This commit is contained in:
Rémi Verschelde 2017-11-12 20:31:51 +01:00 committed by GitHub
commit 31117588fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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());