瀏覽代碼

Merge pull request #64617 from Mickeon/editor-restore-mesh-drop

Rémi Verschelde 3 年之前
父節點
當前提交
fc0b6abe52
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      editor/plugins/node_3d_editor_plugin.cpp

+ 3 - 0
editor/plugins/node_3d_editor_plugin.cpp

@@ -4130,6 +4130,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()) {
@@ -4148,6 +4149,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);