Skip to content

Commit 913292f

Browse files
committed
Added missing initialization policy handling
1 parent a8aa562 commit 913292f

File tree

10 files changed

+41
-29
lines changed

10 files changed

+41
-29
lines changed

Source/PCGExtendedToolkit/Private/Details/PCGExDetailsSettings.cpp

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,8 @@ namespace PCGExDetails
5151
FPCGExContext* Context = InDataFacade->GetContext();
5252
if (!Context) { return false; }
5353

54-
Buffer = InDataFacade->GetBroadcaster<T>(Selector, bSupportScoped && !bCaptureMinMax, bCaptureMinMax);
55-
56-
if (!Buffer)
57-
{
58-
if (!this->bQuiet) { PCGEX_LOG_INVALID_SELECTOR_C(Context, Selector, Selector) }
59-
return false;
60-
}
54+
Buffer = InDataFacade->GetBroadcaster<T>(Selector, bSupportScoped && !bCaptureMinMax, bCaptureMinMax, this->bQuiet);
55+
if (!Buffer) { return false; }
6156

6257
return true;
6358
}
@@ -86,11 +81,7 @@ namespace PCGExDetails
8681
FPCGExContext* Context = InDataFacade->GetContext();
8782
if (!Context) { return false; }
8883

89-
if (!PCGExDataHelpers::TryReadDataValue(Context, InDataFacade->GetIn(), Selector, this->Constant))
90-
{
91-
if (!this->bQuiet) { PCGEX_LOG_INVALID_SELECTOR_C(Context, Selector, Selector) }
92-
return false;
93-
}
84+
if (!PCGExDataHelpers::TryReadDataValue(Context, InDataFacade->GetIn(), Selector, this->Constant, this->bQuiet)) { return false; }
9485

9586
return true;
9687
}
@@ -103,11 +94,7 @@ namespace PCGExDetails
10394

10495
PCGEX_VALIDATE_NAME_C(Context, Name)
10596

106-
if (!PCGExDataHelpers::TryReadDataValue(Context, InDataFacade->GetIn(), Name, this->Constant))
107-
{
108-
if (!this->bQuiet) { PCGEX_LOG_INVALID_ATTR_C(Context, Attribute, Name) }
109-
return false;
110-
}
97+
if (!PCGExDataHelpers::TryReadDataValue(Context, InDataFacade->GetIn(), Name, this->Constant, this->bQuiet)) { return false; }
11198

11299
return true;
113100
}

Source/PCGExtendedToolkit/Private/Graph/Filters/Edges/PCGExEdgeEndpointsCompareStrFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace PCGExEdgeEndpointsCompareStr
3737
{
3838
if (!IFilter::Init(InContext, InCluster, InPointDataFacade, InEdgeDataFacade)) { return false; }
3939

40-
StringBuffer = InPointDataFacade->GetBroadcaster<FString>(TypedFilterFactory->Config.Attribute);
40+
StringBuffer = InPointDataFacade->GetBroadcaster<FString>(TypedFilterFactory->Config.Attribute, false, PCGEX_QUIET_HANDLING);
4141
if (!StringBuffer)
4242
{
4343
PCGEX_LOG_INVALID_SELECTOR_HANDLED_C(InContext, Comparison Attribute, TypedFilterFactory->Config.Attribute)

Source/PCGExtendedToolkit/Private/Misc/Filters/PCGExBooleanCompareFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bool PCGExPointFilter::FBooleanCompareFilter::Init(FPCGExContext* InContext, con
4848
{
4949
if (!IFilter::Init(InContext, InPointDataFacade)) { return false; }
5050

51-
OperandA = PointDataFacade->GetBroadcaster<bool>(TypedFilterFactory->Config.OperandA, true);
51+
OperandA = PointDataFacade->GetBroadcaster<bool>(TypedFilterFactory->Config.OperandA, true, false, PCGEX_QUIET_HANDLING);
5252

5353
if (!OperandA)
5454
{

Source/PCGExtendedToolkit/Private/Misc/Filters/PCGExDotFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ bool PCGExPointFilter::FDotFilter::Init(FPCGExContext* InContext, const TSharedP
6363
if (!DotComparison.Init(InContext, InPointDataFacade.ToSharedRef())) { return false; }
6464

6565

66-
OperandA = PointDataFacade->GetBroadcaster<FVector>(TypedFilterFactory->Config.OperandA, true);
66+
OperandA = PointDataFacade->GetBroadcaster<FVector>(TypedFilterFactory->Config.OperandA, true, false, PCGEX_QUIET_HANDLING);
6767
OperandAMultiplier = TypedFilterFactory->Config.bInvertOperandA ? -1 : 1;
6868
if (!OperandA)
6969
{

Source/PCGExtendedToolkit/Private/Misc/Filters/PCGExMeanFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ bool PCGExPointFilter::FMeanFilter::Init(FPCGExContext* InContext, const TShared
3636
{
3737
if (!IFilter::Init(InContext, InPointDataFacade)) { return false; }
3838

39-
const TSharedPtr<PCGExData::TBuffer<double>> Buffer = PointDataFacade->GetBroadcaster<double>(TypedFilterFactory->Config.Target, false, true);
39+
const TSharedPtr<PCGExData::TBuffer<double>> Buffer = PointDataFacade->GetBroadcaster<double>(TypedFilterFactory->Config.Target, false, true, PCGEX_QUIET_HANDLING);
4040

4141
if (!Buffer)
4242
{

Source/PCGExtendedToolkit/Private/Misc/Filters/PCGExModuloCompareFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ bool PCGExPointFilter::FModuloComparisonFilter::Init(FPCGExContext* InContext, c
5252
{
5353
if (!IFilter::Init(InContext, InPointDataFacade)) { return false; }
5454

55-
OperandA = PointDataFacade->GetBroadcaster<double>(TypedFilterFactory->Config.OperandA, true);
55+
OperandA = PointDataFacade->GetBroadcaster<double>(TypedFilterFactory->Config.OperandA, true, false, PCGEX_QUIET_HANDLING);
5656

5757
if (!OperandA)
5858
{

Source/PCGExtendedToolkit/Private/Misc/Filters/PCGExNumericCompareFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bool PCGExPointFilter::FNumericCompareFilter::Init(FPCGExContext* InContext, con
4747
{
4848
if (!IFilter::Init(InContext, InPointDataFacade)) { return false; }
4949

50-
OperandA = PointDataFacade->GetBroadcaster<double>(TypedFilterFactory->Config.OperandA, true);
50+
OperandA = PointDataFacade->GetBroadcaster<double>(TypedFilterFactory->Config.OperandA, true, false, PCGEX_QUIET_HANDLING);
5151

5252
if (!OperandA)
5353
{

Source/PCGExtendedToolkit/Private/Misc/Filters/PCGExTensorDotFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bool PCGExPointFilter::FTensorDotFilter::Init(FPCGExContext* InContext, const TS
5151
TensorsHandler = MakeShared<PCGExTensor::FTensorsHandler>(TypedFilterFactory->Config.TensorHandlerDetails);
5252
if (!TensorsHandler->Init(InContext, TypedFilterFactory->TensorFactories, InPointDataFacade)) { return false; }
5353

54-
OperandA = PointDataFacade->GetBroadcaster<FVector>(TypedFilterFactory->Config.OperandA, true);
54+
OperandA = PointDataFacade->GetBroadcaster<FVector>(TypedFilterFactory->Config.OperandA, true, false, PCGEX_QUIET_HANDLING);
5555
if (!OperandA)
5656
{
5757
PCGEX_LOG_INVALID_SELECTOR_HANDLED_C(InContext, Operand A, TypedFilterFactory->Config.OperandA)

Source/PCGExtendedToolkit/Private/Misc/Filters/PCGExWithinRangeFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ bool PCGExPointFilter::FWithinRangeFilter::Init(FPCGExContext* InContext, const
5555
{
5656
if (!IFilter::Init(InContext, InPointDataFacade)) { return false; }
5757

58-
OperandA = PointDataFacade->GetBroadcaster<double>(TypedFilterFactory->Config.OperandA, true);
58+
OperandA = PointDataFacade->GetBroadcaster<double>(TypedFilterFactory->Config.OperandA, true, false, PCGEX_QUIET_HANDLING);
5959

6060
if (!OperandA)
6161
{

Source/PCGExtendedToolkit/Private/Misc/PCGExRecursionTracker.cpp

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,18 @@ Context->StageOutput(Extra, PCGExRecursionTracker::Output##_NAME##Label, Flatten
239239
{
240240
Branch(true);
241241
StageResult(true);
242+
243+
TSharedPtr<PCGExData::FTags> Tags = MakeShared<PCGExData::FTags>();
244+
Tags->Append(AddTags);
245+
Tags->Remove(RemoveTags);
246+
Tags->Set<int32>(TAG_MAX_COUNT_STR, SafeMax);
247+
Tags->Set<int32>(TAG_REMAINDER_STR, SafeMax);
248+
249+
const TSet<FString> FlattenedTags = Tags->Flatten();
250+
251+
PCGEX_OUTPUT_EXTRA(Progress, float, Settings->bOneMinus ? 1 : 0)
252+
PCGEX_OUTPUT_EXTRA(Index, int32, 0)
253+
PCGEX_OUTPUT_EXTRA(Remainder, int32, SafeMax)
242254
}
243255
else
244256
{
@@ -256,11 +268,11 @@ Context->StageOutput(Extra, PCGExRecursionTracker::Output##_NAME##Label, Flatten
256268

257269
const TSet<FString> FlattenedTags = IO->Tags->Flatten();
258270

259-
UPCGMetadata* Metadata = NewParamData->MutableMetadata();
260-
Metadata->DeleteAttribute(ContinueAttribute);
261-
Metadata->CreateAttribute<bool>(ContinueAttribute, true, true, true);
271+
UPCGMetadata* NewMetadata = NewParamData->MutableMetadata();
272+
NewMetadata->DeleteAttribute(ContinueAttribute);
273+
NewMetadata->CreateAttribute<bool>(ContinueAttribute, true, true, true);
262274

263-
if (Settings->bAddEntryWhenCreatingFromExistingData) { Metadata->AddEntry(); }
275+
if (Settings->bAddEntryWhenCreatingFromExistingData) { NewMetadata->AddEntry(); }
264276

265277
Context->StageOutput(NewParamData, PCGExRecursionTracker::OutputTrackerLabel, FlattenedTags, false, true, false);
266278

@@ -276,6 +288,19 @@ Context->StageOutput(Extra, PCGExRecursionTracker::Output##_NAME##Label, Flatten
276288
if (ValidInputs.IsEmpty())
277289
{
278290
Branch(false);
291+
292+
TSharedPtr<PCGExData::FTags> Tags = MakeShared<PCGExData::FTags>();
293+
294+
Tags->Append(AddTags);
295+
Tags->Remove(RemoveTags);
296+
Tags->Set<int32>(TAG_MAX_COUNT_STR, SafeMax);
297+
Tags->Set<int32>(TAG_REMAINDER_STR, SafeMax);
298+
299+
const TSet<FString> FlattenedTags = Tags->Flatten();
300+
301+
PCGEX_OUTPUT_EXTRA(Progress, float, Settings->bOneMinus ? 0 : 1)
302+
PCGEX_OUTPUT_EXTRA(Index, int32, SafeMax)
303+
PCGEX_OUTPUT_EXTRA(Remainder, int32, 0)
279304
}
280305
else
281306
{

0 commit comments

Comments
 (0)