You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Restore ability to drag 'n' drop Mesh to Viewport
This commit is contained in:
@@ -4113,6 +4113,7 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Ref<PackedScene> scn = res;
|
Ref<PackedScene> scn = res;
|
||||||
|
Ref<Mesh> mesh = res;
|
||||||
Ref<Material> mat = res;
|
Ref<Material> mat = res;
|
||||||
Ref<Texture2D> tex = res;
|
Ref<Texture2D> tex = res;
|
||||||
if (scn.is_valid()) {
|
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);
|
spatial_editor->set_preview_material(mat);
|
||||||
break;
|
break;
|
||||||
|
} else if (mesh.is_valid()) {
|
||||||
|
// Let the mesh pass.
|
||||||
} else if (tex.is_valid()) {
|
} else if (tex.is_valid()) {
|
||||||
Ref<StandardMaterial3D> new_mat = memnew(StandardMaterial3D);
|
Ref<StandardMaterial3D> new_mat = memnew(StandardMaterial3D);
|
||||||
new_mat->set_texture(BaseMaterial3D::TEXTURE_ALBEDO, tex);
|
new_mat->set_texture(BaseMaterial3D::TEXTURE_ALBEDO, tex);
|
||||||
|
|||||||
Reference in New Issue
Block a user