ソースを参照

Support psd, bmp, gif formats

unknown 6 年 前
コミット
b6e558214c
3 ファイル変更5 行追加2 行削除
  1. 1 1
      Sources/arm/ui/TabTextures.hx
  2. 1 1
      Sources/arm/ui/UITrait.hx
  3. 3 0
      Sources/arm/util/Path.hx

+ 1 - 1
Sources/arm/ui/TabTextures.hx

@@ -17,7 +17,7 @@ class TabTextures {
 			if (ui.button("Import")) {
 				UIFiles.show = true;
 				UIFiles.isSave = false;
-				UIFiles.filters = "jpg,png,tga,hdr";
+				UIFiles.filters = "jpg,png,tga,bmp,psd,gif,hdr";
 				UIFiles.filesDone = function(path:String) {
 					Importer.importFile(path);
 				}

+ 1 - 1
Sources/arm/ui/UITrait.hx

@@ -442,7 +442,7 @@ class UITrait {
 		else if (Operator.shortcut(Config.keymap.import_assets)) {
 			UIFiles.show = true;
 			UIFiles.isSave = false;
-			UIFiles.filters = "jpg,png,tga,hdr,obj,fbx,blend,arm";
+			UIFiles.filters = "jpg,png,tga,bmp,psd,gif,hdr,obj,fbx,blend,arm";
 			UIFiles.filesDone = function(path:String) {
 				Importer.importFile(path);
 			}

+ 3 - 0
Sources/arm/util/Path.hx

@@ -41,6 +41,9 @@ class Path {
 		return p.endsWith(".jpg") ||
 			   p.endsWith(".png") ||
 			   p.endsWith(".tga") ||
+			   p.endsWith(".bmp") ||
+			   p.endsWith(".psd") ||
+			   p.endsWith(".gif") ||
 			   p.endsWith(".hdr");
 	}