Files
UnrealEngineUWP/Engine/Source/Editor/BlueprintGraph/Classes/K2Node_GenericCreateObject.h
jordan hoffmann 4b964ea1f7 Fix: Outer Pin of Construct Object from Class should not have an asset picker
- changed pin visual to a "self" style
- made pin default to "self" if there's nothing connected to it
#jira UE-43152
#rb ben.hoffman
#p4v-cherrypick 16552999

[CL 16582225 by jordan hoffmann in ue5-main branch]
2021-06-07 22:20:27 -04:00

39 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "K2Node_ConstructObjectFromClass.h"
#include "K2Node_GenericCreateObject.generated.h"
class UEdGraph;
class FKismetCompilerContext;
class UK2Node_CallFunction;
UCLASS()
class BLUEPRINTGRAPH_API UK2Node_GenericCreateObject : public UK2Node_ConstructObjectFromClass
{
GENERATED_BODY()
//~ Begin UEdGraphNode Interface.
virtual void ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) override;
virtual void EarlyValidation(class FCompilerResultsLog& MessageLog) const override;
virtual bool IsCompatibleWithGraph(const UEdGraph* TargetGraph) const override;
//~ End UEdGraphNode Interface.
virtual bool UseWorldContext() const override { return false; }
virtual bool UseOuter() const override { return true; }
/**
* attaches a self node to the self pin of 'this' if the CallCreateNode function has DefaultToSelf in it's metadata
*
* @param CompilerContext the context to expand in - likely passed from ExpandNode
* @param SourceGraph the graph to expand in - likely passed from ExpandNode
* @param CallCreateNode the CallFunction node that 'this' is imitating
*
* @return true on success.
*/
bool ExpandDefaultToSelfPin(FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph, UK2Node_CallFunction* CallCreateNode);
};