Преглед на файлове

fbx exporter: fix file path picker

lviguier преди 1 година
родител
ревизия
6a14409079
променени са 1 файла, в които са добавени 6 реда и са изтрити 4 реда
  1. 6 4
      hide/comp/SceneEditor.hx

+ 6 - 4
hide/comp/SceneEditor.hx

@@ -2822,10 +2822,12 @@ class SceneEditor {
 
 		// Handle the export of selection into a fbx file
 		Ide.inst.chooseFileSave("Export.fbx", function(filePath) {
-			var out = new haxe.io.BytesOutput();
-			new hxd.fmt.fbx.Writer(out).write(roots, params);
-			sys.io.File.saveBytes(filePath, out.getBytes());
-			Ide.inst.message('Successfully exported object at path : ${filePath}');
+			if (filePath != null) {
+				var out = new haxe.io.BytesOutput();
+				new hxd.fmt.fbx.Writer(out).write(roots, params);
+				sys.io.File.saveBytes(Ide.inst.getPath(filePath), out.getBytes());
+				Ide.inst.message('Successfully exported object at path : ${filePath}');
+			}
 		});
 
 	}