Control Rig: Fix local variables nodes not dealing with constant values

#jira UE-161265
#rb jack.cai
#preflight 62ff66799835a27d8d9c4bc9

[CL 21468244 by sara schvartzman in ue5-main branch]
This commit is contained in:
sara schvartzman
2022-08-19 19:38:13 -04:00
parent 224a04a0d0
commit 2751278ee4

View File

@@ -2138,15 +2138,15 @@ FString URigVMCompiler::GetPinHashImpl(const URigVMPin* InPin, const FRigVMVarEx
{
if (bIsLiteral)
{
// Literal values will be reused for all instance of local variables
if (InVarExpr && InVarExpr->NumParents() == 0 && InVarExpr->NumChildren() == 0)
{
// Default literal values will be reused for all instance of local variables
return FString::Printf(TEXT("%sLocalVariableDefault::%s|%s%s"), *Prefix, *Node->GetGraph()->GetGraphName(), *VariableName.ToString(), *Suffix);
}
else if (InVarExpr)
{
const FString GraphPath = InVarExpr->GetProxy().GetCallstack().GetCallPath(false);
return FString::Printf(TEXT("%sLocalVariable::%s|%s%s"), *Prefix, *GraphPath, *VariableName.ToString(), *Suffix);
const FString GraphPath = InVarExpr->GetProxy().GetCallstack().GetCallPath(true);
return FString::Printf(TEXT("%sLocalVariable::%s%s"), *Prefix, *GraphPath, *Suffix);
}
else
{