Skip to content

Commit 7726604

Browse files
committed
Update PCGExSplitPath.cpp
1 parent 0a0d425 commit 7726604

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

Source/PCGExtendedToolkit/Private/Paths/PCGExSplitPath.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,28 @@ namespace PCGExSplitPath
369369
{
370370
if (SubPaths.IsEmpty() || (SubPaths.Num() == 1 && SubPaths[0].Count == PointDataFacade->GetNum()))
371371
{
372-
// No splits, forward
373-
PCGEX_INIT_IO_VOID(PointDataFacade->Source, PCGExData::EIOInit::Forward)
372+
bool bHasFilteredOutPoints = false;
373+
for (const int8 Filtered : PointFilterCache)
374+
{
375+
if (Filtered)
376+
{
377+
bHasFilteredOutPoints = true;
378+
break;
379+
}
380+
}
381+
382+
if (!bHasFilteredOutPoints)
383+
{
384+
// No splits, forward
385+
PCGEX_INIT_IO_VOID(PointDataFacade->Source, PCGExData::EIOInit::Forward)
386+
}
387+
else if ((SubPaths.Num() == 1 && SubPaths[0].Count == PointDataFacade->GetNum()) && bClosedLoop)
388+
{
389+
// Disconnecting closed loop last point will produce an open path
390+
PCGEX_INIT_IO_VOID(PointDataFacade->Source, PCGExData::EIOInit::Duplicate)
391+
PCGExPaths::SetClosedLoop(PointDataFacade->GetOut(), false);
392+
}
393+
374394
return;
375395
}
376396

0 commit comments

Comments
 (0)