1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Drag and drop for meshes directly and fix drop restriction for non-Texture objects in canvas editor.

This commit is contained in:
SaracenOne
2017-09-16 14:57:17 +01:00
parent 62cb43bb8d
commit a3b3886029
2 changed files with 59 additions and 12 deletions

View File

@@ -3848,6 +3848,20 @@ bool CanvasItemEditorViewport::can_drop_data(const Point2 &p_point, const Varian
continue;
}
memdelete(instanced_scene);
} else if (type == "Texture" ||
type == "ImageTexture" ||
type == "ViewportTexture" ||
type == "CurveTexture" ||
type == "GradientTexture" ||
type == "StreamTexture" ||
type == "AtlasTexture" ||
type == "LargeTexture") {
Ref<Texture> texture = ResourceLoader::load(files[i]);
if (texture.is_valid() == false) {
continue;
}
} else {
continue;
}
can_instance = true;
break;