| 50 | } |
| 51 | |
| 52 | void FFlowAssetIndexer::IndexGraph(const UFlowAsset* InFlowAsset, FSearchSerializer& Serializer) const |
| 53 | { |
| 54 | for (UEdGraphNode* Node : InFlowAsset->GetGraph()->Nodes) |
| 55 | { |
| 56 | // Ignore Reroutes |
| 57 | if (Cast<UFlowGraphNode_Reroute>(Node)) |
| 58 | { |
| 59 | continue; |
| 60 | } |
| 61 | |
| 62 | // Special rules for comment nodes |
| 63 | if (Cast<UEdGraphNode_Comment>(Node)) |
| 64 | { |
| 65 | Serializer.BeginIndexingObject(Node, Node->NodeComment); |
| 66 | Serializer.IndexProperty(TEXT("Comment"), Node->NodeComment); |
| 67 | Serializer.EndIndexingObject(); |
| 68 | continue; |
| 69 | } |
| 70 | |
| 71 | // Indexing UEdGraphNode |
| 72 | { |
| 73 | const FText NodeText = Node->GetNodeTitle(ENodeTitleType::MenuTitle); |
| 74 | Serializer.BeginIndexingObject(Node, NodeText); |
| 75 | Serializer.IndexProperty(TEXT("Title"), NodeText); |
| 76 | |
| 77 | if (!Node->NodeComment.IsEmpty()) |
| 78 | { |
| 79 | Serializer.IndexProperty(TEXT("Comment"), Node->NodeComment); |
| 80 | } |
| 81 | |
| 82 | for (const UEdGraphPin* Pin : Node->GetAllPins()) |
| 83 | { |
| 84 | if (Pin->Direction == EGPD_Input && Pin->LinkedTo.Num() == 0) |
| 85 | { |
| 86 | const FText PinText = Pin->GetDisplayName(); |
| 87 | if (PinText.IsEmpty()) |
| 88 | { |
| 89 | continue; |
| 90 | } |
| 91 | |
| 92 | const FText PinValue = Pin->GetDefaultAsText(); |
| 93 | if (PinValue.IsEmpty()) |
| 94 | { |
| 95 | continue; |
| 96 | } |
| 97 | |
| 98 | const FString PinLabel = TEXT("[Pin] ") + *FTextInspector::GetSourceString(PinText); |
| 99 | Serializer.IndexProperty(PinLabel, PinValue); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | // This will serialize any user exposed options for the node that are editable in the Details |
| 104 | FIndexerUtilities::IterateIndexableProperties(Node, [&Serializer](const FProperty* Property, const FString& Value) |
| 105 | { |
| 106 | Serializer.IndexProperty(Property, Value); |
| 107 | }); |
| 108 | |
| 109 | Serializer.EndIndexingObject(); |
nothing calls this directly
no test coverage detected