Show import options on mesh drop
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user