45 CastChecked<UDialogueGraph>(
Dialogue->GetGraph())->RemoveAllNodes();
48 Dialogue->GetMutableStartNode()->ClearGraphNode();
49 const TArray<UDlgNode*>& Nodes =
Dialogue->GetNodes();
50 const int32 NodesNum = Nodes.Num();
51 for (int32 NodeIndex = 0; NodeIndex < NodesNum; NodeIndex++)
53 Nodes[NodeIndex]->ClearGraphNode();
65 TArray<TArray<UEdGraphPin*>> OldPinsMap;
68 for (int32 GraphNodeIndex = 0, GraphNodesNum = DialogueGraphNodes.Num(); GraphNodeIndex < GraphNodesNum; GraphNodeIndex++)
72 check(GraphNode->
GetDialogueNode().GetNodeOpenChildren_DEPRECATED().Num() == 0)
73 OldPinsMap.Add(GraphNode->Pins);
74 GraphNode->Pins.Empty();
79 if (GraphNode->NodeComment.TrimStartAndEnd().IsNumeric() || GraphNode->
IsRootNode())
81 GraphNode->NodeComment.Empty();
82 GraphNode->bCommentBubbleVisible =
false;
87 for (int32 GraphNodeIndex = 0, GraphNodesNum = DialogueGraphNodes.Num(); GraphNodeIndex < GraphNodesNum; GraphNodeIndex++)
92 for (UEdGraphPin* OldPin : OldPinsMap[GraphNodeIndex])
94 if (OldPin->LinkedTo.Num() == 0 || OldPin->Direction == EGPD_Input)
99 check(OldPin->LinkedTo.Num() == 1);
100 check(OldPin->Direction == EGPD_Output);
102 UDialogueGraphNode* ConnectedNode = CastChecked<UDialogueGraphNode>(OldPin->LinkedTo[0]->GetOwningNode());
105 FDialogueEditorUtilities::SpawnGraphNodeFromTemplate<UDialogueGraphNode_Edge>(
115 for (TArray<UEdGraphPin*> OldPins : OldPinsMap)
117 for (UEdGraphPin* OldPin : OldPins)
119 UDialogueGraphNode::DestroyPin(OldPin);