• UE蓝图 函数调用(CallFunction)节点和源码


    系列文章目录

    UE蓝图 Get节点和源码
    UE蓝图 Set节点和源码
    UE蓝图 Cast节点和源码
    UE蓝图 分支(Branch)节点和源码
    UE蓝图 入口(FunctionEntry)节点和源码
    UE蓝图 返回结果(FunctionResult)节点和源码
    UE蓝图 函数调用(CallFunction)节点和源码



    一、CallFunction节点功能

    在这里插入图片描述

    CallFunction节点用于调用指定的函数或方法。这些函数可以是引擎自带的,也可以是用户自定义的。通过CallFunction节点,你可以在蓝图中实现复杂的逻辑和交互。

    二、CallFunction节点用法

    在Unreal Engine(UE)的蓝图中,CallFunction节点用于在运行时调用一个特定的函数。这个节点通常用于执行那些已经定义好但需要在特定条件下触发的函数。以下是CallFunction节点的基本用法:

    1. 添加CallFunction节点:首先,你需要在你的蓝图中从“右键菜单” -> 在弹出框中输入函数的名字进行检索->选择你要使用的函数,添加一个CallFunction节点。

    2. 传递参数:如果所调用的函数需要参数,你需要将这些参数通过连线的方式传递给CallFunction节点的相应输入引脚。参数的类型和顺序必须与函数定义中的一致。

    3. 执行函数:当蓝图中的逻辑流程到达CallFunction节点时,它将执行所选择的函数。这意味着任何与该函数相关联的逻辑或行为都将被执行。

    4. 处理返回值:如果调用的函数有返回值,你可以在CallFunction节点的“Return Value”引脚处获取这个值。然后,你可以将这个返回值用于蓝图中的其他逻辑或传递给其他节点。

    5. 连接其他节点:你可以将CallFunction节点与其他节点连接起来,以创建更复杂的逻辑流程。例如,你可以使用Sequence节点来确保一系列操作按顺序执行,或者使用Parallel节点来同时执行多个操作。

    6. 编译和测试:完成蓝图编辑后,确保编译你的项目,并在游戏中测试CallFunction节点的行为,以确保它按照预期工作。

    三、CallFunction使用场景

    UE蓝图中的CallFunction节点有多个使用场景,以下是一些常见的例子:

    1. 事件处理

    在UE中,事件是蓝图系统的重要组成部分。当某个事件发生时(例如,用户点击按钮、角色受到伤害等),你可以使用CallFunction节点来调用处理该事件的函数。

    2. 条件逻辑

    根据游戏状态或条件的不同,你可能需要调用不同的函数。CallFunction节点可以与SequenceParallelBranch等节点结合使用,实现复杂的条件逻辑。

    3. 延迟操作

    使用CallFunction节点与Delay节点结合,可以实现延迟执行某些函数。例如,你可能希望在角色死亡后等待一段时间再触发某些行为。

    4. 数据处理

    当你需要对数据进行处理或转换时,可以创建自定义函数来处理这些数据,并通过CallFunction节点来调用这些函数。

    5. AI和角色行为

    在创建AI或角色行为时,你可能需要根据角色的状态或环境来调用不同的函数。CallFunction节点是实现这一目标的重要工具。

    6. 用户输入处理

    处理用户输入(如键盘、鼠标或手柄输入)时,你可以使用CallFunction节点来调用处理这些输入的函数。

    7. 系统交互

    与游戏系统(如音频、物理、渲染等)进行交互时,你可能需要调用特定的函数来执行某些操作。CallFunction节点提供了一种方便的方式来调用这些函数。

    8. 自定义逻辑

    除了上述常见场景外,CallFunction节点还可以用于任何需要调用自定义函数的场景。你可以创建自己的函数来实现特定的逻辑或行为,并通过CallFunction节点来调用它们。

    四、实现原理

    • 创建输入输出引脚
      解析函数的注解获取函数的元数据(输入输出参数和是否执行节点等)创建引脚
      函数定义示例如下
    	/** Modulo (A % B) */
    	UFUNCTION(BlueprintPure, meta=(DisplayName = "% (integer)", CompactNodeTitle = "%", Keywords = "% modulus"), Category="Math|Integer")
    	static int32 Percent_IntInt(int32 A, int32 B = 1);
    
    	/** Addition (A + B) */
    	UFUNCTION(BlueprintPure, meta=(DisplayName = "int + int", CompactNodeTitle = "+", Keywords = "+ add plus", CommutativeAssociativeBinaryOperator = "true"), Category="Math|Integer")
    	static int32 Add_IntInt(int32 A, int32 B = 1);
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 调用FKCHandler_CallFunction.RegisterNets注册函数引脚
    		for (UEdGraphPin* Pin : Node->Pins)
    		{
    			const bool bIsConnected = (Pin->LinkedTo.Num() != 0);
    
    			// if this pin could use a default (it doesn't have a connection or default of its own)
    			if (!bIsConnected && (Pin->DefaultObject == nullptr))
    			{
    				if (DefaultToSelfParamNames.Contains(Pin->PinName) && FKismetCompilerUtilities::ValidateSelfCompatibility(Pin, Context))
    				{
    					ensure(Pin->PinType.PinSubCategoryObject != nullptr);
    					ensure((Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_Object) || (Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_Interface));
    
    					FBPTerminal* Term = Context.RegisterLiteral(Pin);
    					Term->Type.PinSubCategory = UEdGraphSchema_K2::PN_Self;
    					Context.NetMap.Add(Pin, Term);
    				}
    				else if (RequiresSetValue.Contains(Pin->PinName))
    				{
    					CompilerContext.MessageLog.Error(*NSLOCTEXT("KismetCompiler", "PinMustHaveConnection_Error", "Pin @@ must have a connection").ToString(), Pin);
    				}
    			}
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 调用Compile编译创建Statement
    FBlueprintCompiledStatement* LatentStatement = nullptr;
    //遍历需要调用该函数的所有上下文,并为每个上下文发出一个调用函数语句
    for (FBPTerminal* Target : ContextTerms)
    {
    	FBlueprintCompiledStatement& Statement = Context.AppendStatementForNode(Node);
    	Statement.FunctionToCall = Function;
    	Statement.FunctionContext = Target;
    	Statement.Type = KCST_CallFunction;
    	Statement.bIsInterfaceContext = IsCalledFunctionFromInterface(Node);
    	Statement.bIsParentContext = IsCalledFunctionFinal(Node);
    
    	Statement.LHS = LHSTerm;
    	Statement.RHS = RHSTerms;
    
    	if (!bIsLatent)
    	{
    		// Fixup ubergraph calls
    		if (pSrcEventNode)
    		{
    			UEdGraphPin* ExecOut = CompilerContext.GetSchema()->FindExecutionPin(**pSrcEventNode, EGPD_Output);
    
    			check(CompilerContext.UbergraphContext);
    			CompilerContext.UbergraphContext->GotoFixupRequestMap.Add(&Statement, ExecOut);
    			Statement.UbergraphCallIndex = 0;
    		}
    	}
    	else
    	{
    		// Fixup latent functions
    		if (LatentTargetNode && (Target == ContextTerms.Last()))
    		{
    			check(LatentTargetParamIndex != INDEX_NONE);
    			Statement.UbergraphCallIndex = LatentTargetParamIndex;
    			Context.GotoFixupRequestMap.Add(&Statement, ThenExecPin);
    			LatentStatement = &Statement;
    		}
    	}
    
    	AdditionalCompiledStatementHandling(Context, Node, Statement);
    
    	if(Statement.Type == KCST_CallFunction && Function->HasAnyFunctionFlags(FUNC_Delegate))
    	{
    		CompilerContext.MessageLog.Error(*LOCTEXT("CallingDelegate_Error", "@@ is trying to call a delegate function - delegates cannot be called directly").ToString(), Node);
    		// Sanitize the statement, this would have ideally been detected earlier but we need
    		// to run AdditionalCompiledStatementHandling to satisify the DelegateNodeHandler
    		// implementation:
    		Statement.Type = KCST_CallDelegate;
    	}
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49

    五、相关源码

    源码文件:
    CallFunctionHandler.h
    CallFunctionHandler.cpp
    K2Node_CallFunction.h
    K2Node_CallFunction.cpp
    相关类:
    FKCHandler_CallFunction
    K2Node_CallFunction

    
    /*******************************************************************************
     *  UK2Node_CallFunction
     ******************************************************************************/
    
    UK2Node_CallFunction::UK2Node_CallFunction(const FObjectInitializer& ObjectInitializer)
    	: Super(ObjectInitializer)
    	, bPinTooltipsValid(false)
    {
    	OrphanedPinSaveMode = ESaveOrphanPinMode::SaveAll;
    }
    
    
    bool UK2Node_CallFunction::HasDeprecatedReference() const
    {
    	UFunction* Function = GetTargetFunction();
    	return (Function && Function->HasMetaData(FBlueprintMetadata::MD_DeprecatedFunction));
    }
    
    FEdGraphNodeDeprecationResponse UK2Node_CallFunction::GetDeprecationResponse(EEdGraphNodeDeprecationType DeprecationType) const
    {
    	FEdGraphNodeDeprecationResponse Response = Super::GetDeprecationResponse(DeprecationType);
    	if (DeprecationType == EEdGraphNodeDeprecationType::NodeHasDeprecatedReference)
    	{
    		// TEMP: Do not warn in the case of SpawnActor, as we have a special upgrade path for those nodes
    		if (FunctionReference.GetMemberName() == FName(TEXT("BeginSpawningActorFromBlueprint")))
    		{
    			Response.MessageType = EEdGraphNodeDeprecationMessageType::None;
    		}
    		else
    		{
    			UFunction* Function = GetTargetFunction();
    			if (ensureMsgf(Function != nullptr, TEXT("This node should not be able to report having a deprecated reference if the target function cannot be resolved.")))
    			{
    				FString DetailedMessage = Function->GetMetaData(FBlueprintMetadata::MD_DeprecationMessage);
    				Response.MessageText = FBlueprintEditorUtils::GetDeprecatedMemberUsageNodeWarning(GetUserFacingFunctionName(Function), FText::FromString(DetailedMessage));
    			}
    		}
    	}
    	
    	return Response;
    }
    
    FText UK2Node_CallFunction::GetFunctionContextString() const
    {
    	FText ContextString;
    
    	// Don't show 'target is' if no target pin!
    	UEdGraphPin* SelfPin = GetDefault<UEdGraphSchema_K2>()->FindSelfPin(*this, EGPD_Input);
    	if(SelfPin != NULL && !SelfPin->bHidden)
    	{
    		const UFunction* Function = GetTargetFunction();
    		UClass* CurrentSelfClass = (Function != NULL) ? Function->GetOwnerClass() : NULL;
    		UClass const* TrueSelfClass = CurrentSelfClass;
    		if (CurrentSelfClass && CurrentSelfClass->ClassGeneratedBy)
    		{
    			TrueSelfClass = CurrentSelfClass->GetAuthoritativeClass();
    		}
    
    		const FText TargetText = FBlueprintEditorUtils::GetFriendlyClassDisplayName(TrueSelfClass);
    
    		FFormatNamedArguments Args;
    		Args.Add(TEXT("TargetName"), TargetText);
    		ContextString = FText::Format(LOCTEXT("CallFunctionOnDifferentContext", "Target is {TargetName}"), Args);
    	}
    
    	return ContextString;
    }
    
    
    FText UK2Node_CallFunction::GetNodeTitle(ENodeTitleType::Type TitleType) const
    {
    	FText FunctionName;
    	FText ContextString;
    	FText RPCString;
    
    	if (UFunction* Function = GetTargetFunction())
    	{
    		RPCString = UK2Node_Event::GetLocalizedNetString(Function->FunctionFlags, true);
    		FunctionName = GetUserFacingFunctionName(Function);
    		ContextString = GetFunctionContextString();
    	}
    	else
    	{
    		FunctionName = FText::FromName(FunctionReference.GetMemberName());
    		if ((GEditor != NULL) && (GetDefault<UEditorStyleSettings>()->bShowFriendlyNames))
    		{
    			FunctionName = FText::FromString(FName::NameToDisplayString(FunctionName.ToString(), false));
    		}
    	}
    
    	if(TitleType == ENodeTitleType::FullTitle)
    	{
    		FFormatNamedArguments Args;
    		Args.Add(TEXT("FunctionName"), FunctionName);
    		Args.Add(TEXT("ContextString"), ContextString);
    		Args.Add(TEXT("RPCString"), RPCString);
    
    		if (ContextString.IsEmpty() && RPCString.IsEmpty())
    		{
    			return FText::Format(LOCTEXT("CallFunction_FullTitle", "{FunctionName}"), Args);
    		}
    		else if (ContextString.IsEmpty())
    		{
    			return FText::Format(LOCTEXT("CallFunction_FullTitle_WithRPCString", "{FunctionName}\n{RPCString}"), Args);
    		}
    		else if (RPCString.IsEmpty())
    		{
    			return FText::Format(LOCTEXT("CallFunction_FullTitle_WithContextString", "{FunctionName}\n{ContextString}"), Args);
    		}
    		else
    		{
    			return FText::Format(LOCTEXT("CallFunction_FullTitle_WithContextRPCString", "{FunctionName}\n{ContextString}\n{RPCString}"), Args);
    		}
    	}
    	else
    	{
    		return FunctionName;
    	}
    }
    
    void UK2Node_CallFunction::GetPinHoverText(const UEdGraphPin& Pin, FString& HoverTextOut) const
    {
    	if (!bPinTooltipsValid)
    	{
    		for (UEdGraphPin* P : Pins)
    		{
    			if (!P->PinToolTip.IsEmpty() && ExpandAsEnumPins.Contains(P))
    			{
    				continue;
    			}
    
    			P->PinToolTip.Reset();
    			GeneratePinTooltip(*P);
    		}
    
    		bPinTooltipsValid = true;
    	}
    
    	return UK2Node::GetPinHoverText(Pin, HoverTextOut);
    }
    
    void UK2Node_CallFunction::AllocateDefaultPins()
    {
    	InvalidatePinTooltips();
    
    	UBlueprint* MyBlueprint = GetBlueprint();
    	
    	UFunction* Function = GetTargetFunction();
    	// favor the skeleton function if possible (in case the signature has 
    	// changed, and not yet compiled).
    	if (!FunctionReference.IsSelfContext())
    	{
    		UClass* FunctionClass = FunctionReference.GetMemberParentClass(MyBlueprint->GeneratedClass);
    		if (UBlueprintGeneratedClass* BpClassOwner = Cast<UBlueprintGeneratedClass>(FunctionClass))
    		{
    			// this function could currently only be a part of some skeleton 
    			// class (the blueprint has not be compiled with it yet), so let's 
    			// check the skeleton class as well, see if we can pull pin data 
    			// from there...
    			UBlueprint* FunctionBlueprint = CastChecked<UBlueprint>(BpClassOwner->ClassGeneratedBy, ECastCheckedType::NullAllowed);
    			if (FunctionBlueprint)
    			{
    				if (UFunction* SkelFunction = FindUField<UFunction>(FunctionBlueprint->SkeletonGeneratedClass, FunctionReference.GetMemberName()))
    				{
    					Function = SkelFunction;
    				}
    			}
    		}
    	}
    
    	// First try remap table
    	if (Function == NULL)
    	{
    		UClass* ParentClass = FunctionReference.GetMemberParentClass(GetBlueprintClassFromNode());
    
    		if (ParentClass != NULL)
    		{
    			if (UFunction* NewFunction = FMemberReference::FindRemappedField<UFunction>(ParentClass, FunctionReference.GetMemberName()))
    			{
    				// Found a remapped property, update the node
    				Function = NewFunction;
    				SetFromFunction(NewFunction);
    			}
    		}
    	}
    
    	if (Function == NULL)
    	{
    		// The function no longer exists in the stored scope
    		// Try searching inside all function libraries, in case the function got refactored into one of them.
    		for (TObjectIterator<UClass> ClassIt; ClassIt; ++ClassIt)
    		{
    			UClass* TestClass = *ClassIt;
    			if (TestClass->IsChildOf(UBlueprintFunctionLibrary::StaticClass()))
    			{
    				Function = FindUField<UFunction>(TestClass, FunctionReference.GetMemberName());
    				if (Function != NULL)
    				{
    					UClass* OldClass = FunctionReference.GetMemberParentClass(GetBlueprintClassFromNode());
    					Message_Note(
    						FText::Format(LOCTEXT("FixedUpFunctionInLibraryFmt", "UK2Node_CallFunction: Fixed up function '{0}', originally in '{1}', now in library '{2}'."),
    							FText::FromString(FunctionReference.GetMemberName().ToString()),
    							(OldClass != NULL) ? FText::FromString(*OldClass->GetName()) : LOCTEXT("FixedUpFunctionInLibraryNull", "(null)"),
    							FText::FromString(TestClass->GetName())
    						).ToString()
    					);
    					SetFromFunction(Function);
    					break;
    				}
    			}
    		}
    	}
    
    	// Now create the pins if we ended up with a valid function to call
    	if (Function != NULL)
    	{
    		CreatePinsForFunctionCall(Function);
    	}
    
    	FCustomStructureParamHelper::UpdateCustomStructurePins(Function, this);
    
    	Super::AllocateDefaultPins();
    }
    
    /** Util to find self pin in an array */
    UEdGraphPin* FindSelfPin(TArray<UEdGraphPin*>& Pins)
    {
    	for(int32 PinIdx=0; PinIdx<Pins.Num(); PinIdx++)
    	{
    		if(Pins[PinIdx]->PinName == UEdGraphSchema_K2::PN_Self)
    		{
    			return Pins[PinIdx];
    		}
    	}
    	return NULL;
    }
    
    void UK2Node_CallFunction::ReallocatePinsDuringReconstruction(TArray<UEdGraphPin*>& OldPins)
    {
    	// BEGIN TEMP
    	// We had a bug where the class was being messed up by copy/paste, but the self pin class was still ok. This code fixes up those cases.
    	UFunction* Function = GetTargetFunction();
    	if (Function == NULL)
    	{
    		if (UEdGraphPin* SelfPin = FindSelfPin(OldPins))
    		{
    			if (UClass* SelfPinClass = Cast<UClass>(SelfPin->PinType.PinSubCategoryObject.Get()))
    			{
    				if (UFunction* NewFunction = FindUField<UFunction>(SelfPinClass, FunctionReference.GetMemberName()))
    				{
    					SetFromFunction(NewFunction);
    				}
    			}
    		}
    	}
    	// END TEMP
    
    	Super::ReallocatePinsDuringReconstruction(OldPins);
    
    	// Connect Execute and Then pins for functions, which became pure.
    	ReconnectPureExecPins(OldPins);
    }
    
    UEdGraphPin* UK2Node_CallFunction::CreateSelfPin(const UFunction* Function)
    {
    	return FBlueprintNodeStatics::CreateSelfPin(this, Function);
    }
    
    void UK2Node_CallFunction::CreateExecPinsForFunctionCall(const UFunction* Function)
    {
    	bool bCreateSingleExecInputPin = true;
    	bool bCreateThenPin = true;
    	
    	ExpandAsEnumPins.Reset();
    
    	// If not pure, create exec pins
    	if (!bIsPureFunc)
    	{
    		// If we want enum->exec expansion, and it is not disabled, do it now
    		if(bWantsEnumToExecExpansion)
    		{
    			TArray<FName> EnumNames;
    			GetExpandEnumPinNames(Function, EnumNames);
    
    			FProperty* PreviousInput = nullptr;
    
    			for (const FName& EnumParamName : EnumNames)
    			{
    				FProperty* Prop = nullptr;
    				UEnum* Enum = nullptr;
    
    				if (FByteProperty* ByteProp = FindFProperty<FByteProperty>(Function, EnumParamName))
    				{
    					Prop = ByteProp;
    					Enum = ByteProp->Enum;
    				}
    				else if (FEnumProperty* EnumProp = FindFProperty<FEnumProperty>(Function, EnumParamName))
    				{
    					Prop = EnumProp;
    					Enum = EnumProp->GetEnum();
    				}
    				else if (FBoolProperty* BoolProp = FindFProperty<FBoolProperty>(Function, EnumParamName))
    				{
    					Prop = BoolProp;
    				}
    
    				if (Prop != nullptr)
    				{
    					const bool bIsFunctionInput = !Prop->HasAnyPropertyFlags(CPF_ReturnParm) &&
    						(!Prop->HasAnyPropertyFlags(CPF_OutParm) ||
    						Prop->HasAnyPropertyFlags(CPF_ReferenceParm));
    					const EEdGraphPinDirection Direction = bIsFunctionInput ? EGPD_Input : EGPD_Output;
    
    					if (bIsFunctionInput)
    					{
    						if (PreviousInput)
    						{
    							bHasCompilerMessage = true;
    							ErrorType = EMessageSeverity::Error;
    							ErrorMsg = FString::Printf(TEXT("Parameter '%s' is listed as an ExpandEnumAsExecs input, but %s already was one. Only one is permitted."), *EnumParamName.ToString(), *PreviousInput->GetName());
    							break;
    						}
    						PreviousInput = Prop;
    					}
    
    					if (Enum)
    					{
    						// yay, found it! Now create exec pin for each
    						int32 NumExecs = (Enum->NumEnums() - 1);
    						for (int32 ExecIdx = 0; ExecIdx < NumExecs; ExecIdx++)
    						{
    							bool const bShouldBeHidden = Enum->HasMetaData(TEXT("Hidden"), ExecIdx) || Enum->HasMetaData(TEXT("Spacer"), ExecIdx);
    							if (!bShouldBeHidden)
    							{
    								// Can't use Enum->GetNameByIndex here because it doesn't do namespace mangling
    								const FString NameStr = Enum->GetNameStringByIndex(ExecIdx);
    
    								UEdGraphPin* CreatedPin = nullptr;
    
    								// todo: really only makes sense if there are multiple outputs
    								if (bIsFunctionInput || EnumNames.Num() == 1)
    								{
    									CreatedPin = CreatePin(Direction, UEdGraphSchema_K2::PC_Exec, *NameStr);
    								}
    								else
    								{
    									CreatedPin = CreatePin(Direction, UEdGraphSchema_K2::PC_Exec, *NameStr);
    									CreatedPin->PinFriendlyName = FText::FromString(FString::Printf(TEXT("(%s) %s"), *Prop->GetDisplayNameText().ToString(), *NameStr));
    								}
    
    								ExpandAsEnumPins.Add(CreatedPin);
    
    								if (Enum->HasMetaData(TEXT("Tooltip"), ExecIdx))
    								{
    									FString EnumTooltip = Enum->GetMetaData(TEXT("Tooltip"), ExecIdx);
    
    									if (const UEdGraphSchema_K2* const K2Schema = Cast<const UEdGraphSchema_K2>(GetSchema()))
    									{
    										K2Schema->ConstructBasicPinTooltip(*CreatedPin, FText::FromString(EnumTooltip), CreatedPin->PinToolTip);
    									}
    									else
    									{
    										CreatedPin->PinToolTip = EnumTooltip;
    									}
    								}
    							}
    						}
    					}
    					else
    					{
    						check(Prop->IsA<FBoolProperty>());
    						// Create a pin for true and false, note that the order here does not match the
    						// numeric order of bool, but it is more natural to put true first (e.g. to match branch node):
    						ExpandAsEnumPins.Add(CreatePin(Direction, UEdGraphSchema_K2::PC_Exec, TEXT("True")));
    						ExpandAsEnumPins.Add(CreatePin(Direction, UEdGraphSchema_K2::PC_Exec, TEXT("False")));
    					}
    
    					if (bIsFunctionInput)
    					{
    						// If using ExpandEnumAsExec for input, don't want to add a input exec pin
    						bCreateSingleExecInputPin = false;
    					}
    					else
    					{
    						// If using ExpandEnumAsExec for output, don't want to add a "then" pin
    						bCreateThenPin = false;
    					}
    				}
    			}
    		}
    		
    		if (bCreateSingleExecInputPin)
    		{
    			// Single input exec pin
    			CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Execute);
    		}
    
    		if (bCreateThenPin)
    		{
    			UEdGraphPin* OutputExecPin = CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Then);
    			// Use 'completed' name for output pins on latent functions
    			if (Function->HasMetaData(FBlueprintMetadata::MD_Latent))
    			{
    				OutputExecPin->PinFriendlyName = FText::FromName(UEdGraphSchema_K2::PN_Completed);
    			}
    		}
    	}
    }
    
    FName UK2Node_CallFunction::GetFunctionName() const
    {
    	return FunctionReference.GetMemberName();
    }
    
    void UK2Node_CallFunction::DetermineWantsEnumToExecExpansion(const UFunction* Function)
    {
    	bWantsEnumToExecExpansion = false;
    
    	if (WantsExecPinsForParams(Function))
    	{
    		TArray<FName> EnumNamesToCheck;
    		GetExpandEnumPinNames(Function, EnumNamesToCheck);
    
    		for (int32 i = EnumNamesToCheck.Num() - 1; i >= 0; --i)
    		{
    			const FName& EnumParamName = EnumNamesToCheck[i];
    
    			FByteProperty* EnumProp = FindFProperty<FByteProperty>(Function, EnumParamName);
    			if ((EnumProp != NULL && EnumProp->Enum != NULL) || FindFProperty<FEnumProperty>(Function, EnumParamName))
    			{
    				bWantsEnumToExecExpansion = true;
    				EnumNamesToCheck.RemoveAt(i);
    			}
    			else
    			{
    				FBoolProperty* BoolProp = FindFProperty<FBoolProperty>(Function, EnumParamName);
    				if (BoolProp)
    				{
    					bWantsEnumToExecExpansion = true;
    					EnumNamesToCheck.RemoveAt(i);
    				}
    			}
    		}
    		
    		if (bWantsEnumToExecExpansion && EnumNamesToCheck.Num() > 0 && !bHasCompilerMessage)
    		{
    			bHasCompilerMessage = true;
    			ErrorType = EMessageSeverity::Warning;
    
    			if (EnumNamesToCheck.Num() == 1)
    			{
    				ErrorMsg = FText::Format(LOCTEXT("EnumToExecExpansionFailedFmt", "Unable to find enum parameter with name '{0}' to expand for @@"), FText::FromName(EnumNamesToCheck[0])).ToString();
    			}
    			else
    			{
    				FString ParamNames;
    
    				for (const FName& Name : EnumNamesToCheck)
    				{
    					if (!ParamNames.IsEmpty())
    					{
    						ParamNames += TEXT(", ");
    					}
    
    					ParamNames += Name.ToString();
    				}
    
    				ErrorMsg = FText::Format(LOCTEXT("EnumToExecExpansionFailedMultipleFmt", "Unable to find enum parameters for names:\n '{{0}}' \nto expand for @@"), FText::FromString(ParamNames)).ToString();
    			}
    		}
    	}
    }
    
    void UK2Node_CallFunction::GetExpandEnumPinNames(const UFunction* Function, TArray<FName>& EnumNamesToCheck)
    { 
    	EnumNamesToCheck.Reset();
    
    	// todo: use metadatacache if/when that's accepted.
    	const FString EnumParamString = GetAllExecParams(Function);
    
    	TArray<FString> RawGroupings;
    	EnumParamString.ParseIntoArray(RawGroupings, TEXT(","), false);
    	for (FString& RawGroup : RawGroupings)
    	{
    		RawGroup.TrimStartAndEndInline();
    
    		TArray<FString> IndividualEntries;
    		RawGroup.ParseIntoArray(IndividualEntries, TEXT("|"));
    
    		for (const FString& Entry : IndividualEntries)
    		{
    			if (Entry.IsEmpty())
    			{
    				continue;
    			}
    
    			EnumNamesToCheck.Add(*Entry);
    		}
    	}
    }
    
    void UK2Node_CallFunction::GeneratePinTooltip(UEdGraphPin& Pin) const
    {
    	ensure(Pin.GetOwningNode() == this);
    
    	UEdGraphSchema const* Schema = GetSchema();
    	check(Schema != NULL);
    	UEdGraphSchema_K2 const* const K2Schema = Cast<const UEdGraphSchema_K2>(Schema);
    
    	if (K2Schema == NULL)
    	{
    		Schema->ConstructBasicPinTooltip(Pin, FText::GetEmpty(), Pin.PinToolTip);
    		return;
    	}
    	
    	// get the class function object associated with this node
    	UFunction* Function = GetTargetFunction();
    	if (Function == NULL)
    	{
    		Schema->ConstructBasicPinTooltip(Pin, FText::GetEmpty(), Pin.PinToolTip);
    		return;
    	}
    
    
    	GeneratePinTooltipFromFunction(Pin, Function);
    }
    
    bool UK2Node_CallFunction::CreatePinsForFunctionCall(const UFunction* Function)
    {
    	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
    
    	UClass* FunctionOwnerClass = Function->GetOuterUClass();
    
    	bIsInterfaceCall = FunctionOwnerClass->HasAnyClassFlags(CLASS_Interface);
    	bIsPureFunc = (Function->HasAnyFunctionFlags(FUNC_BlueprintPure) != false);
    	bIsConstFunc = (Function->HasAnyFunctionFlags(FUNC_Const) != false);
    	DetermineWantsEnumToExecExpansion(Function);
    
    	// Create input pins
    	CreateExecPinsForFunctionCall(Function);
    
    	UEdGraphPin* SelfPin = CreateSelfPin(Function);
    
    	// Renamed self pin to target
    	SelfPin->PinFriendlyName = LOCTEXT("Target", "Target");
    
    	const bool bIsProtectedFunc = Function->GetBoolMetaData(FBlueprintMetadata::MD_Protected);
    	const bool bIsStaticFunc = Function->HasAllFunctionFlags(FUNC_Static);
    
    	UEdGraph const* const Graph = GetGraph();
    	UBlueprint* BP = FBlueprintEditorUtils::FindBlueprintForGraph(Graph);
    	ensure(BP);
    	if (BP != nullptr)
    	{
    		const bool bIsFunctionCompatibleWithSelf = BP->SkeletonGeneratedClass->IsChildOf(FunctionOwnerClass);
    
    		if (bIsStaticFunc)
    		{
    			// For static methods, wire up the self to the CDO of the class if it's not us
    			if (!bIsFunctionCompatibleWithSelf)
    			{
    				UClass* AuthoritativeClass = FunctionOwnerClass->GetAuthoritativeClass();
    				SelfPin->DefaultObject = AuthoritativeClass->GetDefaultObject();
    			}
    
    			// Purity doesn't matter with a static function, we can always hide the self pin since we know how to call the method
    			SelfPin->bHidden = true;
    		}
    		else
    		{
    			if (Function->GetBoolMetaData(FBlueprintMetadata::MD_HideSelfPin))
    			{
    				SelfPin->bHidden = true;
    				SelfPin->bNotConnectable = true;
    			}
    			else
    			{
    				// Hide the self pin if the function is compatible with the blueprint class and pure (the !bIsConstFunc portion should be going away soon too hopefully)
    				SelfPin->bHidden = (bIsFunctionCompatibleWithSelf && bIsPureFunc && !bIsConstFunc);
    			}
    		}
    	}
    
    	// Build a list of the pins that should be hidden for this function (ones that are automagically filled in by the K2 compiler)
    	TSet<FName> PinsToHide;
    	TSet<FName> InternalPins;
    	FBlueprintEditorUtils::GetHiddenPinsForFunction(Graph, Function, PinsToHide, &InternalPins);
    
    	const bool bShowWorldContextPin = ((PinsToHide.Num() > 0) && BP && BP->ParentClass && BP->ParentClass->HasMetaDataHierarchical(FBlueprintMetadata::MD_ShowWorldContextPin));
    
    	// Create the inputs and outputs
    	bool bAllPinsGood = true;
    	for (TFieldIterator<FProperty> PropIt(Function); PropIt && (PropIt->PropertyFlags & CPF_Parm); ++PropIt)
    	{
    		FProperty* Param = *PropIt;
    		const bool bIsFunctionInput = !Param->HasAnyPropertyFlags(CPF_ReturnParm) && (!Param->HasAnyPropertyFlags(CPF_OutParm) || Param->HasAnyPropertyFlags(CPF_ReferenceParm));
    		const bool bIsRefParam = Param->HasAnyPropertyFlags(CPF_ReferenceParm) && bIsFunctionInput;
    
    		const EEdGraphPinDirection Direction = bIsFunctionInput ? EGPD_Input : EGPD_Output;
    
    		UEdGraphNode::FCreatePinParams PinParams;
    		PinParams.bIsReference = bIsRefParam;
    		UEdGraphPin* Pin = CreatePin(Direction, NAME_None, Param->GetFName(), PinParams);
    		const bool bPinGood = (Pin && K2Schema->ConvertPropertyToPinType(Param, /*out*/ Pin->PinType));
    
    		if (bPinGood)
    		{
    			// Check for a display name override
    			const FString& PinDisplayName = Param->GetMetaData(FBlueprintMetadata::MD_DisplayName);
    			if (!PinDisplayName.IsEmpty())
    			{
    				Pin->PinFriendlyName = FText::FromString(PinDisplayName);
    			}
    			else if (Function->GetReturnProperty() == Param && Function->HasMetaData(FBlueprintMetadata::MD_ReturnDisplayName))
    			{
    				Pin->PinFriendlyName = Function->GetMetaDataText(FBlueprintMetadata::MD_ReturnDisplayName);
    			}
    
    			//Flag pin as read only for const reference property
    			Pin->bDefaultValueIsIgnored = Param->HasAllPropertyFlags(CPF_ConstParm | CPF_ReferenceParm) && (!Function->HasMetaData(FBlueprintMetadata::MD_AutoCreateRefTerm) || Pin->PinType.IsContainer());
    
    			const bool bAdvancedPin = Param->HasAllPropertyFlags(CPF_AdvancedDisplay);
    			Pin->bAdvancedView = bAdvancedPin;
    			if(bAdvancedPin && (ENodeAdvancedPins::NoPins == AdvancedPinDisplay))
    			{
    				AdvancedPinDisplay = ENodeAdvancedPins::Hidden;
    			}
    
    			FString ParamValue;
    			if (K2Schema->FindFunctionParameterDefaultValue(Function, Param, ParamValue))
    			{
    				K2Schema->SetPinAutogeneratedDefaultValue(Pin, ParamValue);
    			}
    			else
    			{
    				K2Schema->SetPinAutogeneratedDefaultValueBasedOnType(Pin);
    			}
    			
    			if (PinsToHide.Contains(Pin->PinName))
    			{
    				const FString PinNameStr = Pin->PinName.ToString();
    				const FString& DefaultToSelfMetaValue = Function->GetMetaData(FBlueprintMetadata::MD_DefaultToSelf);
    				const FString& WorldContextMetaValue  = Function->GetMetaData(FBlueprintMetadata::MD_WorldContext);
    				bool bIsSelfPin = ((PinNameStr == DefaultToSelfMetaValue) || (PinNameStr == WorldContextMetaValue));
    
    				if (!bShowWorldContextPin || !bIsSelfPin)
    				{
    					Pin->bHidden = true;
    					Pin->bNotConnectable = InternalPins.Contains(Pin->PinName);
    				}
    			}
    
    			PostParameterPinCreated(Pin);
    		}
    
    		bAllPinsGood = bAllPinsGood && bPinGood;
    	}
    
    	// If we have 'enum to exec' parameters, set their default value to something valid so we don't get warnings
    	if(bWantsEnumToExecExpansion)
    	{
    		TArray<FName> EnumNamesToCheck;
    		GetExpandEnumPinNames(Function, EnumNamesToCheck);
    
    		for (const FName& Name : EnumNamesToCheck)
    		{
    			UEdGraphPin* EnumParamPin = FindPin(Name);
    			if (UEnum* PinEnum = (EnumParamPin ? Cast<UEnum>(EnumParamPin->PinType.PinSubCategoryObject.Get()) : NULL))
    			{
    				EnumParamPin->DefaultValue = PinEnum->GetNameStringByIndex(0);
    			}
    		}
    	}
    
    	return bAllPinsGood;
    }
    
    void UK2Node_CallFunction::PostReconstructNode()
    {
    	Super::PostReconstructNode();
    	InvalidatePinTooltips();
    
    	// conform pins that are marked as SetParam:
    	ConformContainerPins();
    
    	FCustomStructureParamHelper::UpdateCustomStructurePins(GetTargetFunction(), this);
    
    	// Fixup self node, may have been overridden from old self node
    	UFunction* Function = GetTargetFunction();
    	const bool bIsStaticFunc = Function ? Function->HasAllFunctionFlags(FUNC_Static) : false;
    
    	UEdGraphPin* SelfPin = FindPin(UEdGraphSchema_K2::PN_Self);
    	if (bIsStaticFunc && SelfPin)
    	{
    		// Wire up the self to the CDO of the class if it's not us
    		if (UBlueprint* BP = GetBlueprint())
    		{
    			UClass* FunctionOwnerClass = Function->GetOuterUClass();
    			if (!BP->SkeletonGeneratedClass->IsChildOf(FunctionOwnerClass))
    			{
    				SelfPin->DefaultObject = FunctionOwnerClass->GetAuthoritativeClass()->GetDefaultObject();
    			}
    			else
    			{
    				// In case a non-NULL reference was previously serialized on load, ensure that it's set to NULL here to match what a new node's self pin would be initialized as (see CreatePinsForFunctionCall).
    				SelfPin->DefaultObject = nullptr;
    			}
    		}
    	}
    
    	if (UEdGraphPin* TypePickerPin = FDynamicOutputHelper::GetTypePickerPin(this))
    	{
    		FDynamicOutputHelper(TypePickerPin).ConformOutputType();
    	}
    
    	if (IsNodePure())
    	{
    		// Remove any pre-existing breakpoint on this node since pure nodes cannot have breakpoints
    		if (UBreakpoint* ExistingBreakpoint = FKismetDebugUtilities::FindBreakpointForNode(GetBlueprint(), this))
    		{
    			// Remove the breakpoint
    			FKismetDebugUtilities::StartDeletingBreakpoint(ExistingBreakpoint, GetBlueprint());
    		}
    	}
    }
    
    void UK2Node_CallFunction::NotifyPinConnectionListChanged(UEdGraphPin* Pin)
    {
    	Super::NotifyPinConnectionListChanged(Pin);
    
    	// conform pins that are marked as SetParam:
    	ConformContainerPins();
    
    	if (!ensure(Pin))
    	{
    		return;
    	}
    
    	FCustomStructureParamHelper::UpdateCustomStructurePins(GetTargetFunction(), this, Pin);
    
    	// Refresh the node to hide internal-only pins once the [invalid] connection has been broken
    	if (Pin->bHidden && Pin->bNotConnectable && Pin->LinkedTo.Num() == 0)
    	{
    		GetGraph()->NotifyGraphChanged();
    	}
    
    	if (bIsBeadFunction)
    	{
    		if (Pin->LinkedTo.Num() == 0)
    		{
    			// Commit suicide; bead functions must always have an input and output connection
    			DestroyNode();
    		}
    	}
    
    	InvalidatePinTooltips();
    	if(!Pin->IsPendingKill())
    	{
    		FDynamicOutputHelper(Pin).ConformOutputType();
    	}
    }
    
    void UK2Node_CallFunction::PinDefaultValueChanged(UEdGraphPin* Pin)
    {
    	Super::PinDefaultValueChanged(Pin);
    	InvalidatePinTooltips();
    	FDynamicOutputHelper(Pin).ConformOutputType();
    }
    
    UFunction* UK2Node_CallFunction::GetTargetFunction() const
    {
    	if(!FBlueprintCompilationManager::IsGeneratedClassLayoutReady())
    	{
    		// first look in the skeleton class:
    		if(UFunction* SkeletonFn = GetTargetFunctionFromSkeletonClass())
    		{
    			return SkeletonFn;
    		}
    	}
    
    	UFunction* Function = FunctionReference.ResolveMember<UFunction>(GetBlueprintClassFromNode());
    	return Function;
    }
    
    UFunction* UK2Node_CallFunction::GetTargetFunctionFromSkeletonClass() const
    {
    	UFunction* TargetFunction = nullptr;
    	UClass* ParentClass = FunctionReference.GetMemberParentClass( GetBlueprintClassFromNode() );
    	UBlueprint* OwningBP = ParentClass ? Cast<UBlueprint>( ParentClass->ClassGeneratedBy ) : nullptr;
    	if( UClass* SkeletonClass = OwningBP ? OwningBP->SkeletonGeneratedClass : nullptr )
    	{
    		TargetFunction = SkeletonClass->FindFunctionByName( FunctionReference.GetMemberName() );
    	}
    	return TargetFunction;
    }
    
    UEdGraphPin* UK2Node_CallFunction::GetThenPin() const
    {
    	UEdGraphPin* Pin = FindPin(UEdGraphSchema_K2::PN_Then);
    	check(Pin == nullptr || Pin->Direction == EGPD_Output); // If pin exists, it must be output
    	return Pin;
    }
    
    UEdGraphPin* UK2Node_CallFunction::GetReturnValuePin() const
    {
    	UEdGraphPin* Pin = FindPin(UEdGraphSchema_K2::PN_ReturnValue);
    	check(Pin == nullptr || Pin->Direction == EGPD_Output); // If pin exists, it must be output
    	return Pin;
    }
    
    bool UK2Node_CallFunction::IsLatentFunction() const
    {
    	if (UFunction* Function = GetTargetFunction())
    	{
    		if (Function->HasMetaData(FBlueprintMetadata::MD_Latent))
    		{
    			return true;
    		}
    	}
    
    	return false;
    }
    
    bool UK2Node_CallFunction::AllowMultipleSelfs(bool bInputAsArray) const
    {
    	if (UFunction* Function = GetTargetFunction())
    	{
    		return CanFunctionSupportMultipleTargets(Function);
    	}
    
    	return Super::AllowMultipleSelfs(bInputAsArray);
    }
    
    bool UK2Node_CallFunction::CanFunctionSupportMultipleTargets(UFunction const* Function)
    {
    	bool const bIsImpure = !Function->HasAnyFunctionFlags(FUNC_BlueprintPure);
    	bool const bIsLatent = Function->HasMetaData(FBlueprintMetadata::MD_Latent);
    	bool const bHasReturnParam = (Function->GetReturnProperty() != nullptr);
    
    	return !bHasReturnParam && bIsImpure && !bIsLatent;
    }
    
    bool UK2Node_CallFunction::CanPasteHere(const UEdGraph* TargetGraph) const
    {
    	// Basic check for graph compatibility, etc.
    	bool bCanPaste = Super::CanPasteHere(TargetGraph);
    
    	// We check function context for placability only in the base class case; derived classes are typically bound to
    	// specific functions that should always be placeable, but may not always be explicitly callable (e.g. InternalUseOnly).
    	if(bCanPaste && GetClass() == StaticClass())
    	{
    		const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
    		uint32 AllowedFunctionTypes = UEdGraphSchema_K2::EFunctionType::FT_Pure | UEdGraphSchema_K2::EFunctionType::FT_Const | UEdGraphSchema_K2::EFunctionType::FT_Protected;
    		if(K2Schema->DoesGraphSupportImpureFunctions(TargetGraph))
    		{
    			AllowedFunctionTypes |= UEdGraphSchema_K2::EFunctionType::FT_Imperative;
    		}
    		UFunction* TargetFunction = GetTargetFunction();
    		if( !TargetFunction )
    		{
    			TargetFunction = GetTargetFunctionFromSkeletonClass();
    		}
    		if (!TargetFunction)
    		{
    			// If the function doesn't exist and it is from self context, then it could be created from a CustomEvent node, that was also pasted (but wasn't compiled yet).
    			bCanPaste = FunctionReference.IsSelfContext();
    		}
    		else
    		{
    			bCanPaste = K2Schema->CanFunctionBeUsedInGraph(FBlueprintEditorUtils::FindBlueprintForGraphChecked(TargetGraph)->GeneratedClass, TargetFunction, TargetGraph, AllowedFunctionTypes, false);
    		}
    	}
    	
    	return bCanPaste;
    }
    
    bool UK2Node_CallFunction::IsActionFilteredOut(FBlueprintActionFilter const& Filter)
    {
    	bool bIsFilteredOut = false;
    	for(UEdGraph* TargetGraph : Filter.Context.Graphs)
    	{
    		bIsFilteredOut |= !CanPasteHere(TargetGraph);
    	}
    
    	if(const UFunction* TargetFunction = GetTargetFunction())
    	{
    		const bool bIsProtected = (TargetFunction->FunctionFlags & FUNC_Protected) != 0;
    		const bool bIsPrivate = (TargetFunction->FunctionFlags & FUNC_Private) != 0;
    		const UClass* OwningClass = TargetFunction->GetOwnerClass();
    		if( (bIsProtected || bIsPrivate) && !FBlueprintEditorUtils::IsNativeSignature(TargetFunction) && OwningClass)
    		{
    			OwningClass = OwningClass->GetAuthoritativeClass();
    			// we can filter private and protected blueprints that are unrelated:
    			bool bAccessibleInAll = true;
    			for (const UBlueprint* Blueprint : Filter.Context.Blueprints)
    			{
    				UClass* AuthoritativeClass = Blueprint->GeneratedClass;
    				if(!AuthoritativeClass)
    				{
    					continue;
    				}
    
    				if(bIsPrivate)
    				{
    					bAccessibleInAll = bAccessibleInAll && AuthoritativeClass == OwningClass;
    				}
    				else if(bIsProtected)
    				{
    					bAccessibleInAll = bAccessibleInAll && AuthoritativeClass->IsChildOf(OwningClass);
    				}
    			}
    
    			if(!bAccessibleInAll)
    			{
    				bIsFilteredOut = true;
    			}
    		}
    	}
    
    	return bIsFilteredOut;
    }
    
    static FLinearColor GetPalletteIconColor(UFunction const* Function)
    {
    	bool const bIsPure = (Function != nullptr) && Function->HasAnyFunctionFlags(FUNC_BlueprintPure);
    	if (bIsPure)
    	{
    		return GetDefault<UGraphEditorSettings>()->PureFunctionCallNodeTitleColor;
    	}
    	return GetDefault<UGraphEditorSettings>()->FunctionCallNodeTitleColor;
    }
    
    FSlateIcon UK2Node_CallFunction::GetPaletteIconForFunction(UFunction const* Function, FLinearColor& OutColor)
    {
    	static const FName NativeMakeFunc(TEXT("NativeMakeFunc"));
    	static const FName NativeBrakeFunc(TEXT("NativeBreakFunc"));
    
    	if (Function && Function->HasMetaData(NativeMakeFunc))
    	{
    		static FSlateIcon Icon("EditorStyle", "GraphEditor.MakeStruct_16x");
    		return Icon;
    	}
    	else if (Function && Function->HasMetaData(NativeBrakeFunc))
    	{
    		static FSlateIcon Icon("EditorStyle", "GraphEditor.BreakStruct_16x");
    		return Icon;
    	}
    	// Check to see if the function is calling an function that could be an event, display the event icon instead.
    	else if (Function && UEdGraphSchema_K2::FunctionCanBePlacedAsEvent(Function))
    	{
    		static FSlateIcon Icon("EditorStyle", "GraphEditor.Event_16x");
    		return Icon;
    	}
    	else
    	{
    		OutColor = GetPalletteIconColor(Function);
    
    		static FSlateIcon Icon("EditorStyle", "Kismet.AllClasses.FunctionIcon");
    		return Icon;
    	}
    }
    
    FLinearColor UK2Node_CallFunction::GetNodeTitleColor() const
    {
    	return GetPalletteIconColor(GetTargetFunction());
    }
    
    FText UK2Node_CallFunction::GetTooltipText() const
    {
    	FText Tooltip;
    
    	UFunction* Function = GetTargetFunction();
    	if (Function == nullptr)
    	{
    		return FText::Format(LOCTEXT("CallUnknownFunction", "Call unknown function {0}"), FText::FromName(FunctionReference.GetMemberName()));
    	}
    	else if (CachedTooltip.IsOutOfDate(this))
    	{
    		FText BaseTooltip = FText::FromString(GetDefaultTooltipForFunction(Function));
    
    		FFormatNamedArguments Args;
    		Args.Add(TEXT("DefaultTooltip"), BaseTooltip);
    
    		if (Function->HasAllFunctionFlags(FUNC_BlueprintAuthorityOnly))
    		{
    			Args.Add(
    				TEXT("ClientString"),
    				NSLOCTEXT("K2Node", "ServerFunction", "Authority Only. This function will only execute on the server.")
    			);
    			// FText::Format() is slow, so we cache this to save on performance
    			CachedTooltip.SetCachedText(FText::Format(LOCTEXT("CallFunction_SubtitledTooltip", "{DefaultTooltip}\n\n{ClientString}"), Args), this);
    		}
    		else if (Function->HasAllFunctionFlags(FUNC_BlueprintCosmetic))
    		{
    			Args.Add(
    				TEXT("ClientString"),
    				NSLOCTEXT("K2Node", "ClientFunction", "Cosmetic. This event is only for cosmetic, non-gameplay actions.")
    			);
    			// FText::Format() is slow, so we cache this to save on performance
    			CachedTooltip.SetCachedText(FText::Format(LOCTEXT("CallFunction_SubtitledTooltip", "{DefaultTooltip}\n\n{ClientString}"), Args), this);
    		} 
    		else
    		{
    			CachedTooltip.SetCachedText(BaseTooltip, this);
    		}
    	}
    	return CachedTooltip;
    }
    
    void UK2Node_CallFunction::GeneratePinTooltipFromFunction(UEdGraphPin& Pin, const UFunction* Function)
    {
    	if (Pin.bWasTrashed)
    	{
    		return;
    	}
    
    	// figure what tag we should be parsing for (is this a return-val pin, or a parameter?)
    	FString ParamName;
    	FString TagStr = TEXT("@param");
    	const bool bReturnPin = Pin.PinName == UEdGraphSchema_K2::PN_ReturnValue;
    	if (bReturnPin)
    	{
    		TagStr = TEXT("@return");
    	}
    	else
    	{
    		ParamName = Pin.PinName.ToString();
    	}
    
    	// grab the the function's comment block for us to parse
    	FString FunctionToolTipText = Function->GetToolTipText().ToString();
    	
    	int32 CurStrPos = INDEX_NONE;
    	int32 FullToolTipLen = FunctionToolTipText.Len();
    	// parse the full function tooltip text, looking for tag lines
    	do 
    	{
    		CurStrPos = FunctionToolTipText.Find(TagStr, ESearchCase::IgnoreCase, ESearchDir::FromStart, CurStrPos);
    		if (CurStrPos == INDEX_NONE) // if the tag wasn't found
    		{
    			break;
    		}
    
    		// advance past the tag
    		CurStrPos += TagStr.Len();
    
    		// handle people having done @returns instead of @return
    		if (bReturnPin && CurStrPos < FullToolTipLen && FunctionToolTipText[CurStrPos] == TEXT('s'))
    		{
    			++CurStrPos;
    		}
    
    		// advance past whitespace
    		while(CurStrPos < FullToolTipLen && FChar::IsWhitespace(FunctionToolTipText[CurStrPos]))
    		{
    			++CurStrPos;
    		}
    
    		// if this is a parameter pin
    		if (!ParamName.IsEmpty())
    		{
    			FString TagParamName;
    
    			// copy the parameter name
    			while (CurStrPos < FullToolTipLen && !FChar::IsWhitespace(FunctionToolTipText[CurStrPos]))
    			{
    				TagParamName.AppendChar(FunctionToolTipText[CurStrPos++]);
    			}
    
    			// if this @param tag doesn't match the param we're looking for
    			if (TagParamName != ParamName)
    			{
    				continue;
    			}
    		}
    
    		// advance past whitespace (get to the meat of the comment)
    		// since many doxygen style @param use the format "@param  - " we also strip - if it is before we get to any other non-whitespace
    		while(CurStrPos < FullToolTipLen && (FChar::IsWhitespace(FunctionToolTipText[CurStrPos]) || FunctionToolTipText[CurStrPos] == '-'))
    		{
    			++CurStrPos;
    		}
    
    
    		FString ParamDesc;
    		// collect the param/return-val description
    		while (CurStrPos < FullToolTipLen && FunctionToolTipText[CurStrPos] != TEXT('@'))
    		{
    			// advance past newline
    			while(CurStrPos < FullToolTipLen && FChar::IsLinebreak(FunctionToolTipText[CurStrPos]))
    			{
    				++CurStrPos;
    
    				// advance past whitespace at the start of a new line
    				while(CurStrPos < FullToolTipLen && FChar::IsWhitespace(FunctionToolTipText[CurStrPos]))
    				{
    					++CurStrPos;
    				}
    
    				// replace the newline with a single space
    				if(CurStrPos < FullToolTipLen && !FChar::IsLinebreak(FunctionToolTipText[CurStrPos]))
    				{
    					ParamDesc.AppendChar(TEXT(' '));
    				}
    			}
    
    			if (CurStrPos < FullToolTipLen && FunctionToolTipText[CurStrPos] != TEXT('@'))
    			{
    				ParamDesc.AppendChar(FunctionToolTipText[CurStrPos++]);
    			}
    		}
    
    		// trim any trailing whitespace from the descriptive text
    		ParamDesc.TrimEndInline();
    
    		// if we came up with a valid description for the param/return-val
    		if (!ParamDesc.IsEmpty())
    		{
    			Pin.PinToolTip += ParamDesc;
    			break; // we found a match, so there's no need to continue
    		}
    
    	} while (CurStrPos < FullToolTipLen);
    
    	// If we have no parameter or return value descriptions the full description will be relevant in describing the return value:
    	if( bReturnPin && 
    		Pin.PinToolTip.IsEmpty() && 
    		FunctionToolTipText.Find(TEXT("@param")) == INDEX_NONE && 
    		FunctionToolTipText.Find(TEXT("@return")) == INDEX_NONE)
    	{
    		// for the return pin, default to using the function description if no @return tag was provided:
    		Pin.PinToolTip = Function->GetToolTipText().ToString();
    	}
    
    	GetDefault<UEdGraphSchema_K2>()->ConstructBasicPinTooltip(Pin, FText::FromString(Pin.PinToolTip), Pin.PinToolTip);
    }
    
    FText UK2Node_CallFunction::GetUserFacingFunctionName(const UFunction* Function)
    {
    	FText ReturnDisplayName;
    
    	if (Function != NULL)
    	{
    		if (GEditor && GetDefault<UEditorStyleSettings>()->bShowFriendlyNames)
    		{
    			ReturnDisplayName = Function->GetDisplayNameText();
    		}
    		else
    		{
    			static const FString Namespace = TEXT("UObjectDisplayNames");
    			const FString Key = Function->GetFullGroupName(false);
    
    			ReturnDisplayName = Function->GetMetaDataText(TEXT("DisplayName"), Namespace, Key);
    		}
    	}
    	return ReturnDisplayName;
    }
    
    FString UK2Node_CallFunction::GetDefaultTooltipForFunction(const UFunction* Function)
    {
    	FString Tooltip;
    
    	if (Function != NULL)
    	{
    		Tooltip = Function->GetToolTipText().ToString();
    	}
    
    	if (!Tooltip.IsEmpty())
    	{
    		// Strip off the doxygen nastiness
    		static const FString DoxygenParam(TEXT("@param"));
    		static const FString DoxygenReturn(TEXT("@return"));
    		static const FString DoxygenSee(TEXT("@see"));
    		static const FString TooltipSee(TEXT("See:"));
    		static const FString DoxygenNote(TEXT("@note"));
    		static const FString TooltipNote(TEXT("Note:"));
    
    		Tooltip.Split(DoxygenParam, &Tooltip, nullptr, ESearchCase::IgnoreCase, ESearchDir::FromStart);
    		Tooltip.Split(DoxygenReturn, &Tooltip, nullptr, ESearchCase::IgnoreCase, ESearchDir::FromStart);
    
    		Tooltip.ReplaceInline(*DoxygenSee, *TooltipSee);
    		Tooltip.ReplaceInline(*DoxygenNote, *TooltipNote);
    
    		Tooltip.TrimStartAndEndInline();
    
    		UClass* CurrentSelfClass = (Function != NULL) ? Function->GetOwnerClass() : NULL;
    		UClass const* TrueSelfClass = CurrentSelfClass;
    		if (CurrentSelfClass && CurrentSelfClass->ClassGeneratedBy)
    		{
    			TrueSelfClass = CurrentSelfClass->GetAuthoritativeClass();
    		}
    
    		FText TargetDisplayText = (TrueSelfClass != NULL) ? TrueSelfClass->GetDisplayNameText() : LOCTEXT("None", "None");
    
    		FFormatNamedArguments Args;
    		Args.Add(TEXT("TargetName"), TargetDisplayText);
    		Args.Add(TEXT("Tooltip"), FText::FromString(Tooltip));
    		return FText::Format(LOCTEXT("CallFunction_Tooltip", "{Tooltip}\n\nTarget is {TargetName}"), Args).ToString();
    	}
    	else
    	{
    		return GetUserFacingFunctionName(Function).ToString();
    	}
    }
    
    FText UK2Node_CallFunction::GetDefaultCategoryForFunction(const UFunction* Function, const FText& BaseCategory)
    {
    	FText NodeCategory = BaseCategory;
    	if( Function->HasMetaData(FBlueprintMetadata::MD_FunctionCategory) )
    	{
    		FText FuncCategory;
    		// If we are not showing friendly names, return the metadata stored, without localization
    		if( GEditor && !GetDefault<UEditorStyleSettings>()->bShowFriendlyNames )
    		{
    			FuncCategory = FText::FromString(Function->GetMetaData(FBlueprintMetadata::MD_FunctionCategory));
    		}
    		else
    		{
    			// Look for localized metadata
    			FuncCategory = FObjectEditorUtils::GetCategoryText(Function);
    
    			// If the result is culture invariant, force it into a display string
    			if (FuncCategory.IsCultureInvariant())
    			{
    				FuncCategory = FText::FromString(FName::NameToDisplayString(FuncCategory.ToString(), false));
    			}
    		}
    
    		// Combine with the BaseCategory to form the full category, delimited by "|"
    		if (!FuncCategory.IsEmpty() && !NodeCategory.IsEmpty())
    		{
    			NodeCategory = FText::Format(FText::FromString(TEXT("{0}|{1}")), NodeCategory, FuncCategory);
    		}
    		else if (NodeCategory.IsEmpty())
    		{
    			NodeCategory = FuncCategory;
    		}
    	}
    	return NodeCategory;
    }
    
    
    FText UK2Node_CallFunction::GetKeywordsForFunction(const UFunction* Function)
    {
    	// If the friendly name and real function name do not match add the real function name friendly name as a keyword.
    	FString Keywords;
    	if( Function->GetName() != GetUserFacingFunctionName(Function).ToString() )
    	{
    		Keywords = Function->GetName();
    	}
    
    	if (ShouldDrawCompact(Function))
    	{
    		Keywords.AppendChar(TEXT(' '));
    		Keywords += GetCompactNodeTitle(Function);
    	}
    
    	FText MetadataKeywords = Function->GetMetaDataText(FBlueprintMetadata::MD_FunctionKeywords, TEXT("UObjectKeywords"), Function->GetFullGroupName(false));
    	FText ResultKeywords;
    
    	if (!MetadataKeywords.IsEmpty())
    	{
    		FFormatNamedArguments Args;
    		Args.Add(TEXT("Name"), FText::FromString(Keywords));
    		Args.Add(TEXT("MetadataKeywords"), MetadataKeywords);
    		ResultKeywords = FText::Format(FText::FromString("{Name} {MetadataKeywords}"), Args);
    	}
    	else
    	{
    		ResultKeywords = FText::FromString(Keywords);
    	}
    
    	return ResultKeywords;
    }
    
    void UK2Node_CallFunction::SetFromFunction(const UFunction* Function)
    {
    	if (Function != NULL)
    	{
    		bIsPureFunc = Function->HasAnyFunctionFlags(FUNC_BlueprintPure);
    		bIsConstFunc = Function->HasAnyFunctionFlags(FUNC_Const);
    		DetermineWantsEnumToExecExpansion(Function);
    
    		FunctionReference.SetFromField<UFunction>(Function, GetBlueprintClassFromNode());
    	}
    }
    
    FString UK2Node_CallFunction::GetDocumentationLink() const
    {
    	UClass* ParentClass = NULL;
    	if (FunctionReference.IsSelfContext())
    	{
    		if (HasValidBlueprint())
    		{
    			UFunction* Function = FindUField<UFunction>(GetBlueprint()->GeneratedClass, FunctionReference.GetMemberName());
    			if (Function != NULL)
    			{
    				ParentClass = Function->GetOwnerClass();
    			}
    		}		
    	}
    	else 
    	{
    		ParentClass = FunctionReference.GetMemberParentClass(GetBlueprintClassFromNode());
    	}
    	
    	if (ParentClass != NULL)
    	{
    		return FString::Printf(TEXT("Shared/GraphNodes/Blueprint/%s%s"), ParentClass->GetPrefixCPP(), *ParentClass->GetName());
    	}
    
    	return FString("Shared/GraphNodes/Blueprint/UK2Node_CallFunction");
    }
    
    FString UK2Node_CallFunction::GetDocumentationExcerptName() const
    {
    	return FunctionReference.GetMemberName().ToString();
    }
    
    FString UK2Node_CallFunction::GetDescriptiveCompiledName() const
    {
    	return FString(TEXT("CallFunc_")) + FunctionReference.GetMemberName().ToString();
    }
    
    bool UK2Node_CallFunction::ShouldDrawCompact(const UFunction* Function)
    {
    	return (Function != NULL) && Function->HasMetaData(FBlueprintMetadata::MD_CompactNodeTitle);
    }
    
    bool UK2Node_CallFunction::ShouldDrawCompact() const
    {
    	UFunction* Function = GetTargetFunction();
    
    	return ShouldDrawCompact(Function);
    }
    
    bool UK2Node_CallFunction::ShouldDrawAsBead() const
    {
    	return bIsBeadFunction;
    }
    
    bool UK2Node_CallFunction::ShouldShowNodeProperties() const
    {
    	// Show node properties if this corresponds to a function graph
    	if (FunctionReference.GetMemberName() != NAME_None && HasValidBlueprint())
    	{
    		return FindObject<UEdGraph>(GetBlueprint(), *(FunctionReference.GetMemberName().ToString())) != NULL;
    	}
    	return false;
    }
    
    FString UK2Node_CallFunction::GetCompactNodeTitle(const UFunction* Function)
    {
    	static const FString ProgrammerMultiplicationSymbol = TEXT("*");
    	static const FString CommonMultiplicationSymbol = TEXT("\xD7");
    
    	static const FString ProgrammerDivisionSymbol = TEXT("/");
    	static const FString CommonDivisionSymbol = TEXT("\xF7");
    
    	static const FString ProgrammerConversionSymbol = TEXT("->");
    	static const FString CommonConversionSymbol = TEXT("\x2022");
    
    	const FString& OperatorTitle = Function->GetMetaData(FBlueprintMetadata::MD_CompactNodeTitle);
    	if (!OperatorTitle.IsEmpty())
    	{
    		if (OperatorTitle == ProgrammerMultiplicationSymbol)
    		{
    			return CommonMultiplicationSymbol;
    		}
    		else if (OperatorTitle == ProgrammerDivisionSymbol)
    		{
    			return CommonDivisionSymbol;
    		}
    		else if (OperatorTitle == ProgrammerConversionSymbol)
    		{
    			return CommonConversionSymbol;
    		}
    		else
    		{
    			return OperatorTitle;
    		}
    	}
    	
    	return Function->GetName();
    }
    
    FText UK2Node_CallFunction::GetCompactNodeTitle() const
    {
    	UFunction* Function = GetTargetFunction();
    	if (Function != NULL)
    	{
    		return FText::FromString(GetCompactNodeTitle(Function));
    	}
    	else
    	{
    		return Super::GetCompactNodeTitle();
    	}
    }
    
    void UK2Node_CallFunction::GetRedirectPinNames(const UEdGraphPin& Pin, TArray<FString>& RedirectPinNames) const
    {
    	Super::GetRedirectPinNames(Pin, RedirectPinNames);
    
    	if (RedirectPinNames.Num() > 0)
    	{
    		const FString OldPinName = RedirectPinNames[0];
    
    		// first add functionname.param
    		RedirectPinNames.Add(FString::Printf(TEXT("%s.%s"), *FunctionReference.GetMemberName().ToString(), *OldPinName));
    
    		// if there is class, also add an option for class.functionname.param
    		UClass* FunctionClass = FunctionReference.GetMemberParentClass(GetBlueprintClassFromNode());
    		while (FunctionClass)
    		{
    			RedirectPinNames.Add(FString::Printf(TEXT("%s.%s.%s"), *FunctionClass->GetName(), *FunctionReference.GetMemberName().ToString(), *OldPinName));
    			FunctionClass = FunctionClass->GetSuperClass();
    		}
    	}
    }
    
    void UK2Node_CallFunction::FixupSelfMemberContext()
    {
    	UBlueprint* Blueprint = FBlueprintEditorUtils::FindBlueprintForNode(this);
    	auto IsBlueprintOfType = [Blueprint](UClass* ClassType)->bool
    	{
    		bool bIsChildOf  = Blueprint && (Blueprint->GeneratedClass != nullptr) && Blueprint->GeneratedClass->IsChildOf(ClassType);
    		if (!bIsChildOf && Blueprint && (Blueprint->SkeletonGeneratedClass))
    		{
    			bIsChildOf = Blueprint->SkeletonGeneratedClass->IsChildOf(ClassType);
    		}
    		return bIsChildOf;
    	};
    
    	UClass* MemberClass = FunctionReference.GetMemberParentClass();
    	if (FunctionReference.IsSelfContext())
    	{
    		// if there is a function that matches the reference in the new context
    		// and there are no connections to the self pin, we just want to call
    		// that function
    		UEdGraphPin* SelfPin = GetDefault<UEdGraphSchema_K2>()->FindSelfPin(*this, EGPD_Input);
    		if (!FunctionReference.ResolveMember<UFunction>(Blueprint) || (SelfPin && SelfPin->HasAnyConnections()))
    		{
    			if (MemberClass == nullptr)
    			{
    				// the self pin may have type information stored on it
    				if (SelfPin)
    				{
    					MemberClass = Cast<UClass>(SelfPin->PinType.PinSubCategoryObject.Get());
    				}
    			}
    			// if we happened to retain the ParentClass for a self reference 
    			// (unlikely), then we know where this node came from... let's keep it
    			// referencing that function
    			if (MemberClass != nullptr)
    			{
    				if (!IsBlueprintOfType(MemberClass))
    				{
    					FunctionReference.SetExternalMember(FunctionReference.GetMemberName(), MemberClass);
    				}
    			}
    			// else, there is nothing we can do... the node will produce an error later during compilation
    		}
    	}
    	else if (MemberClass != nullptr)
    	{
    		if (IsBlueprintOfType(MemberClass))
    		{
    			FunctionReference.SetSelfMember(FunctionReference.GetMemberName());
    		}
    	}
    }
    
    void UK2Node_CallFunction::PostPasteNode()
    {
    	Super::PostPasteNode();
    	FixupSelfMemberContext();
    
    	if (UFunction* Function = GetTargetFunction())
    	{
    		if (Pins.Num() > 0)
    		{
    			// After pasting we need to go through and ensure the hidden the self pins is correct in case the source blueprint had different metadata
    			TSet<FName> PinsToHide;
    			FBlueprintEditorUtils::GetHiddenPinsForFunction(GetGraph(), Function, PinsToHide);
    
    			const bool bShowWorldContextPin = ((PinsToHide.Num() > 0) && GetBlueprint()->ParentClass->HasMetaDataHierarchical(FBlueprintMetadata::MD_ShowWorldContextPin));
    
    			const FString& DefaultToSelfMetaValue = Function->GetMetaData(FBlueprintMetadata::MD_DefaultToSelf);
    			const FString& WorldContextMetaValue = Function->GetMetaData(FBlueprintMetadata::MD_WorldContext);
    
    			const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
    			for (int32 PinIndex = 0; PinIndex < Pins.Num(); ++PinIndex)
    			{
    				UEdGraphPin* Pin = Pins[PinIndex];
    					const FString PinNameStr = Pin->PinName.ToString();
    
    					const bool bIsSelfPin = ((PinNameStr == DefaultToSelfMetaValue) || (PinNameStr == WorldContextMetaValue));
    					const bool bPinShouldBeHidden = ((Pin->SubPins.Num() > 0) || (PinsToHide.Contains(Pin->PinName) && (!bShowWorldContextPin || !bIsSelfPin)));
    
    				if (bPinShouldBeHidden && !Pin->bHidden)
    				{
    					Pin->BreakAllPinLinks();
    					K2Schema->SetPinAutogeneratedDefaultValueBasedOnType(Pin);
    				}
    				Pin->bHidden = bPinShouldBeHidden;
    			}
    		}
    	}
    }
    
    void UK2Node_CallFunction::PostDuplicate(bool bDuplicateForPIE)
    {
    	Super::PostDuplicate(bDuplicateForPIE);
    	if (!bDuplicateForPIE && (!this->HasAnyFlags(RF_Transient)))
    	{
    		FixupSelfMemberContext();
    	}
    }
    
    void UK2Node_CallFunction::ValidateNodeDuringCompilation(class FCompilerResultsLog& MessageLog) const
    {
    	Super::ValidateNodeDuringCompilation(MessageLog);
    
    	const UBlueprint* Blueprint = GetBlueprint();
    	UFunction *Function = GetTargetFunction();
    	if (Function == NULL)
    	{
    		FString OwnerName;
    
    		if (Blueprint != nullptr)
    		{
    			OwnerName = Blueprint->GetName();
    			if (UClass* FuncOwnerClass = FunctionReference.GetMemberParentClass(Blueprint->GeneratedClass))
    			{
    				OwnerName = FuncOwnerClass->GetName();
    			}
    		}
    		FString const FunctName = FunctionReference.GetMemberName().ToString();
    
    		FText const WarningFormat = LOCTEXT("FunctionNotFoundFmt", "Could not find a function named \"{0}\" in '{1}'.\nMake sure '{2}' has been compiled for @@");
    		MessageLog.Error(*FText::Format(WarningFormat, FText::FromString(FunctName), FText::FromString(OwnerName), FText::FromString(OwnerName)).ToString(), this);
    	}
    	else if (WantsExecPinsForParams(Function) && bWantsEnumToExecExpansion == false)
    	{
    		// will technically not have a properly formatted output for multiple params... but /shrug. 
    		const FString EnumParamName = GetAllExecParams(Function);
    		MessageLog.Warning(*FText::Format(LOCTEXT("EnumToExecExpansionFailedFmt", "Unable to find enum parameter with name '{0}' to expand for @@"), FText::FromString(EnumParamName)).ToString(), this);
    	}
    
    	const UClass* BlueprintClass = Blueprint ? Blueprint->ParentClass : nullptr;
    	const bool bIsEditorOnlyBlueprintBaseClass = !BlueprintClass || IsEditorOnlyObject(BlueprintClass);
    
    	// This error is disabled while we figure out how we can identify uncooked only
    	// blueprints that want to make use of uncooked only APIs:
    	#if 0
    	const bool bIsUncookedOnlyFunction = Function && Function->GetOutermost()->HasAllPackagesFlags(PKG_UncookedOnly);
    	if (	bIsUncookedOnlyFunction &&
    			// Only allow calls to uncooked only functions from editor only/uncooked only
    			// contexts:
    			!(	GetOutermost()->HasAnyPackageFlags(PKG_UncookedOnly|PKG_EditorOnly) ||
    				bIsEditorOnlyBlueprintBaseClass ))
    	{
    		MessageLog.Error(*LOCTEXT("UncookedOnlyError", "Attempting to call uncooked only function @@ in runtime blueprint").ToString(), this);
    	}
    	#endif //0
    	
    	// Ensure that editor module BP exposed UFunctions can only be called in blueprints for which the base class is also part of an editor module
    	// Also check for functions wrapped in WITH_EDITOR 
    	if (Function && Blueprint &&
    		(IsEditorOnlyObject(Function) || Function->HasAnyFunctionFlags(FUNC_EditorOnly)))
    	{	
    		if (!bIsEditorOnlyBlueprintBaseClass)
    		{
    			FString const FunctName = Function->GetName();
    			FText const WarningFormat = LOCTEXT("EditorFunctionFmt", "Cannot use the editor function \"{0}\" in this runtime Blueprint. Only for use in Editor Utility Blueprints and Blutilities.");
    			MessageLog.Error(*FText::Format(WarningFormat, FText::FromString(FunctName)).ToString(), this);
    		}
    	}
    
    	if (Function)
    	{
    		// enforce UnsafeDuringActorConstruction keyword
    		if (Function->HasMetaData(FBlueprintMetadata::MD_UnsafeForConstructionScripts))
    		{
    			// emit warning if we are in a construction script
    			UEdGraph const* const Graph = GetGraph();
    			bool bNodeIsInConstructionScript = UEdGraphSchema_K2::IsConstructionScript(Graph);
    
    			if (bNodeIsInConstructionScript == false)
    			{
    				// IsConstructionScript() can return false if graph was cloned from the construction script
    				// in that case, check the function entry
    				TArray<const UK2Node_FunctionEntry*> EntryPoints;
    				Graph->GetNodesOfClass(EntryPoints);
    
    				if (EntryPoints.Num() == 1)
    				{
    					UK2Node_FunctionEntry const* const Node = EntryPoints[0];
    					if (Node)
    					{
    						UFunction* const SignatureFunction = Node->FunctionReference.ResolveMember<UFunction>(Node->GetBlueprintClassFromNode());
    						bNodeIsInConstructionScript = SignatureFunction && (SignatureFunction->GetFName() == UEdGraphSchema_K2::FN_UserConstructionScript);
    					}
    				}
    			}
    
    			if ( bNodeIsInConstructionScript )
    			{
    				MessageLog.Warning(*LOCTEXT("FunctionUnsafeDuringConstruction", "Function '@@' is unsafe to call in a construction script.").ToString(), this);
    			}
    		}
    
    		// enforce WorldContext restrictions
    		const bool bInsideBpFuncLibrary = Blueprint && (BPTYPE_FunctionLibrary == Blueprint->BlueprintType);
    		if (!bInsideBpFuncLibrary && 
    			Function->HasMetaData(FBlueprintMetadata::MD_WorldContext) && 
    			!Function->HasMetaData(FBlueprintMetadata::MD_CallableWithoutWorldContext))
    		{
    			check(Blueprint);
    			UClass* ParentClass = Blueprint->ParentClass;
    			check(ParentClass);
    			if (ParentClass && !FBlueprintEditorUtils::ImplementsGetWorld(Blueprint) && !ParentClass->HasMetaDataHierarchical(FBlueprintMetadata::MD_ShowWorldContextPin))
    			{
    				MessageLog.Warning(*LOCTEXT("FunctionUnsafeInContext", "Function '@@' is unsafe to call from blueprints of class '@@'.").ToString(), this, ParentClass);
    			}
    		}
    
    		if(Blueprint && !FBlueprintEditorUtils::IsNativeSignature(Function))
    		{
    			// enforce protected function restriction
    			const bool bCanTreatAsError = Blueprint->GetLinkerCustomVersion(FFrameworkObjectVersion::GUID) >= FFrameworkObjectVersion::EnforceBlueprintFunctionVisibility;
    
    			const bool bIsProtected = (Function->FunctionFlags & FUNC_Protected) != 0;
    			const bool bFuncBelongsToSubClass = Blueprint->SkeletonGeneratedClass->IsChildOf(Function->GetOuterUClass());
    			if (bIsProtected && !bFuncBelongsToSubClass)
    			{
    				if(bCanTreatAsError)
    				{
    					MessageLog.Error(*LOCTEXT("FunctionProtectedAccessed", "Function '@@' is protected and can't be accessed outside of its hierarchy.").ToString(), this);
    				}
    				else
    				{
    					MessageLog.Note(*LOCTEXT("FunctionProtectedAccessedNote", "Function '@@' is protected and can't be accessed outside of its hierarchy - this will be an error if the asset is resaved.").ToString(), this);
    				}
    			}
    
    			// enforce private function restriction
    			const bool bIsPrivate = (Function->FunctionFlags & FUNC_Private) != 0;
    			const bool bFuncBelongsToClass = bFuncBelongsToSubClass && (Blueprint->SkeletonGeneratedClass == Function->GetOuterUClass());
    			if (bIsPrivate && !bFuncBelongsToClass)
    			{
    				if(bCanTreatAsError)
    				{
    					MessageLog.Error(*LOCTEXT("FunctionPrivateAccessed", "Function '@@' is private and can't be accessed outside of its defined class '@@'.").ToString(), this, Function->GetOuterUClass());
    				}
    				else
    				{
    					MessageLog.Note(*LOCTEXT("FunctionPrivateAccessedNote", "Function '@@' is private and can't be accessed outside of its defined class '@@' - this will be an error if the asset is resaved.").ToString(), this, Function->GetOuterUClass());
    				}
    			}
    		}
    	}
    
    	FDynamicOutputHelper::VerifyNode(this, MessageLog);
    
    	for (UEdGraphPin* Pin : Pins)
    	{
    		if (Pin && Pin->PinType.bIsWeakPointer && !Pin->PinType.IsContainer())
    		{
    			const FString ErrorString = FText::Format(
    				LOCTEXT("WeakPtrNotSupportedErrorFmt", "Weak pointers are not supported as function parameters. Pin '{0}' @@"),
    				FText::FromString(Pin->GetName())
    			).ToString();
    			MessageLog.Error(*ErrorString, this);
    		}
    	}
    }
    
    void UK2Node_CallFunction::Serialize(FArchive& Ar)
    {
    	Super::Serialize(Ar);
    
    	Ar.UsingCustomVersion(FReleaseObjectVersion::GUID);
    
    	if (Ar.IsLoading())
    	{
    		if (Ar.UE4Ver() < VER_UE4_SWITCH_CALL_NODE_TO_USE_MEMBER_REFERENCE)
    		{
    			UFunction* Function = FindUField<UFunction>(CallFunctionClass_DEPRECATED, CallFunctionName_DEPRECATED);
    			const bool bProbablySelfCall = (CallFunctionClass_DEPRECATED == NULL) || ((Function != NULL) && (Function->GetOuterUClass()->ClassGeneratedBy == GetBlueprint()));
    
    			FunctionReference.SetDirect(CallFunctionName_DEPRECATED, FGuid(), CallFunctionClass_DEPRECATED, bProbablySelfCall);
    		}
    
    		if(Ar.UE4Ver() < VER_UE4_K2NODE_REFERENCEGUIDS)
    		{
    			FGuid FunctionGuid;
    
    			if (UBlueprint::GetGuidFromClassByFieldName<UFunction>(GetBlueprint()->GeneratedClass, FunctionReference.GetMemberName(), FunctionGuid))
    			{
    				const bool bSelf = FunctionReference.IsSelfContext();
    				FunctionReference.SetDirect(FunctionReference.GetMemberName(), FunctionGuid, (bSelf ? NULL : FunctionReference.GetMemberParentClass((UClass*)NULL)), bSelf);
    			}
    		}
    
    		// Consider the 'CPF_UObjectWrapper' flag on native function call parameters and return values.
    		if (Ar.CustomVer(FReleaseObjectVersion::GUID) < FReleaseObjectVersion::PinTypeIncludesUObjectWrapperFlag)
    		{
    			if (UFunction* TargetFunction = GetTargetFunction())
    			{
    				if (TargetFunction->IsNative())
    				{
    					for (TFieldIterator<FProperty> PropIt(TargetFunction); PropIt && (PropIt->PropertyFlags & CPF_Parm); ++PropIt)
    					{
    						if (UEdGraphPin* Pin = FindPin(PropIt->GetFName()))
    						{
    							if (const FMapProperty* MapProperty = CastField<FMapProperty>(*PropIt))
    							{
    								if (MapProperty->KeyProp && MapProperty->KeyProp->HasAllPropertyFlags(CPF_UObjectWrapper))
    								{
    									Pin->PinType.bIsUObjectWrapper = 1;
    								}
    
    								if (MapProperty->ValueProp && MapProperty->ValueProp->HasAllPropertyFlags(CPF_UObjectWrapper))
    								{
    									Pin->PinType.PinValueType.bTerminalIsUObjectWrapper = true;
    								}
    							}
    							else if (const FSetProperty* SetProperty = CastField<FSetProperty>(*PropIt))
    							{
    								if (SetProperty->ElementProp && SetProperty->ElementProp->HasAllPropertyFlags(CPF_UObjectWrapper))
    								{
    									Pin->PinType.PinValueType.bTerminalIsUObjectWrapper = true;
    								}
    							}
    							else if(const FArrayProperty* ArrayProperty = CastField<FArrayProperty>(*PropIt))
    							{
    								if(ArrayProperty->Inner && ArrayProperty->Inner->HasAllPropertyFlags(CPF_UObjectWrapper))
    								{
    									Pin->PinType.PinValueType.bTerminalIsUObjectWrapper = true;
    								}
    							}
    							else if (PropIt->HasAllPropertyFlags(CPF_UObjectWrapper))
    							{
    								Pin->PinType.bIsUObjectWrapper = 1;
    							}
    						}
    					}
    				}
    			}
    		}
    
    		if (!Ar.IsObjectReferenceCollector())
    		{
    			// Don't validate the enabled state if the user has explicitly set it. Also skip validation if we're just duplicating this node.
    			const bool bIsDuplicating = (Ar.GetPortFlags() & PPF_Duplicate) != 0;
    			if (!bIsDuplicating && !HasUserSetTheEnabledState())
    			{
    				if (const UFunction* Function = GetTargetFunction())
    				{
    					// Enable as development-only if specified in metadata. This way existing functions that have the metadata added to them will get their enabled state fixed up on load.
    					if (GetDesiredEnabledState() == ENodeEnabledState::Enabled && Function->HasMetaData(FBlueprintMetadata::MD_DevelopmentOnly))
    					{
    						SetEnabledState(ENodeEnabledState::DevelopmentOnly, /*bUserAction=*/ false);
    					}
    					// Ensure that if the metadata is removed, we also fix up the enabled state to avoid leaving it set as development-only in that case.
    					else if (GetDesiredEnabledState() == ENodeEnabledState::DevelopmentOnly && !Function->HasMetaData(FBlueprintMetadata::MD_DevelopmentOnly))
    					{
    						SetEnabledState(ENodeEnabledState::Enabled, /*bUserAction=*/ false);
    					}
    				}
    			}
    		}
    	}
    }
    
    void UK2Node_CallFunction::PostPlacedNewNode()
    {
    	Super::PostPlacedNewNode();
    
    	// Try re-setting the function given our new parent scope, in case it turns an external to an internal, or vis versa
    	FunctionReference.RefreshGivenNewSelfScope<UFunction>(GetBlueprintClassFromNode());
    
    	// Set the node to development only if the function specifies that
    	check(!HasUserSetTheEnabledState());
    	if (const UFunction* Function = GetTargetFunction())
    	{
    		if (Function->HasMetaData(FBlueprintMetadata::MD_DevelopmentOnly))
    		{
    			SetEnabledState(ENodeEnabledState::DevelopmentOnly, /*bUserAction=*/ false);
    		}
    	}
    }
    
    FNodeHandlingFunctor* UK2Node_CallFunction::CreateNodeHandler(FKismetCompilerContext& CompilerContext) const
    {
    	return new FKCHandler_CallFunction(CompilerContext);
    }
    
    void UK2Node_CallFunction::ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
    {
    	Super::ExpandNode(CompilerContext, SourceGraph);
    
    	const UEdGraphSchema_K2* Schema = CompilerContext.GetSchema();
    	UFunction* Function = GetTargetFunction();
    
    	// connect DefaultToSelf and WorldContext inside static functions to proper 'self'  
    	if (SourceGraph && Schema->IsStaticFunctionGraph(SourceGraph) && Function)
    	{
    		TArray<UK2Node_FunctionEntry*> EntryPoints;
    		SourceGraph->GetNodesOfClass(EntryPoints);
    		if (1 != EntryPoints.Num())
    		{
    			CompilerContext.MessageLog.Warning(*FText::Format(LOCTEXT("WrongEntryPointsNumFmt", "{0} entry points found while expanding node @@"), EntryPoints.Num()).ToString(), this);
    		}
    		else if (UEdGraphPin* BetterSelfPin = EntryPoints[0]->GetAutoWorldContextPin())
    		{
    			const FString& DefaultToSelfMetaValue = Function->GetMetaData(FBlueprintMetadata::MD_DefaultToSelf);
    			const FString& WorldContextMetaValue = Function->GetMetaData(FBlueprintMetadata::MD_WorldContext);
    
    			struct FStructConnectHelper
    			{
    				static void Connect(const FString& PinName, UK2Node* Node, UEdGraphPin* BetterSelf, const UEdGraphSchema_K2* InSchema, FCompilerResultsLog& MessageLog)
    				{
    					UEdGraphPin* Pin = Node->FindPin(PinName);
    					if (!PinName.IsEmpty() && Pin && !Pin->LinkedTo.Num())
    					{
    						const bool bConnected = InSchema->TryCreateConnection(Pin, BetterSelf);
    						if (!bConnected)
    						{
    							MessageLog.Warning(*LOCTEXT("DefaultToSelfNotConnected", "DefaultToSelf pin @@ from node @@ cannot be connected to @@").ToString(), Pin, Node, BetterSelf);
    						}
    					}
    				}
    			};
    			FStructConnectHelper::Connect(DefaultToSelfMetaValue, this, BetterSelfPin, Schema, CompilerContext.MessageLog);
    			if (!Function->HasMetaData(FBlueprintMetadata::MD_CallableWithoutWorldContext))
    			{
    				FStructConnectHelper::Connect(WorldContextMetaValue, this, BetterSelfPin, Schema, CompilerContext.MessageLog);
    			}
    		}
    	}
    
    	// If we have an enum param that is expanded, we handle that first
    	if(bWantsEnumToExecExpansion)
    	{
    		if(Function)
    		{
    			TArray<FName> EnumNamesToCheck;
    			GetExpandEnumPinNames(Function, EnumNamesToCheck);
    
    			bool bAlreadyHandleInput = false;
    
    			UEdGraphPin* OutMainExecutePin = nullptr;
    			UK2Node_ExecutionSequence* SpawnedSequenceNode = nullptr;
    			int32 OutSequenceIndex = 0;
    
    			const auto LinkIntoOutputChain = [&OutMainExecutePin, &SpawnedSequenceNode, &OutSequenceIndex, &CompilerContext, this, SourceGraph, Schema](UK2Node* Node)
    			{
    				if (!OutMainExecutePin)
    				{
    					// Create normal exec output -- only once though.
    					OutMainExecutePin = CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Then);
    				}
    				else
    				{
    					// set up a sequence so we can call one after another.
    					if (!SpawnedSequenceNode)
    					{
    						SpawnedSequenceNode = CompilerContext.SpawnIntermediateNode<UK2Node_ExecutionSequence>(this, SourceGraph);
    						SpawnedSequenceNode->AllocateDefaultPins();
    						CompilerContext.MovePinLinksToIntermediate(*OutMainExecutePin, *SpawnedSequenceNode->GetThenPinGivenIndex(OutSequenceIndex++));
    						Schema->TryCreateConnection(OutMainExecutePin, SpawnedSequenceNode->Pins[0]);
    					}
    				}
    
    				// Hook up execution to the branch node
    				if (!SpawnedSequenceNode)
    				{
    					Schema->TryCreateConnection(OutMainExecutePin, Node->GetExecPin());
    				}
    				else
    				{
    					UEdGraphPin* SequenceOutput = SpawnedSequenceNode->GetThenPinGivenIndex(OutSequenceIndex);
    
    					if (!SequenceOutput)
    					{
    						SpawnedSequenceNode->AddInputPin();
    						SequenceOutput = SpawnedSequenceNode->GetThenPinGivenIndex(OutSequenceIndex);
    					}
    
    					Schema->TryCreateConnection(SequenceOutput, Node->GetExecPin());
    					OutSequenceIndex++;
    				}
    			};
    
    			for (const FName& EnumParamName : EnumNamesToCheck)
    			{
    				UEnum* Enum = nullptr;
    
    				if (FByteProperty* ByteProp = FindFProperty<FByteProperty>(Function, EnumParamName))
    				{
    					Enum = ByteProp->Enum;
    				}
    				else if (FEnumProperty* EnumProp = FindFProperty<FEnumProperty>(Function, EnumParamName))
    				{
    					Enum = EnumProp->GetEnum();
    				}
    
    				UEdGraphPin* EnumParamPin = FindPin(EnumParamName);
    				if (Enum && EnumParamPin)
    				{
    					// Expanded as input execs pins
    					if (EnumParamPin->Direction == EGPD_Input)
    					{
    						if (bAlreadyHandleInput)
    						{
    							CompilerContext.MessageLog.Error(TEXT("@@ Already provided an input enum parameter for ExpandEnumAsExecs. Only one is permitted."), this);
    							return;
    						}
    
    						bAlreadyHandleInput = true;
    
    						// Create normal exec input
    						UEdGraphPin* ExecutePin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Execute);
    
    						// Create temp enum variable
    						UK2Node_TemporaryVariable* TempEnumVarNode = CompilerContext.SpawnIntermediateNode<UK2Node_TemporaryVariable>(this, SourceGraph);
    						TempEnumVarNode->VariableType.PinCategory = UEdGraphSchema_K2::PC_Byte;
    						TempEnumVarNode->VariableType.PinSubCategoryObject = Enum;
    						TempEnumVarNode->AllocateDefaultPins();
    						// Get the output pin
    						UEdGraphPin* TempEnumVarOutput = TempEnumVarNode->GetVariablePin();
    
    						// Connect temp enum variable to (hidden) enum pin
    						Schema->TryCreateConnection(TempEnumVarOutput, EnumParamPin);
    
    						// Now we want to iterate over other exec inputs...
    						for (int32 PinIdx = Pins.Num() - 1; PinIdx >= 0; PinIdx--)
    						{
    							UEdGraphPin* Pin = Pins[PinIdx];
    							if (Pin != NULL &&
    								Pin != ExecutePin &&
    								Pin->Direction == EGPD_Input &&
    								Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_Exec)
    							{
    								// Create node to set the temp enum var
    								UK2Node_AssignmentStatement* AssignNode = CompilerContext.SpawnIntermediateNode<UK2Node_AssignmentStatement>(this, SourceGraph);
    								AssignNode->AllocateDefaultPins();
    
    								// Move connections from fake 'enum exec' pint to this assignment node
    								CompilerContext.MovePinLinksToIntermediate(*Pin, *AssignNode->GetExecPin());
    
    								// Connect this to out temp enum var
    								Schema->TryCreateConnection(AssignNode->GetVariablePin(), TempEnumVarOutput);
    
    								// Connect exec output to 'real' exec pin
    								Schema->TryCreateConnection(AssignNode->GetThenPin(), ExecutePin);
    
    								// set the literal enum value to set to
    								AssignNode->GetValuePin()->DefaultValue = Pin->PinName.ToString();
    
    								// Finally remove this 'cosmetic' exec pin
    								Pins[PinIdx]->MarkPendingKill();
    								Pins.RemoveAt(PinIdx);
    							}
    						}
    					}
    					// Expanded as output execs pins
    					else if (EnumParamPin->Direction == EGPD_Output)
    					{
    						// Create a SwitchEnum node to switch on the output enum
    						UK2Node_SwitchEnum* SwitchEnumNode = CompilerContext.SpawnIntermediateNode<UK2Node_SwitchEnum>(this, SourceGraph);
    						UEnum* EnumObject = Cast<UEnum>(EnumParamPin->PinType.PinSubCategoryObject.Get());
    						SwitchEnumNode->SetEnum(EnumObject);
    						SwitchEnumNode->AllocateDefaultPins();
    
    						LinkIntoOutputChain(SwitchEnumNode);
    
    						// Connect (hidden) enum pin to switch node's selection pin
    						Schema->TryCreateConnection(EnumParamPin, SwitchEnumNode->GetSelectionPin());
    
    						// Now we want to iterate over other exec outputs corresponding to the enum.
    						// the first pins created are the ExpandEnumAsExecs pins, and they're all made at the same time.
    						for (int32 PinIdx = Enum->NumEnums() - 2; PinIdx >= 0; PinIdx--)
    						{
    							UEdGraphPin* Pin = Pins[PinIdx];
    
    							if (Pin &&
    								Pin != OutMainExecutePin &&
    								Pin->Direction == EGPD_Output &&
    								Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_Exec)
    							{
    								if (UEdGraphPin* FoundPin = SwitchEnumNode->FindPin(Pin->PinName))
    								{
    									if (!FoundPin->LinkedTo.Contains(Pin))
    									{
    										// Move connections from fake 'enum exec' pin to this switch node
    										CompilerContext.MovePinLinksToIntermediate(*Pin, *FoundPin);
    
    										// Finally remove this 'cosmetic' exec pin
    										Pins[PinIdx]->MarkPendingKill();
    										Pins.RemoveAt(PinIdx);
    									}
    								}
    								// Have passed the relevant entries... no more work to do here.
    								else
    								{
    									break;
    								}
    							}
    						}
    					}
    				}
    				else if(EnumParamPin && !EnumParamPin->PinType.IsContainer() && EnumParamPin->PinType.PinCategory == UEdGraphSchema_K2::PC_Boolean)
    				{
    					if (EnumParamPin->Direction == EGPD_Input)
    					{
    						// Create normal exec input
    						UEdGraphPin* ExecutePin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Execute);
    						// Create temp bool variable
    						UK2Node_TemporaryVariable* TempBoolVarNode = CompilerContext.SpawnIntermediateNode<UK2Node_TemporaryVariable>(this, SourceGraph);
    						TempBoolVarNode->VariableType.PinCategory = UEdGraphSchema_K2::PC_Boolean;
    						TempBoolVarNode->AllocateDefaultPins();
    						// Get the output pin
    						UEdGraphPin* TempBoolVarOutput = TempBoolVarNode->GetVariablePin();
    						// Connect temp enum variable to (hidden) bool pin
    						Schema->TryCreateConnection(TempBoolVarOutput, EnumParamPin);
    						
    						// create a true entry and a false:
    						const auto CreateAssignNode = [Schema, &CompilerContext, this, SourceGraph, TempBoolVarOutput, ExecutePin](UEdGraphPin* FakePin, const TCHAR* DefaultValue)
    						{
    							UK2Node_AssignmentStatement* AssignNode = CompilerContext.SpawnIntermediateNode<UK2Node_AssignmentStatement>(this, SourceGraph);
    							AssignNode->AllocateDefaultPins();
    
    							// Move connections from fake 'enum exec' pint to this assignment node
    							CompilerContext.MovePinLinksToIntermediate(*FakePin, *AssignNode->GetExecPin());
    
    							// Connect this to out temp enum var
    							Schema->TryCreateConnection(AssignNode->GetVariablePin(), TempBoolVarOutput);
    
    							// Connect exec output to 'real' exec pin
    							Schema->TryCreateConnection(AssignNode->GetThenPin(), ExecutePin);
    
    							// set the literal enum value to set to
    							AssignNode->GetValuePin()->DefaultValue = DefaultValue;
    						};
    
    						UEdGraphPin* TruePin = FindPinChecked(TEXT("True"), EEdGraphPinDirection::EGPD_Input);
    						UEdGraphPin* FalsePin = FindPinChecked(TEXT("False"), EEdGraphPinDirection::EGPD_Input);
    
    						CreateAssignNode(TruePin, TEXT("True"));
    						CreateAssignNode(FalsePin, TEXT("False"));
    
    						// remove fake false/true nodes:
    						RemovePin(TruePin);
    						RemovePin(FalsePin);
    					}
    					else if (EnumParamPin->Direction == EGPD_Output)
    					{
    						// Create a Branch node to switch on the output bool:
    						UK2Node_IfThenElse* IfElseNode = CompilerContext.SpawnIntermediateNode<UK2Node_IfThenElse>(this, SourceGraph);
    						IfElseNode->AllocateDefaultPins();
    
    						LinkIntoOutputChain(IfElseNode);
    
    						// Connect (hidden) bool pin to branch node
    						Schema->TryCreateConnection(EnumParamPin, IfElseNode->GetConditionPin());
    
    						UEdGraphPin* TruePin = FindPinChecked(TEXT("True"), EEdGraphPinDirection::EGPD_Output);
    						UEdGraphPin* FalsePin = FindPinChecked(TEXT("False"), EEdGraphPinDirection::EGPD_Output);
    
    						// move true connection to branch node:
    						CompilerContext.MovePinLinksToIntermediate(*TruePin, *IfElseNode->GetThenPin());
    						// move false connection to branch node:
    						CompilerContext.MovePinLinksToIntermediate(*FalsePin, *IfElseNode->GetElsePin());
    
    						// remove fake false/true nodes:
    						RemovePin(TruePin);
    						RemovePin(FalsePin);
    					}
    				}
    			}
    		}
    	}
    
    	// AUTO CREATED REFS
    	{
    		if ( Function )
    		{
    			TArray<FString> AutoCreateRefTermPinNames;
    			const bool bHasAutoCreateRefTerms = Function->HasMetaData(FBlueprintMetadata::MD_AutoCreateRefTerm);
    			if ( bHasAutoCreateRefTerms )
    			{
    				CompilerContext.GetSchema()->GetAutoEmitTermParameters(Function, AutoCreateRefTermPinNames);
    			}
    
    			for (UEdGraphPin* Pin : Pins)
    			{
    				const bool bIsRefInputParam = Pin && Pin->PinType.bIsReference && (Pin->Direction == EGPD_Input) && !CompilerContext.GetSchema()->IsMetaPin(*Pin);
    				if (!bIsRefInputParam)
    				{
    					continue;
    				}
    
    				const bool bHasConnections = Pin->LinkedTo.Num() > 0;
    				const bool bCreateDefaultValRefTerm = bHasAutoCreateRefTerms && 
    					!bHasConnections && AutoCreateRefTermPinNames.Contains(Pin->PinName.ToString());
    
    				if (bCreateDefaultValRefTerm)
    				{
    					const bool bHasDefaultValue = !Pin->DefaultValue.IsEmpty() || Pin->DefaultObject || !Pin->DefaultTextValue.IsEmpty();
    
    					// copy defaults as default values can be reset when the pin is connected
    					const FString DefaultValue = Pin->DefaultValue;
    					UObject* DefaultObject = Pin->DefaultObject;
    					const FText DefaultTextValue = Pin->DefaultTextValue;
    					bool bMatchesDefaults = Pin->DoesDefaultValueMatchAutogenerated();
    
    					UEdGraphPin* ValuePin = InnerHandleAutoCreateRef(this, Pin, CompilerContext, SourceGraph, bHasDefaultValue);
    					if ( ValuePin )
    					{
    						if (bMatchesDefaults)
    						{
    							// Use the latest code to set default value
    							Schema->SetPinAutogeneratedDefaultValueBasedOnType(ValuePin);
    						}
    						else
    						{
    							ValuePin->DefaultValue = DefaultValue;
    							ValuePin->DefaultObject = DefaultObject;
    							ValuePin->DefaultTextValue = DefaultTextValue;
    						}
    					}
    				}
    				// since EX_Self does not produce an addressable (referenceable) FProperty, we need to shim
    				// in a "auto-ref" term in its place (this emulates how UHT generates a local value for 
    				// native functions; hence the IsNative() check)
    				else if (bHasConnections && Pin->LinkedTo[0]->PinType.PinSubCategory == UEdGraphSchema_K2::PSC_Self && Pin->PinType.bIsConst && !Function->IsNative())
    				{
    					InnerHandleAutoCreateRef(this, Pin, CompilerContext, SourceGraph, /*bForceAssignment =*/true);
    				}
    			}
    		}
    	}
    
    	// Then we go through and expand out array iteration if necessary
    	const bool bAllowMultipleSelfs = AllowMultipleSelfs(true);
    	UEdGraphPin* MultiSelf = Schema->FindSelfPin(*this, EEdGraphPinDirection::EGPD_Input);
    	if(bAllowMultipleSelfs && MultiSelf && !MultiSelf->PinType.IsArray())
    	{
    		const bool bProperInputToExpandForEach = 
    			(1 == MultiSelf->LinkedTo.Num()) && 
    			(nullptr != MultiSelf->LinkedTo[0]) && 
    			(MultiSelf->LinkedTo[0]->PinType.IsArray());
    		if(bProperInputToExpandForEach)
    		{
    			CallForEachElementInArrayExpansion(this, MultiSelf, CompilerContext, SourceGraph);
    		}
    	}
    }
    
    UEdGraphPin* UK2Node_CallFunction::InnerHandleAutoCreateRef(UK2Node* Node, UEdGraphPin* Pin, FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph, bool bForceAssignment)
    {
    	const bool bAddAssigment = !Pin->PinType.IsContainer() && bForceAssignment;
    
    	// ADD LOCAL VARIABLE
    	UK2Node_TemporaryVariable* LocalVariable = CompilerContext.SpawnIntermediateNode<UK2Node_TemporaryVariable>(Node, SourceGraph);
    	LocalVariable->VariableType = Pin->PinType;
    	LocalVariable->VariableType.bIsReference = false;
    	LocalVariable->AllocateDefaultPins();
    	if (!bAddAssigment)
    	{
    		if (!CompilerContext.GetSchema()->TryCreateConnection(LocalVariable->GetVariablePin(), Pin))
    		{
    			CompilerContext.MessageLog.Error(*LOCTEXT("AutoCreateRefTermPin_NotConnected", "AutoCreateRefTerm Expansion: Pin @@ cannot be connected to @@").ToString(), LocalVariable->GetVariablePin(), Pin);
    			return nullptr;
    		}
    	}
    	// ADD ASSIGMENT
    	else
    	{
    		// TODO connect to dest..
    		UK2Node_PureAssignmentStatement* AssignDefaultValue = CompilerContext.SpawnIntermediateNode<UK2Node_PureAssignmentStatement>(Node, SourceGraph);
    		AssignDefaultValue->AllocateDefaultPins();
    		const bool bVariableConnected = CompilerContext.GetSchema()->TryCreateConnection(AssignDefaultValue->GetVariablePin(), LocalVariable->GetVariablePin());
    		UEdGraphPin* AssignInputPit = AssignDefaultValue->GetValuePin();
    		const bool bPreviousInputSaved = AssignInputPit && CompilerContext.MovePinLinksToIntermediate(*Pin, *AssignInputPit).CanSafeConnect();
    		const bool bOutputConnected = CompilerContext.GetSchema()->TryCreateConnection(AssignDefaultValue->GetOutputPin(), Pin);
    		if (!bVariableConnected || !bOutputConnected || !bPreviousInputSaved)
    		{
    			CompilerContext.MessageLog.Error(*LOCTEXT("AutoCreateRefTermPin_AssignmentError", "AutoCreateRefTerm Expansion: Assignment Error @@").ToString(), AssignDefaultValue);
    			return nullptr;
    		}
    		CompilerContext.GetSchema()->SetPinAutogeneratedDefaultValueBasedOnType(AssignDefaultValue->GetValuePin());
    		return AssignInputPit;
    	}
    	return nullptr;
    }
    
    void UK2Node_CallFunction::CallForEachElementInArrayExpansion(UK2Node* Node, UEdGraphPin* MultiSelf, FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
    {
    	const UEdGraphSchema_K2* Schema = CompilerContext.GetSchema();
    	check(Node && MultiSelf && SourceGraph && Schema);
    	const bool bProperInputToExpandForEach = 
    		(1 == MultiSelf->LinkedTo.Num()) && 
    		(NULL != MultiSelf->LinkedTo[0]) && 
    		(MultiSelf->LinkedTo[0]->PinType.IsArray());
    	ensure(bProperInputToExpandForEach);
    
    	UEdGraphPin* ThenPin = Node->FindPinChecked(UEdGraphSchema_K2::PN_Then);
    
    	// Create int Iterator
    	UK2Node_TemporaryVariable* IteratorVar = CompilerContext.SpawnIntermediateNode<UK2Node_TemporaryVariable>(Node, SourceGraph);
    	IteratorVar->VariableType.PinCategory = UEdGraphSchema_K2::PC_Int;
    	IteratorVar->AllocateDefaultPins();
    
    	// Initialize iterator
    	UK2Node_AssignmentStatement* InteratorInitialize = CompilerContext.SpawnIntermediateNode<UK2Node_AssignmentStatement>(Node, SourceGraph);
    	InteratorInitialize->AllocateDefaultPins();
    	InteratorInitialize->GetValuePin()->DefaultValue = TEXT("0");
    	Schema->TryCreateConnection(IteratorVar->GetVariablePin(), InteratorInitialize->GetVariablePin());
    	CompilerContext.MovePinLinksToIntermediate(*Node->GetExecPin(), *InteratorInitialize->GetExecPin());
    
    	// Do loop branch
    	UK2Node_IfThenElse* Branch = CompilerContext.SpawnIntermediateNode<UK2Node_IfThenElse>(Node, SourceGraph);
    	Branch->AllocateDefaultPins();
    	Schema->TryCreateConnection(InteratorInitialize->GetThenPin(), Branch->GetExecPin());
    	CompilerContext.MovePinLinksToIntermediate(*ThenPin, *Branch->GetElsePin());
    
    	// Do loop condition
    	UK2Node_CallFunction* Condition = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(Node, SourceGraph); 
    	Condition->SetFromFunction(UKismetMathLibrary::StaticClass()->FindFunctionByName(GET_FUNCTION_NAME_CHECKED(UKismetMathLibrary, Less_IntInt)));
    	Condition->AllocateDefaultPins();
    	Schema->TryCreateConnection(Condition->GetReturnValuePin(), Branch->GetConditionPin());
    	Schema->TryCreateConnection(Condition->FindPinChecked(TEXT("A")), IteratorVar->GetVariablePin());
    
    	// Array size
    	UK2Node_CallArrayFunction* ArrayLength = CompilerContext.SpawnIntermediateNode<UK2Node_CallArrayFunction>(Node, SourceGraph); 
    	ArrayLength->SetFromFunction(UKismetArrayLibrary::StaticClass()->FindFunctionByName(GET_FUNCTION_NAME_CHECKED(UKismetArrayLibrary, Array_Length)));
    	ArrayLength->AllocateDefaultPins();
    	CompilerContext.CopyPinLinksToIntermediate(*MultiSelf, *ArrayLength->GetTargetArrayPin());
    	ArrayLength->PinConnectionListChanged(ArrayLength->GetTargetArrayPin());
    	Schema->TryCreateConnection(Condition->FindPinChecked(TEXT("B")), ArrayLength->GetReturnValuePin());
    
    	// Get Element
    	UK2Node_CallArrayFunction* GetElement = CompilerContext.SpawnIntermediateNode<UK2Node_CallArrayFunction>(Node, SourceGraph); 
    	GetElement->SetFromFunction(UKismetArrayLibrary::StaticClass()->FindFunctionByName(GET_FUNCTION_NAME_CHECKED(UKismetArrayLibrary, Array_Get)));
    	GetElement->AllocateDefaultPins();
    	CompilerContext.CopyPinLinksToIntermediate(*MultiSelf, *GetElement->GetTargetArrayPin());
    	GetElement->PinConnectionListChanged(GetElement->GetTargetArrayPin());
    	Schema->TryCreateConnection(GetElement->FindPinChecked(TEXT("Index")), IteratorVar->GetVariablePin());
    
    	// Iterator increment
    	UK2Node_CallFunction* Increment = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(Node, SourceGraph); 
    	Increment->SetFromFunction(UKismetMathLibrary::StaticClass()->FindFunctionByName(GET_FUNCTION_NAME_CHECKED(UKismetMathLibrary, Add_IntInt)));
    	Increment->AllocateDefaultPins();
    	Schema->TryCreateConnection(Increment->FindPinChecked(TEXT("A")), IteratorVar->GetVariablePin());
    	Increment->FindPinChecked(TEXT("B"))->DefaultValue = TEXT("1");
    
    	// Iterator assigned
    	UK2Node_AssignmentStatement* IteratorAssign = CompilerContext.SpawnIntermediateNode<UK2Node_AssignmentStatement>(Node, SourceGraph);
    	IteratorAssign->AllocateDefaultPins();
    	Schema->TryCreateConnection(IteratorAssign->GetVariablePin(), IteratorVar->GetVariablePin());
    	Schema->TryCreateConnection(IteratorAssign->GetValuePin(), Increment->GetReturnValuePin());
    	Schema->TryCreateConnection(IteratorAssign->GetThenPin(), Branch->GetExecPin());
    
    	// Connect pins from intermediate nodes back in to the original node
    	Schema->TryCreateConnection(Branch->GetThenPin(), Node->GetExecPin());
    	Schema->TryCreateConnection(ThenPin, IteratorAssign->GetExecPin());
    	Schema->TryCreateConnection(GetElement->FindPinChecked(TEXT("Item")), MultiSelf);
    }
    
    FName UK2Node_CallFunction::GetCornerIcon() const
    {
    	if (const UFunction* Function = GetTargetFunction())
    	{
    		if (Function->HasAllFunctionFlags(FUNC_BlueprintAuthorityOnly))
    		{
    			return TEXT("Graph.Replication.AuthorityOnly");		
    		}
    		else if (Function->HasAllFunctionFlags(FUNC_BlueprintCosmetic))
    		{
    			return TEXT("Graph.Replication.ClientEvent");
    		}
    		else if(Function->HasMetaData(FBlueprintMetadata::MD_Latent))
    		{
    			return TEXT("Graph.Latent.LatentIcon");
    		}
    	}
    	return Super::GetCornerIcon();
    }
    
    FSlateIcon UK2Node_CallFunction::GetIconAndTint(FLinearColor& OutColor) const
    {
    	return GetPaletteIconForFunction(GetTargetFunction(), OutColor);
    }
    
    bool UK2Node_CallFunction::ReconnectPureExecPins(TArray<UEdGraphPin*>& OldPins)
    {
    	if (IsNodePure())
    	{
    		// look for an old exec pin
    		UEdGraphPin* PinExec = nullptr;
    		for (int32 PinIdx = 0; PinIdx < OldPins.Num(); PinIdx++)
    		{
    			if (OldPins[PinIdx]->PinName == UEdGraphSchema_K2::PN_Execute)
    			{
    				PinExec = OldPins[PinIdx];
    				break;
    			}
    		}
    		if (PinExec)
    		{
    			PinExec->SetSavePinIfOrphaned(false); 
    
    			// look for old then pin
    			UEdGraphPin* PinThen = nullptr;
    			for (int32 PinIdx = 0; PinIdx < OldPins.Num(); PinIdx++)
    			{
    				if (OldPins[PinIdx]->PinName == UEdGraphSchema_K2::PN_Then)
    				{
    					PinThen = OldPins[PinIdx];
    					break;
    				}
    			}
    			if (PinThen)
    			{
    				PinThen->SetSavePinIfOrphaned(false);
    
    				// reconnect all incoming links to old exec pin to the far end of the old then pin.
    				if (PinThen->LinkedTo.Num() > 0)
    				{
    					UEdGraphPin* PinThenLinked = PinThen->LinkedTo[0];
    					while (PinExec->LinkedTo.Num() > 0)
    					{
    						UEdGraphPin* PinExecLinked = PinExec->LinkedTo[0];
    						PinExecLinked->BreakLinkTo(PinExec);
    						PinExecLinked->MakeLinkTo(PinThenLinked);
    					}
    					return true;
    				}
    			}
    		}
    	}
    	return false;
    }
    
    void UK2Node_CallFunction::InvalidatePinTooltips()
    {
    	bPinTooltipsValid = false;
    }
    
    void UK2Node_CallFunction::ConformContainerPins()
    {
    	// helper functions for type propagation:
    	const auto TryReadTypeToPropagate = [](UEdGraphPin* Pin, bool& bOutPropagated, FEdGraphTerminalType& TypeToPropagete)
    	{
    		if (Pin && !bOutPropagated)
    		{
    			if (Pin->HasAnyConnections() || !Pin->DoesDefaultValueMatchAutogenerated() )
    			{
    				bOutPropagated = true;
    				if (Pin->LinkedTo.Num() != 0)
    				{
    					TypeToPropagete = Pin->LinkedTo[0]->GetPrimaryTerminalType();
    				}
    				else
    				{
    					TypeToPropagete = Pin->GetPrimaryTerminalType();
    				}
    			}
    		}
    	};
    
    	const auto TryReadValueTypeToPropagate = [](UEdGraphPin* Pin, bool& bOutPropagated, FEdGraphTerminalType& TypeToPropagete)
    	{
    		if (Pin && !bOutPropagated)
    		{
    			if (Pin->LinkedTo.Num() != 0 || !Pin->DoesDefaultValueMatchAutogenerated())
    			{
    				bOutPropagated = true;
    				if (Pin->LinkedTo.Num() != 0)
    				{
    					TypeToPropagete = Pin->LinkedTo[0]->PinType.PinValueType;
    				}
    				else
    				{
    					TypeToPropagete = Pin->PinType.PinValueType;
    				}
    			}
    		}
    	};
    	
    	const UEdGraphSchema_K2* Schema = CastChecked<UEdGraphSchema_K2>(GetSchema());
    
    	const auto TryPropagateType = [Schema](UEdGraphPin* Pin, const FEdGraphTerminalType& TerminalType, bool bTypeIsAvailable)
    	{
    		if(Pin)
    		{
    			if(bTypeIsAvailable)
    			{
    				const FEdGraphTerminalType PrimaryType = Pin->GetPrimaryTerminalType();
    				if( PrimaryType.TerminalCategory != TerminalType.TerminalCategory ||
    					PrimaryType.TerminalSubCategory != TerminalType.TerminalSubCategory ||
    					PrimaryType.TerminalSubCategoryObject != TerminalType.TerminalSubCategoryObject)
    				{
    					// terminal type changed:
    					if (Pin->SubPins.Num() > 0 && Pin->PinType.PinCategory != UEdGraphSchema_K2::PC_Wildcard)
    					{
    						Schema->RecombinePin(Pin->SubPins[0]);
    					}
    
    					Pin->PinType.PinCategory = TerminalType.TerminalCategory;
    					Pin->PinType.PinSubCategory = TerminalType.TerminalSubCategory;
    					Pin->PinType.PinSubCategoryObject = TerminalType.TerminalSubCategoryObject;
    
    					// Also propagate the CPF_UObjectWrapper flag, which will be set for "wrapped" object ptr types (e.g. TSubclassOf).
    					Pin->PinType.bIsUObjectWrapper = TerminalType.bTerminalIsUObjectWrapper;
    				
    					// Reset default values
    					if (!Schema->IsPinDefaultValid(Pin, Pin->DefaultValue, Pin->DefaultObject, Pin->DefaultTextValue).IsEmpty())
    					{
    						Schema->ResetPinToAutogeneratedDefaultValue(Pin, false);
    					}
    				}
    			}
    			else
    			{
    				// reset to wildcard:
    				if (Pin->SubPins.Num() > 0)
    				{
    					Schema->RecombinePin(Pin->SubPins[0]);
    				}
    
    				Pin->PinType.PinCategory = UEdGraphSchema_K2::PC_Wildcard;
    				Pin->PinType.PinSubCategory = NAME_None;
    				Pin->PinType.PinSubCategoryObject = nullptr;
    				Pin->PinType.bIsUObjectWrapper = false;
    				Schema->ResetPinToAutogeneratedDefaultValue(Pin, false);
    			}
    		}
    	};
    
    	const auto TryPropagateValueType = [](UEdGraphPin* Pin, const FEdGraphTerminalType& TerminalType, bool bTypeIsAvailable)
    	{
    		if (Pin)
    		{
    			if (bTypeIsAvailable)
    			{
    				Pin->PinType.PinValueType.TerminalCategory = TerminalType.TerminalCategory;
    				Pin->PinType.PinValueType.TerminalSubCategory = TerminalType.TerminalSubCategory;
    				Pin->PinType.PinValueType.TerminalSubCategoryObject = TerminalType.TerminalSubCategoryObject;
    			}
    			else
    			{
    				Pin->PinType.PinValueType.TerminalCategory = UEdGraphSchema_K2::PC_Wildcard;
    				Pin->PinType.PinValueType.TerminalSubCategory = NAME_None;
    				Pin->PinType.PinValueType.TerminalSubCategoryObject = nullptr;
    			}
    		}
    	};
    		
    	const UFunction* TargetFunction = GetTargetFunction();
    	if (TargetFunction == nullptr)
    	{
    		return;
    	}
    
    	// find any pins marked as SetParam
    	const FString& SetPinMetaData = TargetFunction->GetMetaData(FBlueprintMetadata::MD_SetParam);
    
    	// useless copies/allocates in this code, could be an optimization target...
    	TArray<FString> SetParamPinGroups;
    	{
    		SetPinMetaData.ParseIntoArray(SetParamPinGroups, TEXT(","), true);
    	}
    
    	for (FString& Entry : SetParamPinGroups)
    	{
    		// split the group:
    		TArray<FString> GroupEntries;
    		Entry.ParseIntoArray(GroupEntries, TEXT("|"), true);
    		// resolve pins
    		TArray<UEdGraphPin*> ResolvedPins;
    		for(UEdGraphPin* Pin : Pins)
    		{
    			if (GroupEntries.Contains(Pin->GetName()))
    			{
    				ResolvedPins.Add(Pin);
    			}
    		}
    
    		// if nothing is connected (or non-default), reset to wildcard
    		// else, find the first type and propagate to everyone else::
    		bool bReadyToPropagatSetType = false;
    		FEdGraphTerminalType TypeToPropagate;
    		for (UEdGraphPin* Pin : ResolvedPins)
    		{
    			TryReadTypeToPropagate(Pin, bReadyToPropagatSetType, TypeToPropagate);
    			if(bReadyToPropagatSetType)
    			{
    				break;
    			}
    		}
    
    		for (UEdGraphPin* Pin : ResolvedPins)
    		{
    			TryPropagateType( Pin, TypeToPropagate, bReadyToPropagatSetType );
    		}
    	}
    
    	const FString& MapPinMetaData = TargetFunction->GetMetaData(FBlueprintMetadata::MD_MapParam);
    	const FString& MapKeyPinMetaData = TargetFunction->GetMetaData(FBlueprintMetadata::MD_MapKeyParam);
    	const FString& MapValuePinMetaData = TargetFunction->GetMetaData(FBlueprintMetadata::MD_MapValueParam);
    
    	if(!MapPinMetaData.IsEmpty() || !MapKeyPinMetaData.IsEmpty() || !MapValuePinMetaData.IsEmpty() )
    	{
    		// if the map pin has a connection infer from that, otherwise use the information on the key param and value param:
    		bool bReadyToPropagateKeyType = false;
    		FEdGraphTerminalType KeyTypeToPropagate;
    		bool bReadyToPropagateValueType = false;
    		FEdGraphTerminalType ValueTypeToPropagate;
    
    		UEdGraphPin* MapPin = MapPinMetaData.IsEmpty() ? nullptr : FindPin(MapPinMetaData);
    		UEdGraphPin* MapKeyPin = MapKeyPinMetaData.IsEmpty() ? nullptr : FindPin(MapKeyPinMetaData);
    		UEdGraphPin* MapValuePin = MapValuePinMetaData.IsEmpty() ? nullptr : FindPin(MapValuePinMetaData);
    
    		TryReadTypeToPropagate(MapPin, bReadyToPropagateKeyType, KeyTypeToPropagate);
    		TryReadValueTypeToPropagate(MapPin, bReadyToPropagateValueType, ValueTypeToPropagate);
    		TryReadTypeToPropagate(MapKeyPin, bReadyToPropagateKeyType, KeyTypeToPropagate);
    		TryReadTypeToPropagate(MapValuePin, bReadyToPropagateValueType, ValueTypeToPropagate);
    
    		TryPropagateType(MapPin, KeyTypeToPropagate, bReadyToPropagateKeyType);
    		TryPropagateType(MapKeyPin, KeyTypeToPropagate, bReadyToPropagateKeyType);
    
    		TryPropagateValueType(MapPin, ValueTypeToPropagate, bReadyToPropagateValueType);
    		TryPropagateType(MapValuePin, ValueTypeToPropagate, bReadyToPropagateValueType);
    	}
    }
    
    FText UK2Node_CallFunction::GetToolTipHeading() const
    {
    	FText Heading = Super::GetToolTipHeading();
    
    	struct FHeadingBuilder
    	{
    		FHeadingBuilder(FText InitialHeading) : ConstructedHeading(InitialHeading) {}
    
    		void Append(FText HeadingAddOn)
    		{
    			if (ConstructedHeading.IsEmpty())
    			{
    				ConstructedHeading = HeadingAddOn;
    			}
    			else 
    			{
    				ConstructedHeading = FText::Format(FText::FromString("{0}\n{1}"), HeadingAddOn, ConstructedHeading);
    			}
    		}
    
    		FText ConstructedHeading;
    	};
    	FHeadingBuilder HeadingBuilder(Super::GetToolTipHeading());
    
    	if (const UFunction* Function = GetTargetFunction())
    	{
    		if (Function->HasAllFunctionFlags(FUNC_BlueprintAuthorityOnly))
    		{
    			HeadingBuilder.Append(LOCTEXT("ServerOnlyFunc", "Server Only"));	
    		}
    		if (Function->HasAllFunctionFlags(FUNC_BlueprintCosmetic))
    		{
    			HeadingBuilder.Append(LOCTEXT("ClientOnlyFunc", "Client Only"));
    		}
    		if(Function->HasMetaData(FBlueprintMetadata::MD_Latent))
    		{
    			HeadingBuilder.Append(LOCTEXT("LatentFunc", "Latent"));
    		}
    	}
    
    	return HeadingBuilder.ConstructedHeading;
    }
    
    void UK2Node_CallFunction::GetNodeAttributes( TArray<TKeyValuePair<FString, FString>>& OutNodeAttributes ) const
    {
    	UFunction* TargetFunction = GetTargetFunction();
    	const FString TargetFunctionName = TargetFunction ? TargetFunction->GetName() : TEXT( "InvalidFunction" );
    	OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Type" ), TEXT( "Function" ) ));
    	OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Class" ), GetClass()->GetName() ));
    	OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Name" ), TargetFunctionName ));
    }
    
    FText UK2Node_CallFunction::GetMenuCategory() const
    {
    	UFunction* TargetFunction = GetTargetFunction();
    	if (TargetFunction != nullptr)
    	{
    		return GetDefaultCategoryForFunction(TargetFunction, FText::GetEmpty());
    	}
    	return FText::GetEmpty();
    }
    
    bool UK2Node_CallFunction::HasExternalDependencies(TArray<class UStruct*>* OptionalOutput) const
    {
    	UFunction* Function = GetTargetFunction();
    	const UClass* SourceClass = Function ? Function->GetOwnerClass() : nullptr;
    	const UBlueprint* SourceBlueprint = GetBlueprint();
    	bool bResult = (SourceClass != nullptr) && (SourceClass->ClassGeneratedBy != SourceBlueprint);
    	if (bResult && OptionalOutput)
    	{
    		OptionalOutput->AddUnique(Function);
    	}
    
    	// All structures, that are required for the BP compilation, should be gathered
    	for (UEdGraphPin* Pin : Pins)
    	{
    		UStruct* DepStruct = Pin ? Cast<UStruct>(Pin->PinType.PinSubCategoryObject.Get()) : nullptr;
    
    		UClass* DepClass = Cast<UClass>(DepStruct);
    		if (DepClass && (DepClass->ClassGeneratedBy == SourceBlueprint))
    		{
    			//Don't include self
    			continue;
    		}
    
    		if (DepStruct && !DepStruct->IsNative())
    		{
    			if (OptionalOutput)
    			{
    				OptionalOutput->AddUnique(DepStruct);
    			}
    			bResult = true;
    		}
    	}
    
    	const bool bSuperResult = Super::HasExternalDependencies(OptionalOutput);
    	return bSuperResult || bResult;
    }
    
    UEdGraph* UK2Node_CallFunction::GetFunctionGraph(const UEdGraphNode*& OutGraphNode) const
    {
    	OutGraphNode = nullptr;
    
    	// Search for the Blueprint owner of the function graph, climbing up through the Blueprint hierarchy
    	UClass* MemberParentClass = FunctionReference.GetMemberParentClass(GetBlueprintClassFromNode());
    	if(MemberParentClass != nullptr)
    	{
    		UBlueprintGeneratedClass* ParentClass = Cast<UBlueprintGeneratedClass>(MemberParentClass);
    		if(ParentClass != nullptr && ParentClass->ClassGeneratedBy != nullptr)
    		{
    			UBlueprint* Blueprint = Cast<UBlueprint>(ParentClass->ClassGeneratedBy);
    			while(Blueprint != nullptr)
    			{
    				UEdGraph* TargetGraph = nullptr;
    				const FName FunctionName = FunctionReference.GetMemberName();
    				for (UEdGraph* const Graph : Blueprint->FunctionGraphs) 
    				{
    					if (Graph->GetFName() == FunctionName)
    					{
    						TargetGraph = Graph;
    						break;
    					}
    				}
    
    				if (!TargetGraph)
    				{
    					for (const FBPInterfaceDescription& Interface : Blueprint->ImplementedInterfaces)
    					{
    						for (UEdGraph* const Graph : Interface.Graphs)
    						{
    							if (Graph->GetFName() == FunctionName)
    							{
    								TargetGraph = Graph;
    								break;
    							}
    						}
    
    						if (TargetGraph)
    						{
    							break;
    						}
    					}
    				}
    
    				if((TargetGraph != nullptr) && !TargetGraph->HasAnyFlags(RF_Transient))
    				{
    					// Found the function graph in a Blueprint, return that graph
    					return TargetGraph;
    				}
    				else
    				{
    					// Did not find the function call as a graph, it may be a custom event
    					UK2Node_CustomEvent* CustomEventNode = nullptr;
    
    					TArray<UK2Node_CustomEvent*> CustomEventNodes;
    					FBlueprintEditorUtils::GetAllNodesOfClass(Blueprint, CustomEventNodes);
    
    					for (UK2Node_CustomEvent* const CustomEvent : CustomEventNodes)
    					{
    						if(CustomEvent->CustomFunctionName == FunctionReference.GetMemberName())
    						{
    							OutGraphNode = CustomEvent;
    							return CustomEvent->GetGraph();
    						}
    					}
    				}
    
    				ParentClass = Cast<UBlueprintGeneratedClass>(Blueprint->ParentClass);
    				Blueprint = ParentClass != nullptr ? Cast<UBlueprint>(ParentClass->ClassGeneratedBy) : nullptr;
    			}
    		}
    	}
    	return nullptr;
    }
    
    bool UK2Node_CallFunction::IsStructureWildcardProperty(const UFunction* Function, const FName PropertyName)
    {
    	if (Function && !PropertyName.IsNone())
    	{
    		TArray<FString> Names;
    		FCustomStructureParamHelper::FillCustomStructureParameterNames(Function, Names);
    		if (Names.Contains(PropertyName.ToString()))
    		{
    			return true;
    		}
    	}
    	return false;
    }
    
    bool UK2Node_CallFunction::IsWildcardProperty(const UFunction* InFunction, const FProperty* InProperty)
    {
    	if (InProperty)
    	{
    		return FEdGraphUtilities::IsSetParam(InFunction, InProperty->GetFName()) || FEdGraphUtilities::IsMapParam(InFunction, InProperty->GetFName());
    	}
    	return false;
    }
    
    void UK2Node_CallFunction::AddSearchMetaDataInfo(TArray<struct FSearchTagDataPair>& OutTaggedMetaData) const
    {
    	Super::AddSearchMetaDataInfo(OutTaggedMetaData);
    
    	if (UFunction* TargetFunction = GetTargetFunction())
    	{
    		OutTaggedMetaData.Add(FSearchTagDataPair(FFindInBlueprintSearchTags::FiB_NativeName, FText::FromString(TargetFunction->GetName())));
    	}
    }
    
    TSharedPtr<SWidget> UK2Node_CallFunction::CreateNodeImage() const
    {
    	// For set, map and array functions we have a cool icon. This helps users quickly
    	// identify container types:
    	if (UFunction* TargetFunction = GetTargetFunction())
    	{
    		UEdGraphPin* NodeImagePin = FEdGraphUtilities::FindArrayParamPin(TargetFunction, this);
    		NodeImagePin = NodeImagePin ? NodeImagePin : FEdGraphUtilities::FindSetParamPin(TargetFunction, this);
    		NodeImagePin = NodeImagePin ? NodeImagePin : FEdGraphUtilities::FindMapParamPin(TargetFunction, this);
    		if(NodeImagePin)
    		{
    			// Find the first array param pin and bind that to our array image:
    			return SPinTypeSelector::ConstructPinTypeImage(NodeImagePin);
    		}
    	}
    
    	return TSharedPtr<SWidget>();
    }
    
    UObject* UK2Node_CallFunction::GetJumpTargetForDoubleClick() const
    {
    	// If there is an event node, jump to it, otherwise jump to the function graph
    	const UEdGraphNode* ResultEventNode = nullptr;
    	UEdGraph* FunctionGraph = GetFunctionGraph(/*out*/ ResultEventNode);
    	if (ResultEventNode != nullptr)
    	{
    		return const_cast<UEdGraphNode*>(ResultEventNode);
    	}
    	else
    	{
    		return FunctionGraph;
    	}
    }
    
    bool UK2Node_CallFunction::CanJumpToDefinition() const
    {
    	const UFunction* TargetFunction = GetTargetFunction();
    	const bool bNativeFunction = (TargetFunction != nullptr) && (TargetFunction->IsNative());
    	return bNativeFunction || (GetJumpTargetForDoubleClick() != nullptr);
    }
    
    void UK2Node_CallFunction::JumpToDefinition() const
    {
    	// For native functions, try going to the function definition in C++ if available
    	if (UFunction* TargetFunction = GetTargetFunction())
    	{
    		if (TargetFunction->IsNative())
    		{
    			// First try the nice way that will get to the right line number
    			bool bSucceeded = false;
    			const bool bNavigateToNativeFunctions = GetDefault<UBlueprintEditorSettings>()->bNavigateToNativeFunctionsFromCallNodes;
    			
    			if(bNavigateToNativeFunctions) 
    			{
    				if(FSourceCodeNavigation::CanNavigateToFunction(TargetFunction))
    				{
    					bSucceeded = FSourceCodeNavigation::NavigateToFunction(TargetFunction);
    				}
    
    				// Failing that, fall back to the older method which will still get the file open assuming it exists
    				if (!bSucceeded)
    				{
    					FString NativeParentClassHeaderPath;
    					const bool bFileFound = FSourceCodeNavigation::FindClassHeaderPath(TargetFunction, NativeParentClassHeaderPath) && (IFileManager::Get().FileSize(*NativeParentClassHeaderPath) != INDEX_NONE);
    					if (bFileFound)
    					{
    						const FString AbsNativeParentClassHeaderPath = FPaths::ConvertRelativePathToFull(NativeParentClassHeaderPath);
    						bSucceeded = FSourceCodeNavigation::OpenSourceFile(AbsNativeParentClassHeaderPath);
    					}
    				}
    			}
    			else
    			{	
    				// Inform user that the function is native, give them opportunity to enable navigation to native
    				// functions:
    				FNotificationInfo Info(LOCTEXT("NavigateToNativeDisabled", "Navigation to Native (c++) Functions Disabled"));
    				Info.ExpireDuration = 10.0f;
    				Info.CheckBoxState = bNavigateToNativeFunctions ? ECheckBoxState::Checked : ECheckBoxState::Unchecked;
    			
    				Info.CheckBoxStateChanged = FOnCheckStateChanged::CreateStatic(
    					[](ECheckBoxState NewState)
    					{
    						const FScopedTransaction Transaction(LOCTEXT("ChangeNavigateToNativeFunctionsFromCallNodes", "Change Navigate to Native Functions from Call Nodes Setting"));
    	
    						UBlueprintEditorSettings* MutableEditorSetings = GetMutableDefault<UBlueprintEditorSettings>();
    						MutableEditorSetings->Modify();
    						MutableEditorSetings->bNavigateToNativeFunctionsFromCallNodes = (NewState == ECheckBoxState::Checked) ? true : false;
    						MutableEditorSetings->SaveConfig();
    					}
    				);
    				Info.CheckBoxText = LOCTEXT("EnableNavigationToNative", "Navigate to Native Functions from Blueprint Call Nodes?");
    			
    				FSlateNotificationManager::Get().AddNotification(Info);
    			}
    
    			return;
    		}
    	}
    
    	// Otherwise, fall back to the inherited behavior which should go to the function entry node
    	Super::JumpToDefinition();
    }
    
    FString UK2Node_CallFunction::GetPinMetaData(FName InPinName, FName InKey)
    {
    	FString MetaData = Super::GetPinMetaData(InPinName, InKey);
    
    	// If there's no metadata directly on the pin then check for metadata on the function
    	if (MetaData.IsEmpty())
    	{
    		if (UFunction* Function = GetTargetFunction())
    		{
    			// Find the corresponding property for the pin
    			if (FProperty* Property = Function->FindPropertyByName(InPinName))
    			{
    				MetaData = Property->GetMetaData(InKey);
    			}
    		}
    	}
    
    	return MetaData;
    }
    
    bool UK2Node_CallFunction::IsConnectionDisallowed(const UEdGraphPin* MyPin, const UEdGraphPin* OtherPin, FString& OutReason) const
    {
    	bool bIsDisallowed = Super::IsConnectionDisallowed(MyPin, OtherPin, OutReason);
    	if (!bIsDisallowed && MyPin != nullptr)
    	{
    		if (MyPin->bNotConnectable)
    		{
    			bIsDisallowed = true;
    			OutReason = LOCTEXT("PinConnectionDisallowed", "This parameter is for internal use only.").ToString();
    		}
    		else if (UFunction* TargetFunction = GetTargetFunction())
    		{
    			const bool bIsObjectType = (MyPin->PinType.PinCategory == UEdGraphSchema_K2::PC_Object ||
    				MyPin->PinType.PinCategory == UEdGraphSchema_K2::PC_SoftObject) &&
    				(OtherPin->PinType.PinCategory == UEdGraphSchema_K2::PC_Object ||
    				OtherPin->PinType.PinCategory == UEdGraphSchema_K2::PC_SoftObject);
    
    			if (// Strictly speaking this first check is not needed, but by not disabling the connection here we get a better reason later:
    				(	OtherPin->PinType.IsContainer() 
    					// make sure we don't allow connections of mismatched container types (e.g. maps to arrays)
    					&& (OtherPin->PinType.ContainerType != MyPin->PinType.ContainerType)
    					&& (
    						(FEdGraphUtilities::IsSetParam(TargetFunction, MyPin->PinName) && !MyPin->PinType.IsSet()) ||
    						(FEdGraphUtilities::IsMapParam(TargetFunction, MyPin->PinName) && !MyPin->PinType.IsMap()) ||
    						(FEdGraphUtilities::IsArrayDependentParam(TargetFunction, MyPin->PinName) && !MyPin->PinType.IsArray())
    					)
    				)
    			)
    			{
    				bIsDisallowed = true;
    				OutReason = LOCTEXT("PinSetConnectionDisallowed", "Containers of containers are not supported - consider wrapping a container in a Structure object").ToString();
    			}
    			// Do not allow exec pins to be connected to a wildcard if this is a container function
    			else if(MyPin->PinType.PinCategory == UEdGraphSchema_K2::PC_Wildcard && OtherPin->PinType.PinCategory == UEdGraphSchema_K2::PC_Exec)
    			{
    				bIsDisallowed = true;
    				OutReason = LOCTEXT("PinExecConnectionDisallowed", "Cannot create a container of Exec pins.").ToString();
    			}
    			else if (bIsObjectType && MyPin->Direction == EGPD_Input && MyPin->PinType.IsContainer() && OtherPin->PinType.IsContainer())
    			{
    				// Check that we can actually connect the dependent pins to this new array
    				const UEdGraphSchema_K2* K2Schema = Cast<UEdGraphSchema_K2>(GetSchema());
    
    				// Gather all pins that would be dependent on on the container type
    				TArray<UEdGraphPin*> DependentPins;
    				{
    					for (UEdGraphPin* Pin : Pins)
    					{
    						if (Pin->Direction == EGPD_Input && Pin != MyPin && FEdGraphUtilities::IsDynamicContainerParam(TargetFunction, Pin->PinName))
    						{
    							DependentPins.Add(Pin);
    						}
    					}
    				}
    
    				for (UEdGraphPin* Pin : DependentPins)
    				{
    					// If the pins are both containers, then ArePinTypesCompatible will fail incorrectly.
    					if (OtherPin->PinType.ContainerType != Pin->PinType.ContainerType)
    					{
    						continue;
    					}
    
    					UClass* Context = nullptr;
    					UBlueprint* Blueprint = GetBlueprint();
    					if (Blueprint)
    					{
    						Context = Blueprint->GeneratedClass;
    					}
    
    					const bool ConnectResponse = K2Schema->ArePinTypesCompatible(Pin->PinType, OtherPin->PinType, Context, /* bIgnoreArray = */ true);
    
    					if (!ConnectResponse)
    					{
    						// For sets, we have to check if the other pin is a valid child that can actually 
    						// be connected in cases like the "Union" function
    						UStruct const* OutputObject = (OtherPin->PinType.PinSubCategory == UEdGraphSchema_K2::PSC_Self) ? Context : Cast<UStruct>(OtherPin->PinType.PinSubCategoryObject.Get());
    						UStruct const* InputObject = (Pin->PinType.PinSubCategory == UEdGraphSchema_K2::PSC_Self) ? Context : Cast<UStruct>(Pin->PinType.PinSubCategoryObject.Get());
    
    						if (OtherPin->PinType.IsSet() && OutputObject && InputObject && OutputObject->IsChildOf(InputObject))
    						{
    							bIsDisallowed = false;
    						}
    						else
    						{
    							// Display the necessary tooltip on the pin hover, and log it if we are compiling
    							FFormatNamedArguments MessageArgs;
    							MessageArgs.Add(TEXT("PinAType"), UEdGraphSchema_K2::TypeToText(Pin->PinType));
    							MessageArgs.Add(TEXT("PinBType"), UEdGraphSchema_K2::TypeToText(OtherPin->PinType));
    							UBlueprint* BP = GetBlueprint();
    							UEdGraph* OwningGraph = GetGraph();
    
    							OutReason = FText::Format(LOCTEXT("DefaultPinIncompatibilityMessage", "{PinAType} is not compatible with {PinBType}."), MessageArgs).ToString();
    							return true;
    						}
    					}
    				}
    			}
    		}
    	}
    
    	return bIsDisallowed;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324
    • 325
    • 326
    • 327
    • 328
    • 329
    • 330
    • 331
    • 332
    • 333
    • 334
    • 335
    • 336
    • 337
    • 338
    • 339
    • 340
    • 341
    • 342
    • 343
    • 344
    • 345
    • 346
    • 347
    • 348
    • 349
    • 350
    • 351
    • 352
    • 353
    • 354
    • 355
    • 356
    • 357
    • 358
    • 359
    • 360
    • 361
    • 362
    • 363
    • 364
    • 365
    • 366
    • 367
    • 368
    • 369
    • 370
    • 371
    • 372
    • 373
    • 374
    • 375
    • 376
    • 377
    • 378
    • 379
    • 380
    • 381
    • 382
    • 383
    • 384
    • 385
    • 386
    • 387
    • 388
    • 389
    • 390
    • 391
    • 392
    • 393
    • 394
    • 395
    • 396
    • 397
    • 398
    • 399
    • 400
    • 401
    • 402
    • 403
    • 404
    • 405
    • 406
    • 407
    • 408
    • 409
    • 410
    • 411
    • 412
    • 413
    • 414
    • 415
    • 416
    • 417
    • 418
    • 419
    • 420
    • 421
    • 422
    • 423
    • 424
    • 425
    • 426
    • 427
    • 428
    • 429
    • 430
    • 431
    • 432
    • 433
    • 434
    • 435
    • 436
    • 437
    • 438
    • 439
    • 440
    • 441
    • 442
    • 443
    • 444
    • 445
    • 446
    • 447
    • 448
    • 449
    • 450
    • 451
    • 452
    • 453
    • 454
    • 455
    • 456
    • 457
    • 458
    • 459
    • 460
    • 461
    • 462
    • 463
    • 464
    • 465
    • 466
    • 467
    • 468
    • 469
    • 470
    • 471
    • 472
    • 473
    • 474
    • 475
    • 476
    • 477
    • 478
    • 479
    • 480
    • 481
    • 482
    • 483
    • 484
    • 485
    • 486
    • 487
    • 488
    • 489
    • 490
    • 491
    • 492
    • 493
    • 494
    • 495
    • 496
    • 497
    • 498
    • 499
    • 500
    • 501
    • 502
    • 503
    • 504
    • 505
    • 506
    • 507
    • 508
    • 509
    • 510
    • 511
    • 512
    • 513
    • 514
    • 515
    • 516
    • 517
    • 518
    • 519
    • 520
    • 521
    • 522
    • 523
    • 524
    • 525
    • 526
    • 527
    • 528
    • 529
    • 530
    • 531
    • 532
    • 533
    • 534
    • 535
    • 536
    • 537
    • 538
    • 539
    • 540
    • 541
    • 542
    • 543
    • 544
    • 545
    • 546
    • 547
    • 548
    • 549
    • 550
    • 551
    • 552
    • 553
    • 554
    • 555
    • 556
    • 557
    • 558
    • 559
    • 560
    • 561
    • 562
    • 563
    • 564
    • 565
    • 566
    • 567
    • 568
    • 569
    • 570
    • 571
    • 572
    • 573
    • 574
    • 575
    • 576
    • 577
    • 578
    • 579
    • 580
    • 581
    • 582
    • 583
    • 584
    • 585
    • 586
    • 587
    • 588
    • 589
    • 590
    • 591
    • 592
    • 593
    • 594
    • 595
    • 596
    • 597
    • 598
    • 599
    • 600
    • 601
    • 602
    • 603
    • 604
    • 605
    • 606
    • 607
    • 608
    • 609
    • 610
    • 611
    • 612
    • 613
    • 614
    • 615
    • 616
    • 617
    • 618
    • 619
    • 620
    • 621
    • 622
    • 623
    • 624
    • 625
    • 626
    • 627
    • 628
    • 629
    • 630
    • 631
    • 632
    • 633
    • 634
    • 635
    • 636
    • 637
    • 638
    • 639
    • 640
    • 641
    • 642
    • 643
    • 644
    • 645
    • 646
    • 647
    • 648
    • 649
    • 650
    • 651
    • 652
    • 653
    • 654
    • 655
    • 656
    • 657
    • 658
    • 659
    • 660
    • 661
    • 662
    • 663
    • 664
    • 665
    • 666
    • 667
    • 668
    • 669
    • 670
    • 671
    • 672
    • 673
    • 674
    • 675
    • 676
    • 677
    • 678
    • 679
    • 680
    • 681
    • 682
    • 683
    • 684
    • 685
    • 686
    • 687
    • 688
    • 689
    • 690
    • 691
    • 692
    • 693
    • 694
    • 695
    • 696
    • 697
    • 698
    • 699
    • 700
    • 701
    • 702
    • 703
    • 704
    • 705
    • 706
    • 707
    • 708
    • 709
    • 710
    • 711
    • 712
    • 713
    • 714
    • 715
    • 716
    • 717
    • 718
    • 719
    • 720
    • 721
    • 722
    • 723
    • 724
    • 725
    • 726
    • 727
    • 728
    • 729
    • 730
    • 731
    • 732
    • 733
    • 734
    • 735
    • 736
    • 737
    • 738
    • 739
    • 740
    • 741
    • 742
    • 743
    • 744
    • 745
    • 746
    • 747
    • 748
    • 749
    • 750
    • 751
    • 752
    • 753
    • 754
    • 755
    • 756
    • 757
    • 758
    • 759
    • 760
    • 761
    • 762
    • 763
    • 764
    • 765
    • 766
    • 767
    • 768
    • 769
    • 770
    • 771
    • 772
    • 773
    • 774
    • 775
    • 776
    • 777
    • 778
    • 779
    • 780
    • 781
    • 782
    • 783
    • 784
    • 785
    • 786
    • 787
    • 788
    • 789
    • 790
    • 791
    • 792
    • 793
    • 794
    • 795
    • 796
    • 797
    • 798
    • 799
    • 800
    • 801
    • 802
    • 803
    • 804
    • 805
    • 806
    • 807
    • 808
    • 809
    • 810
    • 811
    • 812
    • 813
    • 814
    • 815
    • 816
    • 817
    • 818
    • 819
    • 820
    • 821
    • 822
    • 823
    • 824
    • 825
    • 826
    • 827
    • 828
    • 829
    • 830
    • 831
    • 832
    • 833
    • 834
    • 835
    • 836
    • 837
    • 838
    • 839
    • 840
    • 841
    • 842
    • 843
    • 844
    • 845
    • 846
    • 847
    • 848
    • 849
    • 850
    • 851
    • 852
    • 853
    • 854
    • 855
    • 856
    • 857
    • 858
    • 859
    • 860
    • 861
    • 862
    • 863
    • 864
    • 865
    • 866
    • 867
    • 868
    • 869
    • 870
    • 871
    • 872
    • 873
    • 874
    • 875
    • 876
    • 877
    • 878
    • 879
    • 880
    • 881
    • 882
    • 883
    • 884
    • 885
    • 886
    • 887
    • 888
    • 889
    • 890
    • 891
    • 892
    • 893
    • 894
    • 895
    • 896
    • 897
    • 898
    • 899
    • 900
    • 901
    • 902
    • 903
    • 904
    • 905
    • 906
    • 907
    • 908
    • 909
    • 910
    • 911
    • 912
    • 913
    • 914
    • 915
    • 916
    • 917
    • 918
    • 919
    • 920
    • 921
    • 922
    • 923
    • 924
    • 925
    • 926
    • 927
    • 928
    • 929
    • 930
    • 931
    • 932
    • 933
    • 934
    • 935
    • 936
    • 937
    • 938
    • 939
    • 940
    • 941
    • 942
    • 943
    • 944
    • 945
    • 946
    • 947
    • 948
    • 949
    • 950
    • 951
    • 952
    • 953
    • 954
    • 955
    • 956
    • 957
    • 958
    • 959
    • 960
    • 961
    • 962
    • 963
    • 964
    • 965
    • 966
    • 967
    • 968
    • 969
    • 970
    • 971
    • 972
    • 973
    • 974
    • 975
    • 976
    • 977
    • 978
    • 979
    • 980
    • 981
    • 982
    • 983
    • 984
    • 985
    • 986
    • 987
    • 988
    • 989
    • 990
    • 991
    • 992
    • 993
    • 994
    • 995
    • 996
    • 997
    • 998
    • 999
    • 1000
    • 1001
    • 1002
    • 1003
    • 1004
    • 1005
    • 1006
    • 1007
    • 1008
    • 1009
    • 1010
    • 1011
    • 1012
    • 1013
    • 1014
    • 1015
    • 1016
    • 1017
    • 1018
    • 1019
    • 1020
    • 1021
    • 1022
    • 1023
    • 1024
    • 1025
    • 1026
    • 1027
    • 1028
    • 1029
    • 1030
    • 1031
    • 1032
    • 1033
    • 1034
    • 1035
    • 1036
    • 1037
    • 1038
    • 1039
    • 1040
    • 1041
    • 1042
    • 1043
    • 1044
    • 1045
    • 1046
    • 1047
    • 1048
    • 1049
    • 1050
    • 1051
    • 1052
    • 1053
    • 1054
    • 1055
    • 1056
    • 1057
    • 1058
    • 1059
    • 1060
    • 1061
    • 1062
    • 1063
    • 1064
    • 1065
    • 1066
    • 1067
    • 1068
    • 1069
    • 1070
    • 1071
    • 1072
    • 1073
    • 1074
    • 1075
    • 1076
    • 1077
    • 1078
    • 1079
    • 1080
    • 1081
    • 1082
    • 1083
    • 1084
    • 1085
    • 1086
    • 1087
    • 1088
    • 1089
    • 1090
    • 1091
    • 1092
    • 1093
    • 1094
    • 1095
    • 1096
    • 1097
    • 1098
    • 1099
    • 1100
    • 1101
    • 1102
    • 1103
    • 1104
    • 1105
    • 1106
    • 1107
    • 1108
    • 1109
    • 1110
    • 1111
    • 1112
    • 1113
    • 1114
    • 1115
    • 1116
    • 1117
    • 1118
    • 1119
    • 1120
    • 1121
    • 1122
    • 1123
    • 1124
    • 1125
    • 1126
    • 1127
    • 1128
    • 1129
    • 1130
    • 1131
    • 1132
    • 1133
    • 1134
    • 1135
    • 1136
    • 1137
    • 1138
    • 1139
    • 1140
    • 1141
    • 1142
    • 1143
    • 1144
    • 1145
    • 1146
    • 1147
    • 1148
    • 1149
    • 1150
    • 1151
    • 1152
    • 1153
    • 1154
    • 1155
    • 1156
    • 1157
    • 1158
    • 1159
    • 1160
    • 1161
    • 1162
    • 1163
    • 1164
    • 1165
    • 1166
    • 1167
    • 1168
    • 1169
    • 1170
    • 1171
    • 1172
    • 1173
    • 1174
    • 1175
    • 1176
    • 1177
    • 1178
    • 1179
    • 1180
    • 1181
    • 1182
    • 1183
    • 1184
    • 1185
    • 1186
    • 1187
    • 1188
    • 1189
    • 1190
    • 1191
    • 1192
    • 1193
    • 1194
    • 1195
    • 1196
    • 1197
    • 1198
    • 1199
    • 1200
    • 1201
    • 1202
    • 1203
    • 1204
    • 1205
    • 1206
    • 1207
    • 1208
    • 1209
    • 1210
    • 1211
    • 1212
    • 1213
    • 1214
    • 1215
    • 1216
    • 1217
    • 1218
    • 1219
    • 1220
    • 1221
    • 1222
    • 1223
    • 1224
    • 1225
    • 1226
    • 1227
    • 1228
    • 1229
    • 1230
    • 1231
    • 1232
    • 1233
    • 1234
    • 1235
    • 1236
    • 1237
    • 1238
    • 1239
    • 1240
    • 1241
    • 1242
    • 1243
    • 1244
    • 1245
    • 1246
    • 1247
    • 1248
    • 1249
    • 1250
    • 1251
    • 1252
    • 1253
    • 1254
    • 1255
    • 1256
    • 1257
    • 1258
    • 1259
    • 1260
    • 1261
    • 1262
    • 1263
    • 1264
    • 1265
    • 1266
    • 1267
    • 1268
    • 1269
    • 1270
    • 1271
    • 1272
    • 1273
    • 1274
    • 1275
    • 1276
    • 1277
    • 1278
    • 1279
    • 1280
    • 1281
    • 1282
    • 1283
    • 1284
    • 1285
    • 1286
    • 1287
    • 1288
    • 1289
    • 1290
    • 1291
    • 1292
    • 1293
    • 1294
    • 1295
    • 1296
    • 1297
    • 1298
    • 1299
    • 1300
    • 1301
    • 1302
    • 1303
    • 1304
    • 1305
    • 1306
    • 1307
    • 1308
    • 1309
    • 1310
    • 1311
    • 1312
    • 1313
    • 1314
    • 1315
    • 1316
    • 1317
    • 1318
    • 1319
    • 1320
    • 1321
    • 1322
    • 1323
    • 1324
    • 1325
    • 1326
    • 1327
    • 1328
    • 1329
    • 1330
    • 1331
    • 1332
    • 1333
    • 1334
    • 1335
    • 1336
    • 1337
    • 1338
    • 1339
    • 1340
    • 1341
    • 1342
    • 1343
    • 1344
    • 1345
    • 1346
    • 1347
    • 1348
    • 1349
    • 1350
    • 1351
    • 1352
    • 1353
    • 1354
    • 1355
    • 1356
    • 1357
    • 1358
    • 1359
    • 1360
    • 1361
    • 1362
    • 1363
    • 1364
    • 1365
    • 1366
    • 1367
    • 1368
    • 1369
    • 1370
    • 1371
    • 1372
    • 1373
    • 1374
    • 1375
    • 1376
    • 1377
    • 1378
    • 1379
    • 1380
    • 1381
    • 1382
    • 1383
    • 1384
    • 1385
    • 1386
    • 1387
    • 1388
    • 1389
    • 1390
    • 1391
    • 1392
    • 1393
    • 1394
    • 1395
    • 1396
    • 1397
    • 1398
    • 1399
    • 1400
    • 1401
    • 1402
    • 1403
    • 1404
    • 1405
    • 1406
    • 1407
    • 1408
    • 1409
    • 1410
    • 1411
    • 1412
    • 1413
    • 1414
    • 1415
    • 1416
    • 1417
    • 1418
    • 1419
    • 1420
    • 1421
    • 1422
    • 1423
    • 1424
    • 1425
    • 1426
    • 1427
    • 1428
    • 1429
    • 1430
    • 1431
    • 1432
    • 1433
    • 1434
    • 1435
    • 1436
    • 1437
    • 1438
    • 1439
    • 1440
    • 1441
    • 1442
    • 1443
    • 1444
    • 1445
    • 1446
    • 1447
    • 1448
    • 1449
    • 1450
    • 1451
    • 1452
    • 1453
    • 1454
    • 1455
    • 1456
    • 1457
    • 1458
    • 1459
    • 1460
    • 1461
    • 1462
    • 1463
    • 1464
    • 1465
    • 1466
    • 1467
    • 1468
    • 1469
    • 1470
    • 1471
    • 1472
    • 1473
    • 1474
    • 1475
    • 1476
    • 1477
    • 1478
    • 1479
    • 1480
    • 1481
    • 1482
    • 1483
    • 1484
    • 1485
    • 1486
    • 1487
    • 1488
    • 1489
    • 1490
    • 1491
    • 1492
    • 1493
    • 1494
    • 1495
    • 1496
    • 1497
    • 1498
    • 1499
    • 1500
    • 1501
    • 1502
    • 1503
    • 1504
    • 1505
    • 1506
    • 1507
    • 1508
    • 1509
    • 1510
    • 1511
    • 1512
    • 1513
    • 1514
    • 1515
    • 1516
    • 1517
    • 1518
    • 1519
    • 1520
    • 1521
    • 1522
    • 1523
    • 1524
    • 1525
    • 1526
    • 1527
    • 1528
    • 1529
    • 1530
    • 1531
    • 1532
    • 1533
    • 1534
    • 1535
    • 1536
    • 1537
    • 1538
    • 1539
    • 1540
    • 1541
    • 1542
    • 1543
    • 1544
    • 1545
    • 1546
    • 1547
    • 1548
    • 1549
    • 1550
    • 1551
    • 1552
    • 1553
    • 1554
    • 1555
    • 1556
    • 1557
    • 1558
    • 1559
    • 1560
    • 1561
    • 1562
    • 1563
    • 1564
    • 1565
    • 1566
    • 1567
    • 1568
    • 1569
    • 1570
    • 1571
    • 1572
    • 1573
    • 1574
    • 1575
    • 1576
    • 1577
    • 1578
    • 1579
    • 1580
    • 1581
    • 1582
    • 1583
    • 1584
    • 1585
    • 1586
    • 1587
    • 1588
    • 1589
    • 1590
    • 1591
    • 1592
    • 1593
    • 1594
    • 1595
    • 1596
    • 1597
    • 1598
    • 1599
    • 1600
    • 1601
    • 1602
    • 1603
    • 1604
    • 1605
    • 1606
    • 1607
    • 1608
    • 1609
    • 1610
    • 1611
    • 1612
    • 1613
    • 1614
    • 1615
    • 1616
    • 1617
    • 1618
    • 1619
    • 1620
    • 1621
    • 1622
    • 1623
    • 1624
    • 1625
    • 1626
    • 1627
    • 1628
    • 1629
    • 1630
    • 1631
    • 1632
    • 1633
    • 1634
    • 1635
    • 1636
    • 1637
    • 1638
    • 1639
    • 1640
    • 1641
    • 1642
    • 1643
    • 1644
    • 1645
    • 1646
    • 1647
    • 1648
    • 1649
    • 1650
    • 1651
    • 1652
    • 1653
    • 1654
    • 1655
    • 1656
    • 1657
    • 1658
    • 1659
    • 1660
    • 1661
    • 1662
    • 1663
    • 1664
    • 1665
    • 1666
    • 1667
    • 1668
    • 1669
    • 1670
    • 1671
    • 1672
    • 1673
    • 1674
    • 1675
    • 1676
    • 1677
    • 1678
    • 1679
    • 1680
    • 1681
    • 1682
    • 1683
    • 1684
    • 1685
    • 1686
    • 1687
    • 1688
    • 1689
    • 1690
    • 1691
    • 1692
    • 1693
    • 1694
    • 1695
    • 1696
    • 1697
    • 1698
    • 1699
    • 1700
    • 1701
    • 1702
    • 1703
    • 1704
    • 1705
    • 1706
    • 1707
    • 1708
    • 1709
    • 1710
    • 1711
    • 1712
    • 1713
    • 1714
    • 1715
    • 1716
    • 1717
    • 1718
    • 1719
    • 1720
    • 1721
    • 1722
    • 1723
    • 1724
    • 1725
    • 1726
    • 1727
    • 1728
    • 1729
    • 1730
    • 1731
    • 1732
    • 1733
    • 1734
    • 1735
    • 1736
    • 1737
    • 1738
    • 1739
    • 1740
    • 1741
    • 1742
    • 1743
    • 1744
    • 1745
    • 1746
    • 1747
    • 1748
    • 1749
    • 1750
    • 1751
    • 1752
    • 1753
    • 1754
    • 1755
    • 1756
    • 1757
    • 1758
    • 1759
    • 1760
    • 1761
    • 1762
    • 1763
    • 1764
    • 1765
    • 1766
    • 1767
    • 1768
    • 1769
    • 1770
    • 1771
    • 1772
    • 1773
    • 1774
    • 1775
    • 1776
    • 1777
    • 1778
    • 1779
    • 1780
    • 1781
    • 1782
    • 1783
    • 1784
    • 1785
    • 1786
    • 1787
    • 1788
    • 1789
    • 1790
    • 1791
    • 1792
    • 1793
    • 1794
    • 1795
    • 1796
    • 1797
    • 1798
    • 1799
    • 1800
    • 1801
    • 1802
    • 1803
    • 1804
    • 1805
    • 1806
    • 1807
    • 1808
    • 1809
    • 1810
    • 1811
    • 1812
    • 1813
    • 1814
    • 1815
    • 1816
    • 1817
    • 1818
    • 1819
    • 1820
    • 1821
    • 1822
    • 1823
    • 1824
    • 1825
    • 1826
    • 1827
    • 1828
    • 1829
    • 1830
    • 1831
    • 1832
    • 1833
    • 1834
    • 1835
    • 1836
    • 1837
    • 1838
    • 1839
    • 1840
    • 1841
    • 1842
    • 1843
    • 1844
    • 1845
    • 1846
    • 1847
    • 1848
    • 1849
    • 1850
    • 1851
    • 1852
    • 1853
    • 1854
    • 1855
    • 1856
    • 1857
    • 1858
    • 1859
    • 1860
    • 1861
    • 1862
    • 1863
    • 1864
    • 1865
    • 1866
    • 1867
    • 1868
    • 1869
    • 1870
    • 1871
    • 1872
    • 1873
    • 1874
    • 1875
    • 1876
    • 1877
    • 1878
    • 1879
    • 1880
    • 1881
    • 1882
    • 1883
    • 1884
    • 1885
    • 1886
    • 1887
    • 1888
    • 1889
    • 1890
    • 1891
    • 1892
    • 1893
    • 1894
    • 1895
    • 1896
    • 1897
    • 1898
    • 1899
    • 1900
    • 1901
    • 1902
    • 1903
    • 1904
    • 1905
    • 1906
    • 1907
    • 1908
    • 1909
    • 1910
    • 1911
    • 1912
    • 1913
    • 1914
    • 1915
    • 1916
    • 1917
    • 1918
    • 1919
    • 1920
    • 1921
    • 1922
    • 1923
    • 1924
    • 1925
    • 1926
    • 1927
    • 1928
    • 1929
    • 1930
    • 1931
    • 1932
    • 1933
    • 1934
    • 1935
    • 1936
    • 1937
    • 1938
    • 1939
    • 1940
    • 1941
    • 1942
    • 1943
    • 1944
    • 1945
    • 1946
    • 1947
    • 1948
    • 1949
    • 1950
    • 1951
    • 1952
    • 1953
    • 1954
    • 1955
    • 1956
    • 1957
    • 1958
    • 1959
    • 1960
    • 1961
    • 1962
    • 1963
    • 1964
    • 1965
    • 1966
    • 1967
    • 1968
    • 1969
    • 1970
    • 1971
    • 1972
    • 1973
    • 1974
    • 1975
    • 1976
    • 1977
    • 1978
    • 1979
    • 1980
    • 1981
    • 1982
    • 1983
    • 1984
    • 1985
    • 1986
    • 1987
    • 1988
    • 1989
    • 1990
    • 1991
    • 1992
    • 1993
    • 1994
    • 1995
    • 1996
    • 1997
    • 1998
    • 1999
    • 2000
    • 2001
    • 2002
    • 2003
    • 2004
    • 2005
    • 2006
    • 2007
    • 2008
    • 2009
    • 2010
    • 2011
    • 2012
    • 2013
    • 2014
    • 2015
    • 2016
    • 2017
    • 2018
    • 2019
    • 2020
    • 2021
    • 2022
    • 2023
    • 2024
    • 2025
    • 2026
    • 2027
    • 2028
    • 2029
    • 2030
    • 2031
    • 2032
    • 2033
    • 2034
    • 2035
    • 2036
    • 2037
    • 2038
    • 2039
    • 2040
    • 2041
    • 2042
    • 2043
    • 2044
    • 2045
    • 2046
    • 2047
    • 2048
    • 2049
    • 2050
    • 2051
    • 2052
    • 2053
    • 2054
    • 2055
    • 2056
    • 2057
    • 2058
    • 2059
    • 2060
    • 2061
    • 2062
    • 2063
    • 2064
    • 2065
    • 2066
    • 2067
    • 2068
    • 2069
    • 2070
    • 2071
    • 2072
    • 2073
    • 2074
    • 2075
    • 2076
    • 2077
    • 2078
    • 2079
    • 2080
    • 2081
    • 2082
    • 2083
    • 2084
    • 2085
    • 2086
    • 2087
    • 2088
    • 2089
    • 2090
    • 2091
    • 2092
    • 2093
    • 2094
    • 2095
    • 2096
    • 2097
    • 2098
    • 2099
    • 2100
    • 2101
    • 2102
    • 2103
    • 2104
    • 2105
    • 2106
    • 2107
    • 2108
    • 2109
    • 2110
    • 2111
    • 2112
    • 2113
    • 2114
    • 2115
    • 2116
    • 2117
    • 2118
    • 2119
    • 2120
    • 2121
    • 2122
    • 2123
    • 2124
    • 2125
    • 2126
    • 2127
    • 2128
    • 2129
    • 2130
    • 2131
    • 2132
    • 2133
    • 2134
    • 2135
    • 2136
    • 2137
    • 2138
    • 2139
    • 2140
    • 2141
    • 2142
    • 2143
    • 2144
    • 2145
    • 2146
    • 2147
    • 2148
    • 2149
    • 2150
    • 2151
    • 2152
    • 2153
    • 2154
    • 2155
    • 2156
    • 2157
    • 2158
    • 2159
    • 2160
    • 2161
    • 2162
    • 2163
    • 2164
    • 2165
    • 2166
    • 2167
    • 2168
    • 2169
    • 2170
    • 2171
    • 2172
    • 2173
    • 2174
    • 2175
    • 2176
    • 2177
    • 2178
    • 2179
    • 2180
    • 2181
    • 2182
    • 2183
    • 2184
    • 2185
    • 2186
    • 2187
    • 2188
    • 2189
    • 2190
    • 2191
    • 2192
    • 2193
    • 2194
    • 2195
    • 2196
    • 2197
    • 2198
    • 2199
    • 2200
    • 2201
    • 2202
    • 2203
    • 2204
    • 2205
    • 2206
    • 2207
    • 2208
    • 2209
    • 2210
    • 2211
    • 2212
    • 2213
    • 2214
    • 2215
    • 2216
    • 2217
    • 2218
    • 2219
    • 2220
    • 2221
    • 2222
    • 2223
    • 2224
    • 2225
    • 2226
    • 2227
    • 2228
    • 2229
    • 2230
    • 2231
    • 2232
    • 2233
    • 2234
    • 2235
    • 2236
    • 2237
    • 2238
    • 2239
    • 2240
    • 2241
    • 2242
    • 2243
    • 2244
    • 2245
    • 2246
    • 2247
    • 2248
    • 2249
    • 2250
    • 2251
    • 2252
    • 2253
    • 2254
    • 2255
    • 2256
    • 2257
    • 2258
    • 2259
    • 2260
    • 2261
    • 2262
    • 2263
    • 2264
    • 2265
    • 2266
    • 2267
    • 2268
    • 2269
    • 2270
    • 2271
    • 2272
    • 2273
    • 2274
    • 2275
    • 2276
    • 2277
    • 2278
    • 2279
    • 2280
    • 2281
    • 2282
    • 2283
    • 2284
    • 2285
    • 2286
    • 2287
    • 2288
    • 2289
    • 2290
    • 2291
    • 2292
    • 2293
    • 2294
    • 2295
    • 2296
    • 2297
    • 2298
    • 2299
    • 2300
    • 2301
    • 2302
    • 2303
    • 2304
    • 2305
    • 2306
    • 2307
    • 2308
    • 2309
    • 2310
    • 2311
    • 2312
    • 2313
    • 2314
    • 2315
    • 2316
    • 2317
    • 2318
    • 2319
    • 2320
    • 2321
    • 2322
    • 2323
    • 2324
    • 2325
    • 2326
    • 2327
    • 2328
    • 2329
    • 2330
    • 2331
    • 2332
    • 2333
    • 2334
    • 2335
    • 2336
    • 2337
    • 2338
    • 2339
    • 2340
    • 2341
    • 2342
    • 2343
    • 2344
    • 2345
    • 2346
    • 2347
    • 2348
    • 2349
    • 2350
    • 2351
    • 2352
    • 2353
    • 2354
    • 2355
    • 2356
    • 2357
    • 2358
    • 2359
    • 2360
    • 2361
    • 2362
    • 2363
    • 2364
    • 2365
    • 2366
    • 2367
    • 2368
    • 2369
    • 2370
    • 2371
    • 2372
    • 2373
    • 2374
    • 2375
    • 2376
    • 2377
    • 2378
    • 2379
    • 2380
    • 2381
    • 2382
    • 2383
    • 2384
    • 2385
    • 2386
    • 2387
    • 2388
    • 2389
    • 2390
    • 2391
    • 2392
    • 2393
    • 2394
    • 2395
    • 2396
    • 2397
    • 2398
    • 2399
    • 2400
    • 2401
    • 2402
    • 2403
    • 2404
    • 2405
    • 2406
    • 2407
    • 2408
    • 2409
    • 2410
    • 2411
    • 2412
    • 2413
    • 2414
    • 2415
    • 2416
    • 2417
    • 2418
    • 2419
    • 2420
    • 2421
    • 2422
    • 2423
    • 2424
    • 2425
    • 2426
    • 2427
    • 2428
    • 2429
    • 2430
    • 2431
    • 2432
    • 2433
    • 2434
    • 2435
    • 2436
    • 2437
    • 2438
    • 2439
    • 2440
    • 2441
    • 2442
    • 2443
    • 2444
    • 2445
    • 2446
    • 2447
    • 2448
    • 2449
    • 2450
    • 2451
    • 2452
    • 2453
    • 2454
    • 2455
    • 2456
    • 2457
    • 2458
    • 2459
    • 2460
    • 2461
    • 2462
    • 2463
    • 2464
    • 2465
    • 2466
    • 2467
    • 2468
    • 2469
    • 2470
    • 2471
    • 2472
    • 2473
    • 2474
    • 2475
    • 2476
    • 2477
    • 2478
    • 2479
    • 2480
    • 2481
    • 2482
    • 2483
    • 2484
    • 2485
    • 2486
    • 2487
    • 2488
    • 2489
    • 2490
    • 2491
    • 2492
    • 2493
    • 2494
    • 2495
    • 2496
    • 2497
    • 2498
    • 2499
    • 2500
    • 2501
    • 2502
    • 2503
    • 2504
    • 2505
    • 2506
    • 2507
    • 2508
    • 2509
    • 2510
    • 2511
    • 2512
    • 2513
    • 2514
    • 2515
    • 2516
    • 2517
    • 2518
    • 2519
    • 2520
    • 2521
    • 2522
    • 2523
    • 2524
    • 2525
    • 2526
    • 2527
    • 2528
    • 2529
    • 2530
    • 2531
    • 2532
    • 2533
    • 2534
    • 2535
    • 2536
    • 2537
    • 2538
    • 2539
    • 2540
    • 2541
    • 2542
    • 2543
    • 2544
    • 2545
    • 2546
    • 2547
    • 2548
    • 2549
    • 2550
    • 2551
    • 2552
    • 2553
    • 2554
    • 2555
    • 2556
    • 2557
    • 2558
    • 2559
    • 2560
    • 2561
    • 2562
    • 2563
    • 2564
    • 2565
    • 2566
    • 2567
    • 2568
    • 2569
    • 2570
    • 2571
    • 2572
    • 2573
    • 2574
    • 2575
    • 2576
    • 2577
    • 2578
    • 2579
    • 2580
    • 2581
    • 2582
    • 2583
    • 2584
    • 2585
    • 2586
    • 2587
    • 2588
    • 2589
    • 2590
    • 2591
    • 2592
    • 2593
    • 2594
    • 2595
    • 2596
    • 2597
    • 2598
    • 2599
    • 2600
    • 2601
    • 2602
    • 2603
    • 2604
    • 2605
    • 2606
    • 2607
    • 2608
    • 2609
    • 2610
    • 2611
    • 2612
    • 2613
    • 2614
    • 2615
    • 2616
    • 2617
    • 2618
    • 2619
    • 2620
    • 2621
    • 2622
    • 2623
    • 2624
    • 2625
    • 2626
    • 2627
    • 2628
    • 2629
    • 2630
    • 2631
    • 2632
    • 2633
    • 2634
    • 2635
    • 2636
    • 2637
    • 2638
    • 2639
    • 2640
    • 2641
    • 2642
    • 2643
    • 2644
    • 2645
    • 2646
    • 2647
    • 2648
    • 2649
    • 2650
    • 2651
    • 2652
    • 2653
    • 2654
    • 2655
    • 2656
    • 2657
    • 2658
    • 2659
    • 2660
    • 2661
    • 2662
    • 2663
    • 2664
    • 2665
    • 2666
    • 2667
    • 2668
    • 2669
    • 2670
    • 2671
    • 2672
    • 2673
    • 2674
    • 2675
    • 2676
    • 2677
    • 2678
    • 2679
    • 2680
    • 2681
    • 2682
    • 2683
    • 2684
    • 2685
    • 2686
    • 2687
    • 2688
    • 2689
    • 2690
    • 2691
    • 2692
    • 2693
    • 2694
    • 2695
    • 2696
    • 2697
    • 2698
    • 2699
    • 2700
    • 2701
    • 2702
    • 2703
    • 2704
    • 2705
    • 2706
    • 2707
    • 2708
    • 2709
    • 2710
    • 2711
    • 2712
    • 2713
    • 2714
    • 2715
    • 2716
    • 2717
    • 2718
    • 2719
    • 2720
    • 2721
    • 2722
    • 2723
    • 2724
    • 2725
    • 2726
    • 2727
    • 2728
    • 2729
    • 2730
    • 2731
    • 2732
    • 2733
    • 2734
    • 2735
    • 2736
    • 2737
    • 2738
    • 2739
    • 2740
    • 2741
    • 2742
    • 2743
    • 2744
    • 2745
    • 2746
    • 2747
    • 2748
    • 2749
    • 2750
    • 2751
    • 2752
    • 2753
    • 2754
    • 2755
    • 2756
    • 2757
    • 2758
    • 2759
    • 2760
    • 2761
    • 2762
    • 2763
    • 2764
    • 2765
    • 2766
    • 2767
    • 2768
    • 2769
    • 2770
    • 2771
    • 2772
    • 2773
    • 2774
    • 2775
    • 2776
    • 2777
    • 2778
    • 2779
    • 2780
    • 2781
    • 2782
    • 2783
    • 2784
    • 2785
    • 2786
    • 2787
    • 2788
    • 2789
    • 2790
    • 2791
    • 2792
    • 2793
    • 2794
    • 2795
    • 2796
    • 2797
    • 2798
    • 2799
    • 2800
    • 2801
    • 2802
    • 2803
    • 2804
    • 2805
    • 2806
    • 2807
    • 2808
    • 2809
    • 2810
    • 2811
    • 2812
    • 2813
    • 2814
    • 2815
    • 2816
    • 2817
    • 2818
    • 2819
    • 2820
    • 2821
    • 2822
    • 2823
    • 2824
    • 2825
    • 2826
    • 2827
    • 2828
    • 2829
    • 2830
    • 2831
    • 2832
    • 2833
    • 2834
    • 2835
    • 2836
    • 2837
    • 2838
    • 2839
    • 2840
    • 2841
    • 2842
    • 2843
    • 2844
    • 2845
    • 2846
    • 2847
    • 2848
    • 2849
    • 2850
    • 2851
    • 2852
    • 2853
    • 2854
    • 2855
    • 2856
    • 2857
    • 2858
    • 2859
    • 2860
    • 2861
    • 2862
    • 2863
    • 2864
    • 2865
    • 2866
    • 2867
    • 2868
    • 2869
    • 2870
    • 2871
    • 2872
    • 2873
    • 2874
    • 2875
    • 2876
    • 2877
    • 2878
    • 2879
    • 2880
    • 2881
    • 2882
    • 2883
    • 2884
    • 2885
    • 2886
    • 2887
    • 2888
    • 2889
    • 2890
    • 2891
    • 2892
    • 2893
    • 2894
    • 2895
    • 2896
    • 2897
    • 2898
    • 2899
    • 2900
    • 2901
    • 2902
    • 2903
    • 2904
    • 2905
    • 2906
    • 2907
    • 2908
    • 2909
    • 2910
    • 2911
    • 2912
    • 2913
    • 2914
    • 2915
    • 2916
    • 2917
    • 2918
    • 2919
    • 2920
    • 2921
    • 2922
    • 2923
    • 2924
    • 2925
    • 2926
    • 2927
    • 2928
    • 2929
    • 2930
    • 2931
    • 2932
    • 2933
    • 2934
    • 2935
    • 2936
    • 2937
    • 2938
    • 2939
    • 2940
    • 2941
    • 2942
    • 2943
    • 2944
    • 2945
    • 2946
    • 2947
    • 2948
    • 2949
    • 2950
    • 2951
    • 2952
    • 2953
    • 2954
    • 2955
    • 2956
    • 2957
    • 2958
    • 2959
    • 2960
    • 2961
    • 2962
    • 2963
    • 2964
    • 2965
    • 2966
    • 2967
    • 2968
    • 2969
    • 2970
    • 2971
    • 2972
    • 2973
    • 2974
    • 2975
    • 2976
  • 相关阅读:
    score_inverse_problems运行环境,pycharm重新安装,jax,jaxlib的GPU版本安装-230831
    Linux 之搭建 arm 的 qemu 模拟器
    Apache Doris性能优化之Join Reorder和Doris Join调优原则
    计算机毕业设计之java+ssm基于个人需求和地域特色的外卖推荐系统
    照片水印怎么去除?这些方法一看就会
    【缓存】Spring全家桶中@CacheEvict无效情况共有以下几种
    猿创征文|GISER开发者必备高能武器库
    买卖股票的最佳时机
    JavaScript大神:我们能对 JavaScript 做的最好事情就是让它退役!
    JAVA毕业设计古玩玉器交易系统计算机源码+lw文档+系统+调试部署+数据库
  • 原文地址:https://blog.csdn.net/gwc791224/article/details/136269490