MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / ValidateAddOnTree

Method ValidateAddOnTree

Source/Flow/Private/FlowAsset.cpp:404–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404void UFlowAsset::ValidateAddOnTree(UFlowNodeAddOn& AddOn, FFlowMessageLog& MessageLog)
405{
406 // Filter unauthorized addon nodes
407 FText FailureReason;
408 if (!IsNodeOrAddOnClassAllowed(AddOn.GetClass(), &FailureReason))
409 {
410 const FString ErrorMsg =
411 FailureReason.IsEmpty()
412 ? FString::Format(*ValidationError_AddOnNodeClassNotAllowed, {*AddOn.GetClass()->GetName()})
413 : FailureReason.ToString();
414
415 MessageLog.Error(*ErrorMsg, AddOn.GetFlowNodeSelfOrOwner());
416 }
417
418 // Validate AddOn
419 AddOn.ValidationLog.Messages.Empty();
420 AddOn.ValidateNode();
421 MessageLog.Messages.Append(AddOn.ValidationLog.Messages);
422
423 // Validate Children
424 for (UFlowNodeAddOn* Child : AddOn.GetFlowNodeAddOnChildren())
425 {
426 if (IsValid(Child))
427 {
428 ValidateAddOnTree(*Child, MessageLog);
429 }
430 }
431}
432
433bool UFlowAsset::IsFlowNodeClassInAllowedClasses(const UClass& FlowNodeClass,
434 const TSubclassOf<UFlowNodeBase>& RequiredAncestor) const

Callers

nothing calls this directly

Calls 6

IsValidFunction · 0.85
IsEmptyMethod · 0.80
ToStringMethod · 0.80
GetNameMethod · 0.45
ValidateNodeMethod · 0.45

Tested by

no test coverage detected