Skip to content

Commit a60abf3

Browse files
authored
[LottieGen] Fixed layer combining for Exclude mode (#483)
1 parent 05c3d20 commit a60abf3

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

source/LottieToWinComp/Shapes.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,20 @@ static CompositionShape TranslateShapeLayerContents(
313313
return CanvasGeometryCombiner.CombineGeometries(geometries, combineMode);
314314
#else
315315
var accumulator = geometries[0];
316-
for (var i = 1; i < geometries.Length; i++)
316+
if (combineMode == CanvasGeometryCombine.Exclude)
317317
{
318-
accumulator = accumulator.CombineWith(geometries[i], Sn.Matrix3x2.Identity, combineMode);
318+
// TODO: investiagte how it works for 3+ layers with Exclude mode
319+
for (var i = 1; i < geometries.Length; i++)
320+
{
321+
accumulator = geometries[i].CombineWith(accumulator, Sn.Matrix3x2.Identity, combineMode);
322+
}
323+
}
324+
else
325+
{
326+
for (var i = 1; i < geometries.Length; i++)
327+
{
328+
accumulator = accumulator.CombineWith(geometries[i], Sn.Matrix3x2.Identity, combineMode);
329+
}
319330
}
320331

321332
return accumulator;

0 commit comments

Comments
 (0)