Fix dilate when using multiple atlases
This commit is contained in:
@@ -17,6 +17,7 @@ import arm.data.LayerSlot;
|
||||
import arm.node.MakeMaterial;
|
||||
import arm.render.RenderPathPaint;
|
||||
import arm.util.MeshUtil;
|
||||
import arm.util.UVUtil;
|
||||
import arm.Enums;
|
||||
import arm.ProjectFormat;
|
||||
|
||||
@@ -613,6 +614,7 @@ class Layers {
|
||||
Context.paintObject.skip_context = "paint";
|
||||
Context.mergedObject.visible = true;
|
||||
}
|
||||
UVUtil.dilatemapCached = false;
|
||||
}
|
||||
|
||||
public static function newLayer(clear = true): LayerSlot {
|
||||
|
||||
@@ -64,6 +64,7 @@ class ImportMesh {
|
||||
});
|
||||
|
||||
// No mask by default
|
||||
for (p in Project.paintObjects) p.visible = true;
|
||||
if (Context.mergedObject == null) MeshUtil.mergeMesh();
|
||||
Context.paintObject.skip_context = "paint";
|
||||
Context.mergedObject.visible = true;
|
||||
|
||||
@@ -126,7 +126,9 @@ class UVUtil {
|
||||
// dilateTexUnpack = pipeDilate.getConstantLocation("texUnpack");
|
||||
}
|
||||
|
||||
var geom = Context.mergedObject != null ? Context.mergedObject.data.geom : Context.paintObject.data.geom;
|
||||
var mask = Context.objectMaskUsed() ? Context.layer.objectMask : 0;
|
||||
if (Context.layerFilterUsed()) mask = Context.layerFilter;
|
||||
var geom = mask == 0 && Context.mergedObject != null ? Context.mergedObject.data.geom : Context.paintObject.data.geom;
|
||||
var g4 = dilatemap.g4;
|
||||
g4.begin();
|
||||
g4.clear(0x00000000);
|
||||
|
||||
Reference in New Issue
Block a user