Cleanup
This commit is contained in:
@@ -11,6 +11,7 @@ import arm.format.PngTools;
|
||||
import arm.ui.UITrait;
|
||||
import arm.ui.UIFiles;
|
||||
import arm.ui.BoxExport;
|
||||
import arm.Tool;
|
||||
using StringTools;
|
||||
|
||||
class ExportTexture {
|
||||
@@ -50,8 +51,8 @@ class ExportTexture {
|
||||
var f = UIFiles.filename;
|
||||
if (f == "") f = "untitled";
|
||||
var formatType = UITrait.inst.formatType;
|
||||
var bits = UITrait.inst.bitsHandle.position == 0 ? 8 : 16;
|
||||
var ext = bits == 16 ? ".exr" : formatType == 0 ? ".png" : ".jpg";
|
||||
var bits = UITrait.inst.bitsHandle.position == Bits8 ? 8 : 16;
|
||||
var ext = bits == 16 ? ".exr" : formatType == FormatPng ? ".png" : ".jpg";
|
||||
if (f.endsWith(ext)) f = f.substr(0, f.length - 4);
|
||||
ext = udimTile + ext;
|
||||
var texpaint:Image = null;
|
||||
@@ -229,11 +230,11 @@ class ExportTexture {
|
||||
var out = new BytesOutput();
|
||||
var res = Config.getTextureRes();
|
||||
var bitsHandle = UITrait.inst.bitsHandle.position;
|
||||
var bits = bitsHandle == 0 ? 8 : bitsHandle == 1 ? 16 : 32;
|
||||
var bits = bitsHandle == Bits8 ? 8 : bitsHandle == Bits16 ? 16 : 32;
|
||||
if (bits > 8) { // 16/32bit
|
||||
var writer = new ExrWriter(out, res, res, pixels, bits, type, off);
|
||||
}
|
||||
else if (UITrait.inst.formatType == 0) {
|
||||
else if (UITrait.inst.formatType == FormatPng) {
|
||||
var writer = new PngWriter(out);
|
||||
var data =
|
||||
type == 1 ?
|
||||
|
||||
Reference in New Issue
Block a user