You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
RigVM: Avoid type dialog for pins supporting both float and double
#rb sara.schvartzman #jira na #preflight https://horde.devtools.epicgames.com/job/63f4b777500c05a6249423c8 [CL 24337789 by Helge Mathee in ue5-main branch]
This commit is contained in:
@@ -16782,6 +16782,46 @@ bool URigVMController::PrepareToLink(URigVMPin* FirstToResolve, URigVMPin* Secon
|
||||
return false;
|
||||
}
|
||||
|
||||
// reduce matching types by duplicate entries for float / double
|
||||
{
|
||||
TArray<TRigVMTypeIndex> FilteredMatchingTypes;
|
||||
FilteredMatchingTypes.Reserve(MatchingTypes.Num());
|
||||
for(const TRigVMTypeIndex& MatchingType : MatchingTypes)
|
||||
{
|
||||
// special case float singe & array
|
||||
if(MatchingType == RigVMTypeUtils::TypeIndex::Float)
|
||||
{
|
||||
if(MatchingTypes.Contains(RigVMTypeUtils::TypeIndex::Double))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(MatchingType == RigVMTypeUtils::TypeIndex::FloatArray)
|
||||
{
|
||||
if(MatchingTypes.Contains(RigVMTypeUtils::TypeIndex::DoubleArray))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
bool bAlreadyContainsMatch = false;
|
||||
for(const TRigVMTypeIndex& FilteredType : FilteredMatchingTypes)
|
||||
{
|
||||
if(Registry.CanMatchTypes(MatchingType, FilteredType, true))
|
||||
{
|
||||
bAlreadyContainsMatch = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(bAlreadyContainsMatch)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
FilteredMatchingTypes.Add(MatchingType);
|
||||
}
|
||||
Swap(FilteredMatchingTypes, MatchingTypes);
|
||||
}
|
||||
|
||||
TRigVMTypeIndex FinalType = INDEX_NONE;
|
||||
if (MatchingTypes.Num() > 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user