diff options
author | Micky <micheledevita2@gmail.com> | 2022-08-19 16:06:17 +0200 |
---|---|---|
committer | Micky <micheledevita2@gmail.com> | 2022-08-20 16:39:44 +0200 |
commit | 6aa4c9c77af6bb3850db90ce61162457fc95ff89 (patch) | |
tree | 8f261a6f2095018c088b8dd1a9c3071d1f7317f5 /editor/plugins | |
parent | 35cfaafda8073f700c9d2fe42a43d3d81eaaea67 (diff) |
Restore ability to drag 'n' drop Mesh to Viewport
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 6afc6798d0..9823a13564 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -4113,6 +4113,7 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant continue; } Ref<PackedScene> scn = res; + Ref<Mesh> mesh = res; Ref<Material> mat = res; Ref<Texture2D> tex = res; if (scn.is_valid()) { @@ -4131,6 +4132,8 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant spatial_editor->set_preview_material(mat); break; + } else if (mesh.is_valid()) { + // Let the mesh pass. } else if (tex.is_valid()) { Ref<StandardMaterial3D> new_mat = memnew(StandardMaterial3D); new_mat->set_texture(BaseMaterial3D::TEXTURE_ALBEDO, tex); |