Fix importing mask from project file

This commit is contained in:
Lubos Lenco
2021-05-31 17:57:31 +02:00
parent 5c86763955
commit fa4292fe11
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ class LayerSlot {
name = "Mask " + (id + 1);
var format = "R8";
blending = BlendAdd;
objectMask = parent.objectMask;
if (parent != null) objectMask = parent.objectMask;
{
var t = new RenderTargetRaw();
+6 -1
View File
@@ -299,7 +299,12 @@ class ImportArm {
// Assign parents to groups and masks
for (i in 0...project.layer_datas.length) {
var ld = project.layer_datas[i];
if (ld.parent >= 0) Project.layers[i].parent = Project.layers[ld.parent];
if (ld.parent >= 0) {
Project.layers[i].parent = Project.layers[ld.parent];
if (Project.layers[i].isMask()) {
Project.layers[i].objectMask = Project.layers[i].parent.objectMask;
}
}
}
Context.setLayer(Project.layers[0]);