Skip to content

Commit 73159ac

Browse files
committed
Tensor seed fix
1 parent 318a27a commit 73159ac

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed
1.2 MB
Binary file not shown.
48.8 KB
Binary file not shown.

Plugins/PCGExtendedToolkit/Source/PCGExtendedToolkit/Private/Paths/PCGExExtrudeTensors.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ namespace PCGExExtrudeTensors
149149
if (RemainingIterations > 1)
150150
{
151151
// We re-entered bounds from a previously completed path.
152-
// TODO : Start a new extrusion from head if selected mode allows for it
153-
// TODO : Set extrusion origin to be the intersection point with the limit box
154152
if (const TSharedPtr<FExtrusion> ChildExtrusion = Processor->InitExtrusionFromExtrusion(SharedThis(this)))
155153
{
156154
ChildExtrusion->bIsChildExtrusion = true;
@@ -252,17 +250,20 @@ namespace PCGExExtrudeTensors
252250

253251
void FProcessor::InitExtrusionFromSeed(const int32 InSeedIndex)
254252
{
255-
if (Settings->bIgnoreStoppedSeeds && StopFilters)
256-
{
257-
if (StopFilters->Test(PointDataFacade->Source->GetInPoint(InSeedIndex))) { return; }
258-
}
259-
260253
const int32 Iterations = PerPointIterations ? PerPointIterations->Read(InSeedIndex) : Settings->Iterations;
261254
if (Iterations < 1) { return; }
262255

256+
bool bIsStopped = false;
257+
if (StopFilters)
258+
{
259+
bIsStopped = StopFilters->Test(PointDataFacade->Source->GetInPoint(InSeedIndex));
260+
if (Settings->bIgnoreStoppedSeeds && bIsStopped) { return; }
261+
}
262+
263263
const TSharedPtr<FExtrusion> NewExtrusion = CreateExtrusionTemplate(InSeedIndex, Iterations);
264264
if (!NewExtrusion) { return; }
265265

266+
NewExtrusion->bIsProbe = bIsStopped;
266267
if (Settings->bUseMaxLength) { NewExtrusion->MaxLength = PerPointMaxLength ? PerPointMaxLength->Read(InSeedIndex) : Settings->MaxLength; }
267268
if (Settings->bUseMaxPointsCount) { NewExtrusion->MaxPointCount = PerPointMaxPoints ? PerPointMaxPoints->Read(InSeedIndex) : Settings->MaxPointsCount; }
268269

Plugins/PCGExtendedToolkit/Source/PCGExtendedToolkit/Public/Paths/PCGExExtrudeTensors.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ namespace PCGExExtrudeTensors
245245
FPCGPoint Origin;
246246

247247
public:
248+
bool bIsProbe = false;
248249
bool bIsChildExtrusion = false;
249250
bool bIsFollowUp = false;
250251

@@ -370,9 +371,11 @@ namespace PCGExExtrudeTensors
370371
{
371372
// Start writing path
372373
bIsExtruding = true;
373-
Metrics = PCGExPaths::FPathMetrics(PreviousHeadLocation);
374-
ExtrudedPoints[0].Transform = Head;
375-
return OnAdvanced(false);
374+
if(bIsProbe)
375+
{
376+
SetHead(Head);
377+
return OnAdvanced(false);
378+
}
376379
}
377380
}
378381

0 commit comments

Comments
 (0)