Show import options on mesh drop

This commit is contained in:
luboslenco
2019-11-20 21:26:44 +01:00
parent e135418ddd
commit 3a209ff61a
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -238,6 +238,12 @@ class Project {
}
public static function importMesh() {
UIFiles.show(Path.meshFormats.join(","), false, function(path:String) {
importMeshBox(path);
});
}
public static function importMeshBox(path:String) {
UIBox.showCustom(function(ui:Zui) {
if (ui.tab(Id.handle(), "Import Mesh")) {
@@ -254,9 +260,7 @@ class Project {
if (ui.button("Import") || ui.isReturnDown) {
UIBox.show = false;
App.redrawUI();
UIFiles.show(Path.meshFormats.join(","), false, function(path:String) {
ImportAsset.run(path);
});
ImportMesh.run(path);
}
}
});
+1 -1
View File
@@ -23,7 +23,7 @@ class ImportAsset {
public static function run(path:String, dropX = -1.0, dropY = -1.0) {
// Mesh
if (Path.isMesh(path)) {
ImportMesh.run(path);
Project.importMeshBox(path);
}
// Image
else if (Path.isTexture(path)) {