本文整理汇总了C++中UEdGraphNode::PostPasteNode方法的典型用法代码示例。如果您正苦于以下问题:C++ UEdGraphNode::PostPasteNode方法的具体用法?C++ UEdGraphNode::PostPasteNode怎么用?C++ UEdGraphNode::PostPasteNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UEdGraphNode
的用法示例。
在下文中一共展示了UEdGraphNode::PostPasteNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PostProcessPastedNodes
// Reconcile other pin links:
// - Links between nodes within the copied set are fine
// - Links to nodes that were not copied need to be fixed up if the copy-paste was in the same graph or broken completely
// Call PostPasteNode on each node
void FEdGraphUtilities::PostProcessPastedNodes(TSet<UEdGraphNode*>& SpawnedNodes)
{
// Run thru and fix up the node's pin links; they may point to invalid pins if the paste was to another graph
for (TSet<UEdGraphNode*>::TIterator It(SpawnedNodes); It; ++It)
{
UEdGraphNode* Node = *It;
UEdGraph* CurrentGraph = Node->GetGraph();
for (int32 PinIndex = 0; PinIndex < Node->Pins.Num(); ++PinIndex)
{
UEdGraphPin* ThisPin = Node->Pins[PinIndex];
for (int32 LinkIndex = 0; LinkIndex < ThisPin->LinkedTo.Num(); )
{
UEdGraphPin* OtherPin = ThisPin->LinkedTo[LinkIndex];
if (OtherPin == NULL)
{
// Totally bogus link
ThisPin->LinkedTo.RemoveAtSwap(LinkIndex);
}
else if (!SpawnedNodes.Contains(OtherPin->GetOwningNode()))
{
// It's a link across the selection set, so it should be broken
OtherPin->LinkedTo.RemoveSwap(ThisPin);
ThisPin->LinkedTo.RemoveAtSwap(LinkIndex);
}
else if (!OtherPin->LinkedTo.Contains(ThisPin))
{
// The link needs to be reciprocal
check(OtherPin->GetOwningNode()->GetGraph() == CurrentGraph);
OtherPin->LinkedTo.Add(ThisPin);
++LinkIndex;
}
else
{
// Everything seems fine but sanity check the graph
check(OtherPin->GetOwningNode()->GetGraph() == CurrentGraph);
++LinkIndex;
}
}
}
}
// Give every node a chance to deep copy associated resources, etc...
for (TSet<UEdGraphNode*>::TIterator It(SpawnedNodes); It; ++It)
{
UEdGraphNode* Node = *It;
Node->PostPasteNode();
Node->ReconstructNode();
// Ensure we have RF_Transactional set on all pasted nodes, as its not copied in the T3D format
Node->SetFlags(RF_Transactional);
}
}