Skip to content

Commit 47abe66

Browse files
Merged PR 47403: Union empty operation fixed
Update FigmaParser.cs
1 parent 647b953 commit 47abe66

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Editor/FigmaParser.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2485,7 +2485,19 @@ static bool HasImageFill(BaseNodeMixin mixin)
24852485
}
24862486
static bool IsSvgNode(BaseNodeMixin mixin)
24872487
{
2488-
return mixin is LineNode || mixin is EllipseNode || mixin is RegularPolygonNode || mixin is StarNode || mixin is VectorNode || mixin is BooleanOperationNode;
2488+
return mixin is LineNode || mixin is EllipseNode || mixin is RegularPolygonNode || mixin is StarNode || mixin is VectorNode || (mixin is BooleanOperationNode && IsBooleanOperationVisible(mixin));
2489+
}
2490+
static bool IsBooleanOperationVisible(BaseNodeMixin node)
2491+
{
2492+
if (node is not ChildrenMixin children) return false;
2493+
2494+
foreach (SceneNode child in children.children)
2495+
{
2496+
if (child is not BooleanOperationNode && IsVisible(child) && IsSvgNode(child)) return true;
2497+
else if (child is BooleanOperationNode) return IsBooleanOperationVisible(child);
2498+
}
2499+
2500+
return false;
24892501
}
24902502
static bool IsStateNode(BaseNodeMixin mixin)
24912503
{

0 commit comments

Comments
 (0)