You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
nDisplay: Fixed viewport unqiue naming so that a viewport name is unique across the entire cluster, not just within its cluster node.
#jira UE-114093 #jira UE-114503 #rb Patrick.Hardy #ROBOMERGE-SOURCE: CL 16150313 in //UE4/Release-4.27/... #ROBOMERGE-BOT: RELEASE (Release-4.27 -> Main) (v789-15992632) [CL 16150316 by trystan binkley-jone in Main branch]
This commit is contained in:
@@ -590,7 +590,31 @@ FString FDisplayClusterConfiguratorClusterUtils::GetUniqueNameForViewport(FStrin
|
||||
UniqueName = FString::Printf(TEXT("%s_%d"), *InitialName, NameIndex);
|
||||
}
|
||||
|
||||
while (ParentClusterNode->Viewports.Contains(UniqueName))
|
||||
// Viewport names must be unique across the entire cluster, not just within its parent cluster nodes. Gather all of the viewport names
|
||||
// in the cluster to check for uniqueness. Add the parent cluster node's viewports first, in case we can't get to the root cluster through
|
||||
// the cluster node's Outer (i.e. the cluster node has not been added to the cluster yet)
|
||||
TSet<FString> UsedViewportNames;
|
||||
for (const TPair<FString, UDisplayClusterConfigurationViewport*>& ViewportKeyPair : ParentClusterNode->Viewports)
|
||||
{
|
||||
UsedViewportNames.Add(ViewportKeyPair.Key);
|
||||
}
|
||||
|
||||
if (UDisplayClusterConfigurationCluster* Cluster = Cast<UDisplayClusterConfigurationCluster>(ParentClusterNode->GetOuter()))
|
||||
{
|
||||
for (const TPair<FString, UDisplayClusterConfigurationClusterNode*>& ClusterNodeKeyPair : Cluster->Nodes)
|
||||
{
|
||||
UDisplayClusterConfigurationClusterNode* ClusterNode = ClusterNodeKeyPair.Value;
|
||||
if (ClusterNode != ParentClusterNode)
|
||||
{
|
||||
for (const TPair<FString, UDisplayClusterConfigurationViewport*>& ViewportKeyPair : ClusterNode->Viewports)
|
||||
{
|
||||
UsedViewportNames.Add(ViewportKeyPair.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (UsedViewportNames.Contains(UniqueName))
|
||||
{
|
||||
UniqueName = FString::Printf(TEXT("%s_%d"), *InitialName, ++NameIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user