Improve brush preview icon

This commit is contained in:
luboslenco
2020-03-31 17:39:29 +02:00
parent b355159b3b
commit 9b9117b2f1
3 changed files with 10 additions and 8 deletions
+1
View File
@@ -103,6 +103,7 @@ class Layers {
rts.get("texpaint_blur").raw.height = size;
rts.get("texpaint_blur").image = Image.createRenderTarget(size, size);
}
if (RenderPathPaint.liveLayer != null) RenderPathPaint.liveLayer.resizeAndSetBits();
#if kha_direct3d12
arm.render.RenderPathRaytrace.ready = false; // Rebuild baketex
#end
+8 -8
View File
@@ -121,8 +121,15 @@ class ImportArm {
}
Project.raw = project;
var base = Path.baseDir(path);
var l0 = project.layer_datas[0];
App.resHandle.position = Config.getTextureResPos(l0.res);
var bitsPos = l0.bpp == 8 ? Bits8 : l0.bpp == 16 ? Bits16 : Bits32;
App.bitsHandle.position = bitsPos;
var bytesPerPixel = Std.int(l0.bpp / 8);
var format = l0.bpp == 8 ? TextureFormat.RGBA32 : l0.bpp == 16 ? TextureFormat.RGBA64 : TextureFormat.RGBA128;
var base = Path.baseDir(path);
for (file in project.assets) {
#if krom_windows
file = file.replace("/", "\\");
@@ -193,13 +200,6 @@ class ImportArm {
Context.paintObject.skip_context = "paint";
Context.mergedObject.visible = true;
var l0 = project.layer_datas[0];
App.resHandle.position = Config.getTextureResPos(l0.res);
var bitsPos = l0.bpp == 8 ? Bits8 : l0.bpp == 16 ? Bits16 : Bits32;
App.bitsHandle.position = bitsPos;
var bytesPerPixel = Std.int(l0.bpp / 8);
var format = l0.bpp == 8 ? TextureFormat.RGBA32 : l0.bpp == 16 ? TextureFormat.RGBA64 : TextureFormat.RGBA128;
if (Project.layers[0].texpaint.width != Config.getTextureRes()) {
for (l in Project.layers) l.resizeAndSetBits();
if (History.undoLayers != null) for (l in History.undoLayers) l.resizeAndSetBits();
+1
View File
@@ -307,6 +307,7 @@ class RenderUtil {
Context.lastPaintVecY = pointsY[i - 1];
Context.paintVec.x = pointsX[i];
Context.paintVec.y = pointsY[i];
Context.parseBrushInputs();
RenderPathPaint.commandsPaint();
}