Files
UnrealEngineUWP/Engine/Source/Editor/BlueprintGraph/Private/K2Node_Event.cpp

863 lines
30 KiB
C++
Raw Normal View History

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "K2Node_Event.h"
#include "UObject/UObjectHash.h"
#include "UObject/Interface.h"
#include "UObject/BlueprintsObjectVersion.h"
#include "GameFramework/Actor.h"
#include "GraphEditorSettings.h"
#include "EdGraphSchema_K2.h"
#include "K2Node_CallFunction.h"
#include "K2Node_CreateDelegate.h"
#include "K2Node_FunctionEntry.h"
#include "K2Node_Self.h"
#include "Kismet2/BlueprintEditorUtils.h"
#include "KismetCompilerMisc.h"
#include "KismetCompiler.h"
#include "EventEntryHandler.h"
const FString UK2Node_Event::DelegateOutputName(TEXT("OutputDelegate"));
bool UK2Node_Event::IsCosmeticTickEvent() const
{
// Special case for EventTick/ReceiveTick that is conditionally executed by a separate bool rather than function flag.
static const FName EventTickName(TEXT("ReceiveTick"));
if (EventReference.GetMemberName() == EventTickName)
{
const UBlueprint* Blueprint = GetBlueprint();
if (Blueprint)
{
UClass* BPClass = Blueprint->GeneratedClass;
const AActor* DefaultActor = BPClass ? Cast<const AActor>(BPClass->GetDefaultObject()) : NULL;
if (DefaultActor && !DefaultActor->AllowReceiveTickEventOnDedicatedServer())
{
return true;
}
}
}
return false;
}
#define LOCTEXT_NAMESPACE "K2Node_Event"
UK2Node_Event::UK2Node_Event(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
FunctionFlags = 0;
}
void UK2Node_Event::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2842642 on 2016/01/25 by Maciej.Mroz Blueprint C++ Conversion: fixed dependency (headers) list builder Change 2842648 on 2016/01/25 by Maciej.Mroz AssetPtr has implicit constructor from StringReference Change 2842652 on 2016/01/25 by Maciej.Mroz Minor improvements in Orion headers. Necessary to compile the project with converted Blueprints Change 2842653 on 2016/01/25 by Maciej.Mroz Blueprint C++ Conversion: Split UberGraph into subfunctions Change 2843917 on 2016/01/26 by Michael.Schoell Replacing variable nodes with other variable nodes will now correctly mark the Blueprint as structurally modified. #jira UE-24925 - Using "Replace variable with..." does not mark a blueprint as needing compilation Change 2844300 on 2016/01/26 by Maciej.Mroz Blueprint C++ Conversion: improvements in constructor - UProperties for inaccessigle variables are reused - Arrays of structs use "StaticStruct()->InitializeStruct.." and diff-serialization. Change 2845536 on 2016/01/27 by Ben.Cosh Refactor of the Blueprint Profiler core to enable execution wire heatmaps. Still to do: - Sequence node handling - spotted as a bug last minute - Some functions still require a refactor, I'll pick this is up in next changes - Alternative statistic display widgets - enable blueprint breakpoints when profiling?! not sure we want this but adding for visibility Change 2845619 on 2016/01/27 by Michael.Schoell BP-Version bump to resolve TODO in K2Node_Event. Change 2845824 on 2016/01/27 by Michael.Schoell BP-Version bump to resolve TODO in K2Node_FunctionEntry. Change 2847390 on 2016/01/28 by Maciej.Mroz AssetPtr constructor from StringReference in explicit Change 2847894 on 2016/01/28 by Maciej.Mroz Blueprint C++ Conversion: Fixed pathologically included headers. Change 2848662 on 2016/01/29 by Ben.Cosh Fix for problems closing the blueprint editor introduced with CL 2845536 #UE-26153 - Unable to open the same blueprint after closing blueprint editor. #UE-26090 - Crash when closing the editor with the blueprint editor open Change 2848922 on 2016/01/29 by Maciej.Mroz Blueprint C++ Conversion: Removed unnecessary switch and StateStack in ubergraph subfunctions Change 2848934 on 2016/01/29 by Maciej.Mroz FEnumEditorUtils::EnsureAllDisplayNamesExist modifies UUserDefinedEnum::DisplayNames only when it's necessary It should fix the "Saving FText XXX which has been initialized from FString at cook time " warning Change 2849251 on 2016/01/29 by Michael.Schoell Fixed issues with the "Set Members..." node for structs not providing modified literals and other by-value data in the output connection. Reworked the compiler to handle terms with bPassedByReference in new ways. Variables will always mark their terms as bPassedByReference and the "Set Members..." node will leverage the value to know whether it needs to create a local output variable on the node or forward the reference. Break nodes will adapt their output terms to reflect the state of the input term, effectively forwarding the bPassedByReference state. #jira UE-24451 - "Set Members..." node does not return by-ref as expected when the input pin is connected to a literal (or otherwise truly by-value) pin. Change 2849263 on 2016/01/29 by Michael.Schoell Submit for missing file from CL# 2849251 Change 2849269 on 2016/01/29 by Michael.Schoell Improvements to localization support in SBlueprintPalette (items in the MyBlueprint window as well as the BP context menu when selecting nodes). Change 2849925 on 2016/01/29 by Mike.Beach Hanlding deferred loading placeholder-classes in UObjectPropertyBase::CheckValidObject (considering placeholder objects valid, when loading with deferring is enabled). Change 2850484 on 2016/01/31 by Maciej.Mroz Fixed crash when converting Widget Blueprint Change 2850485 on 2016/01/31 by Maciej.Mroz Blueprint C++ Conversion: KCST_UnconditionalGoto requires switch, when it's generated by UK2Node_ExecutionSequence Change 2850859 on 2016/02/01 by Ben.Cosh Fix for issue with debug instance filter causing an out of bounds access on the debug function stack array. #UE-25552 - Debugging specific instances of Fortnite's player pawn generic bp causes crashes #Proj UnrealEd Change 2850997 on 2016/02/01 by Maciej.Mroz Blueprint C++ Conversion: Fixed a lot of errors caused by cl#2842642 Change 2851965 on 2016/02/01 by Mike.Beach Preventing pin watches from saving/retaining old split pins that have since been deleted (recombine). #jira UE-26299 [CL 2865780 by Mike Beach in Main branch]
2016-02-12 17:00:45 -05:00
Ar.UsingCustomVersion(FBlueprintsObjectVersion::GUID);
// Fix up legacy nodes that may not yet have a delegate pin
if(Ar.IsLoading())
{
if(Ar.UE4Ver() < VER_UE4_K2NODE_EVENT_MEMBER_REFERENCE)
{
EventReference.SetExternalMember(EventSignatureName_DEPRECATED, EventSignatureClass_DEPRECATED);
}
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) @ 2781164 #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2716841 on 2015/10/05 by Mike.Beach (WIP) Cleaning up how we setup script assets for replacement on cook (aligning more with the Blueprint conversion tool). #codereview Maciej.Mroz Change 2719089 on 2015/10/07 by Maciej.Mroz ToValidCPPIdentifierChars handles propertly '?' char. #codereview Dan.Oconnor Change 2719361 on 2015/10/07 by Maciej.Mroz Generated native code for AnimBPGC - some preliminary changes. Refactor: UAnimBlueprintGeneratedClass is not accessed directly in runtime. It is accessed via UAnimClassInterface interface. Properties USkeletalMeshComponent::AnimBlueprintGeneratedClass and UInterpTrackFloatAnimBPParam::AnimBlueprintClass were changed into "TSubclassOf<UAnimInstance> AnimClass" The UDynamicClass also can deliver the IAnimClassInterface interface. See UAnimClassData, IAnimClassInterface::GetFromClass and UDynamicClass::AnimClassImplementation. #codereview Lina.Halper, Thomas.Sarkanen Change 2719383 on 2015/10/07 by Maciej.Mroz Debug-only code removed Change 2720528 on 2015/10/07 by Dan.Oconnor Fix for determinsitc cooking of async tasks and load asset nodes #codereview Mike.Beach, Maciej.Mroz Change 2721273 on 2015/10/08 by Maciej.Mroz Blueprint Compiler Cpp Backend - Anim Blueprints can be converted - Various fixes/improvements Change 2721310 on 2015/10/08 by Maciej.Mroz refactor (cl#2719361) - no "auto" keyword Change 2721727 on 2015/10/08 by Mike.Beach (WIP) Setup the cook commandlet so it handles converted assets, replacing them with generated classes. - Refactored the conversion manifest (using a map over an array) - Centralized destination paths into a helper struct (for the manifest) - Generating an Editor module that automatically hooks into the cook process when enabled - Loading and applying native replacments for the cook Change 2723276 on 2015/10/09 by Michael.Schoell Blueprints duplicated for PIE will no longer register as dependencies to other Blueprint. #jira UE-16695 - Editor freezes then crashes while attempting to save during PIE #jira UE-21614 - [CrashReport] Crash while saving during PIE - FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:736 Change 2724345 on 2015/10/11 by Ben.Cosh Blueprint profiler at first pass, this includes the ability to instrument specific blueprints with realtime editor stat display. #UEBP-21 - Profiling data capture and storage #UEBP-13 - Performance capture landing page #Branch UE4 #Proj BlueprintProfiler, BlueprintGraph, EditorStyle, Kismet, UnrealEd, CoreUObject, Engine Change 2724613 on 2015/10/12 by Ben.Cosh Incremental update for blueprint profiler to fix the way some of the reported stats cascade through events and branches and additionally some missed bits of code are refactored/removed. #Branch UE4 #Proj BlueprintProfiler #info Whilst looking into this I spotted the reason why the stats seem so erratic, There appears to be an issue with FText's use of EXPERIMENTAL_TEXT_FAST_DECIMAL_FORMAT which I have reported, but ideally disable this locally until a fix is integrated. Change 2724723 on 2015/10/12 by Maciej.Mroz Constructor of a dynamic class creates CDO. #codereview Robert.Manuszewski Change 2725108 on 2015/10/12 by Mike.Beach [UE-21891] Minor fix to the array shuffle() function; now processes the last entry like all the others. Change 2726358 on 2015/10/13 by Maciej.Mroz UDataTable is properly saved even if its RowStruct is null. https://udn.unrealengine.com/questions/264064/crash-using-hotreload-in-custom-datatable-cdo-clas.html Change 2727395 on 2015/10/13 by Mike.Beach (WIP) Second pass on the Blueprint conversion pipeline; setting it up for more optimal (speedier) performance. * Using stubs for replacements (rather than loading dynamic replacement). * Giving the cook commandlet more control (so a conversion could be ran directly). * Now logging replacements by old object path (to account for UPackage replacement queries). * Fix for [UE-21947], unshelved from CL 2724944 (by Maciej.Mroz). #codereview Maciej.Mroz Change 2727484 on 2015/10/13 by Mike.Beach [UE-22008] Fixing up comment/tooltip typo for UActorComponent::bAutoActivate. Change 2727527 on 2015/10/13 by Mike.Beach Downgrading an inactionable EdGraph warning, while adding more info so we could possibly determine what's happening. Change 2727702 on 2015/10/13 by Dan.Oconnor Fix for crash in UDelegateProperty::GetCPPType when called on a function with no OwnerClass (events) Change 2727968 on 2015/10/14 by Maciej.Mroz Since ConstructorHelpers::FClassFinder is usually static, the loaded class should be in root set, to prevent the pointer stored in ConstructorHelpers::FClassFinder from being obsolete. FindOrLoadClass behaves now like FindOrLoadObject. #codereview Robert.Manuszewski, Nick.Whiting Change 2728139 on 2015/10/14 by Phillip.Kavan
2015-11-25 18:47:20 -05:00
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2842642 on 2016/01/25 by Maciej.Mroz Blueprint C++ Conversion: fixed dependency (headers) list builder Change 2842648 on 2016/01/25 by Maciej.Mroz AssetPtr has implicit constructor from StringReference Change 2842652 on 2016/01/25 by Maciej.Mroz Minor improvements in Orion headers. Necessary to compile the project with converted Blueprints Change 2842653 on 2016/01/25 by Maciej.Mroz Blueprint C++ Conversion: Split UberGraph into subfunctions Change 2843917 on 2016/01/26 by Michael.Schoell Replacing variable nodes with other variable nodes will now correctly mark the Blueprint as structurally modified. #jira UE-24925 - Using "Replace variable with..." does not mark a blueprint as needing compilation Change 2844300 on 2016/01/26 by Maciej.Mroz Blueprint C++ Conversion: improvements in constructor - UProperties for inaccessigle variables are reused - Arrays of structs use "StaticStruct()->InitializeStruct.." and diff-serialization. Change 2845536 on 2016/01/27 by Ben.Cosh Refactor of the Blueprint Profiler core to enable execution wire heatmaps. Still to do: - Sequence node handling - spotted as a bug last minute - Some functions still require a refactor, I'll pick this is up in next changes - Alternative statistic display widgets - enable blueprint breakpoints when profiling?! not sure we want this but adding for visibility Change 2845619 on 2016/01/27 by Michael.Schoell BP-Version bump to resolve TODO in K2Node_Event. Change 2845824 on 2016/01/27 by Michael.Schoell BP-Version bump to resolve TODO in K2Node_FunctionEntry. Change 2847390 on 2016/01/28 by Maciej.Mroz AssetPtr constructor from StringReference in explicit Change 2847894 on 2016/01/28 by Maciej.Mroz Blueprint C++ Conversion: Fixed pathologically included headers. Change 2848662 on 2016/01/29 by Ben.Cosh Fix for problems closing the blueprint editor introduced with CL 2845536 #UE-26153 - Unable to open the same blueprint after closing blueprint editor. #UE-26090 - Crash when closing the editor with the blueprint editor open Change 2848922 on 2016/01/29 by Maciej.Mroz Blueprint C++ Conversion: Removed unnecessary switch and StateStack in ubergraph subfunctions Change 2848934 on 2016/01/29 by Maciej.Mroz FEnumEditorUtils::EnsureAllDisplayNamesExist modifies UUserDefinedEnum::DisplayNames only when it's necessary It should fix the "Saving FText XXX which has been initialized from FString at cook time " warning Change 2849251 on 2016/01/29 by Michael.Schoell Fixed issues with the "Set Members..." node for structs not providing modified literals and other by-value data in the output connection. Reworked the compiler to handle terms with bPassedByReference in new ways. Variables will always mark their terms as bPassedByReference and the "Set Members..." node will leverage the value to know whether it needs to create a local output variable on the node or forward the reference. Break nodes will adapt their output terms to reflect the state of the input term, effectively forwarding the bPassedByReference state. #jira UE-24451 - "Set Members..." node does not return by-ref as expected when the input pin is connected to a literal (or otherwise truly by-value) pin. Change 2849263 on 2016/01/29 by Michael.Schoell Submit for missing file from CL# 2849251 Change 2849269 on 2016/01/29 by Michael.Schoell Improvements to localization support in SBlueprintPalette (items in the MyBlueprint window as well as the BP context menu when selecting nodes). Change 2849925 on 2016/01/29 by Mike.Beach Hanlding deferred loading placeholder-classes in UObjectPropertyBase::CheckValidObject (considering placeholder objects valid, when loading with deferring is enabled). Change 2850484 on 2016/01/31 by Maciej.Mroz Fixed crash when converting Widget Blueprint Change 2850485 on 2016/01/31 by Maciej.Mroz Blueprint C++ Conversion: KCST_UnconditionalGoto requires switch, when it's generated by UK2Node_ExecutionSequence Change 2850859 on 2016/02/01 by Ben.Cosh Fix for issue with debug instance filter causing an out of bounds access on the debug function stack array. #UE-25552 - Debugging specific instances of Fortnite's player pawn generic bp causes crashes #Proj UnrealEd Change 2850997 on 2016/02/01 by Maciej.Mroz Blueprint C++ Conversion: Fixed a lot of errors caused by cl#2842642 Change 2851965 on 2016/02/01 by Mike.Beach Preventing pin watches from saving/retaining old split pins that have since been deleted (recombine). #jira UE-26299 [CL 2865780 by Mike Beach in Main branch]
2016-02-12 17:00:45 -05:00
if (Ar.CustomVer(FBlueprintsObjectVersion::GUID) < FBlueprintsObjectVersion::OverridenEventReferenceFixup)
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) @ 2781164 #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2716841 on 2015/10/05 by Mike.Beach (WIP) Cleaning up how we setup script assets for replacement on cook (aligning more with the Blueprint conversion tool). #codereview Maciej.Mroz Change 2719089 on 2015/10/07 by Maciej.Mroz ToValidCPPIdentifierChars handles propertly '?' char. #codereview Dan.Oconnor Change 2719361 on 2015/10/07 by Maciej.Mroz Generated native code for AnimBPGC - some preliminary changes. Refactor: UAnimBlueprintGeneratedClass is not accessed directly in runtime. It is accessed via UAnimClassInterface interface. Properties USkeletalMeshComponent::AnimBlueprintGeneratedClass and UInterpTrackFloatAnimBPParam::AnimBlueprintClass were changed into "TSubclassOf<UAnimInstance> AnimClass" The UDynamicClass also can deliver the IAnimClassInterface interface. See UAnimClassData, IAnimClassInterface::GetFromClass and UDynamicClass::AnimClassImplementation. #codereview Lina.Halper, Thomas.Sarkanen Change 2719383 on 2015/10/07 by Maciej.Mroz Debug-only code removed Change 2720528 on 2015/10/07 by Dan.Oconnor Fix for determinsitc cooking of async tasks and load asset nodes #codereview Mike.Beach, Maciej.Mroz Change 2721273 on 2015/10/08 by Maciej.Mroz Blueprint Compiler Cpp Backend - Anim Blueprints can be converted - Various fixes/improvements Change 2721310 on 2015/10/08 by Maciej.Mroz refactor (cl#2719361) - no "auto" keyword Change 2721727 on 2015/10/08 by Mike.Beach (WIP) Setup the cook commandlet so it handles converted assets, replacing them with generated classes. - Refactored the conversion manifest (using a map over an array) - Centralized destination paths into a helper struct (for the manifest) - Generating an Editor module that automatically hooks into the cook process when enabled - Loading and applying native replacments for the cook Change 2723276 on 2015/10/09 by Michael.Schoell Blueprints duplicated for PIE will no longer register as dependencies to other Blueprint. #jira UE-16695 - Editor freezes then crashes while attempting to save during PIE #jira UE-21614 - [CrashReport] Crash while saving during PIE - FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:736 Change 2724345 on 2015/10/11 by Ben.Cosh Blueprint profiler at first pass, this includes the ability to instrument specific blueprints with realtime editor stat display. #UEBP-21 - Profiling data capture and storage #UEBP-13 - Performance capture landing page #Branch UE4 #Proj BlueprintProfiler, BlueprintGraph, EditorStyle, Kismet, UnrealEd, CoreUObject, Engine Change 2724613 on 2015/10/12 by Ben.Cosh Incremental update for blueprint profiler to fix the way some of the reported stats cascade through events and branches and additionally some missed bits of code are refactored/removed. #Branch UE4 #Proj BlueprintProfiler #info Whilst looking into this I spotted the reason why the stats seem so erratic, There appears to be an issue with FText's use of EXPERIMENTAL_TEXT_FAST_DECIMAL_FORMAT which I have reported, but ideally disable this locally until a fix is integrated. Change 2724723 on 2015/10/12 by Maciej.Mroz Constructor of a dynamic class creates CDO. #codereview Robert.Manuszewski Change 2725108 on 2015/10/12 by Mike.Beach [UE-21891] Minor fix to the array shuffle() function; now processes the last entry like all the others. Change 2726358 on 2015/10/13 by Maciej.Mroz UDataTable is properly saved even if its RowStruct is null. https://udn.unrealengine.com/questions/264064/crash-using-hotreload-in-custom-datatable-cdo-clas.html Change 2727395 on 2015/10/13 by Mike.Beach (WIP) Second pass on the Blueprint conversion pipeline; setting it up for more optimal (speedier) performance. * Using stubs for replacements (rather than loading dynamic replacement). * Giving the cook commandlet more control (so a conversion could be ran directly). * Now logging replacements by old object path (to account for UPackage replacement queries). * Fix for [UE-21947], unshelved from CL 2724944 (by Maciej.Mroz). #codereview Maciej.Mroz Change 2727484 on 2015/10/13 by Mike.Beach [UE-22008] Fixing up comment/tooltip typo for UActorComponent::bAutoActivate. Change 2727527 on 2015/10/13 by Mike.Beach Downgrading an inactionable EdGraph warning, while adding more info so we could possibly determine what's happening. Change 2727702 on 2015/10/13 by Dan.Oconnor Fix for crash in UDelegateProperty::GetCPPType when called on a function with no OwnerClass (events) Change 2727968 on 2015/10/14 by Maciej.Mroz Since ConstructorHelpers::FClassFinder is usually static, the loaded class should be in root set, to prevent the pointer stored in ConstructorHelpers::FClassFinder from being obsolete. FindOrLoadClass behaves now like FindOrLoadObject. #codereview Robert.Manuszewski, Nick.Whiting Change 2728139 on 2015/10/14 by Phillip.Kavan
2015-11-25 18:47:20 -05:00
{
FixupEventReference();
}
}
}
void UK2Node_Event::PostLoad()
{
UK2Node_EditablePinBase::PostLoad();
// Fix up legacy nodes that may not yet have a delegate pin
if (!FindPin(DelegateOutputName))
{
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
CreatePin(EGPD_Output, K2Schema->PC_Delegate, TEXT(""), NULL, false, false, DelegateOutputName);
}
}
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) @ 2781164 #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2716841 on 2015/10/05 by Mike.Beach (WIP) Cleaning up how we setup script assets for replacement on cook (aligning more with the Blueprint conversion tool). #codereview Maciej.Mroz Change 2719089 on 2015/10/07 by Maciej.Mroz ToValidCPPIdentifierChars handles propertly '?' char. #codereview Dan.Oconnor Change 2719361 on 2015/10/07 by Maciej.Mroz Generated native code for AnimBPGC - some preliminary changes. Refactor: UAnimBlueprintGeneratedClass is not accessed directly in runtime. It is accessed via UAnimClassInterface interface. Properties USkeletalMeshComponent::AnimBlueprintGeneratedClass and UInterpTrackFloatAnimBPParam::AnimBlueprintClass were changed into "TSubclassOf<UAnimInstance> AnimClass" The UDynamicClass also can deliver the IAnimClassInterface interface. See UAnimClassData, IAnimClassInterface::GetFromClass and UDynamicClass::AnimClassImplementation. #codereview Lina.Halper, Thomas.Sarkanen Change 2719383 on 2015/10/07 by Maciej.Mroz Debug-only code removed Change 2720528 on 2015/10/07 by Dan.Oconnor Fix for determinsitc cooking of async tasks and load asset nodes #codereview Mike.Beach, Maciej.Mroz Change 2721273 on 2015/10/08 by Maciej.Mroz Blueprint Compiler Cpp Backend - Anim Blueprints can be converted - Various fixes/improvements Change 2721310 on 2015/10/08 by Maciej.Mroz refactor (cl#2719361) - no "auto" keyword Change 2721727 on 2015/10/08 by Mike.Beach (WIP) Setup the cook commandlet so it handles converted assets, replacing them with generated classes. - Refactored the conversion manifest (using a map over an array) - Centralized destination paths into a helper struct (for the manifest) - Generating an Editor module that automatically hooks into the cook process when enabled - Loading and applying native replacments for the cook Change 2723276 on 2015/10/09 by Michael.Schoell Blueprints duplicated for PIE will no longer register as dependencies to other Blueprint. #jira UE-16695 - Editor freezes then crashes while attempting to save during PIE #jira UE-21614 - [CrashReport] Crash while saving during PIE - FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:736 Change 2724345 on 2015/10/11 by Ben.Cosh Blueprint profiler at first pass, this includes the ability to instrument specific blueprints with realtime editor stat display. #UEBP-21 - Profiling data capture and storage #UEBP-13 - Performance capture landing page #Branch UE4 #Proj BlueprintProfiler, BlueprintGraph, EditorStyle, Kismet, UnrealEd, CoreUObject, Engine Change 2724613 on 2015/10/12 by Ben.Cosh Incremental update for blueprint profiler to fix the way some of the reported stats cascade through events and branches and additionally some missed bits of code are refactored/removed. #Branch UE4 #Proj BlueprintProfiler #info Whilst looking into this I spotted the reason why the stats seem so erratic, There appears to be an issue with FText's use of EXPERIMENTAL_TEXT_FAST_DECIMAL_FORMAT which I have reported, but ideally disable this locally until a fix is integrated. Change 2724723 on 2015/10/12 by Maciej.Mroz Constructor of a dynamic class creates CDO. #codereview Robert.Manuszewski Change 2725108 on 2015/10/12 by Mike.Beach [UE-21891] Minor fix to the array shuffle() function; now processes the last entry like all the others. Change 2726358 on 2015/10/13 by Maciej.Mroz UDataTable is properly saved even if its RowStruct is null. https://udn.unrealengine.com/questions/264064/crash-using-hotreload-in-custom-datatable-cdo-clas.html Change 2727395 on 2015/10/13 by Mike.Beach (WIP) Second pass on the Blueprint conversion pipeline; setting it up for more optimal (speedier) performance. * Using stubs for replacements (rather than loading dynamic replacement). * Giving the cook commandlet more control (so a conversion could be ran directly). * Now logging replacements by old object path (to account for UPackage replacement queries). * Fix for [UE-21947], unshelved from CL 2724944 (by Maciej.Mroz). #codereview Maciej.Mroz Change 2727484 on 2015/10/13 by Mike.Beach [UE-22008] Fixing up comment/tooltip typo for UActorComponent::bAutoActivate. Change 2727527 on 2015/10/13 by Mike.Beach Downgrading an inactionable EdGraph warning, while adding more info so we could possibly determine what's happening. Change 2727702 on 2015/10/13 by Dan.Oconnor Fix for crash in UDelegateProperty::GetCPPType when called on a function with no OwnerClass (events) Change 2727968 on 2015/10/14 by Maciej.Mroz Since ConstructorHelpers::FClassFinder is usually static, the loaded class should be in root set, to prevent the pointer stored in ConstructorHelpers::FClassFinder from being obsolete. FindOrLoadClass behaves now like FindOrLoadObject. #codereview Robert.Manuszewski, Nick.Whiting Change 2728139 on 2015/10/14 by Phillip.Kavan
2015-11-25 18:47:20 -05:00
void UK2Node_Event::PostDuplicate(bool bDuplicateForPIE)
{
Super::PostDuplicate(bDuplicateForPIE);
if (!bDuplicateForPIE)
{
FixupEventReference();
}
}
FNodeHandlingFunctor* UK2Node_Event::CreateNodeHandler(FKismetCompilerContext& CompilerContext) const
{
return new FKCHandler_EventEntry(CompilerContext);
}
FLinearColor UK2Node_Event::GetNodeTitleColor() const
{
return GetDefault<UGraphEditorSettings>()->EventNodeTitleColor;
}
FText UK2Node_Event::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
if (bOverrideFunction || (CustomFunctionName == NAME_None))
{
FText FunctionName = FText::FromName(EventReference.GetMemberName()); // If we fail to find the function, still want to write something on the node.
if (UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode()))
{
FunctionName = UEdGraphSchema_K2::GetFriendlySignatureName(Function);
}
FFormatNamedArguments Args;
Args.Add(TEXT("FunctionName"), FunctionName);
FText Title = FText::Format(NSLOCTEXT("K2Node", "Event_Name", "Event {FunctionName}"), Args);
if(TitleType == ENodeTitleType::FullTitle && EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) != nullptr && EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->IsChildOf(UInterface::StaticClass()))
{
const FText SignatureClassAsText = FBlueprintEditorUtils::GetFriendlyClassDisplayName(EventReference.GetMemberParentClass(GetBlueprintClassFromNode()));
FFormatNamedArguments FullTitleArgs;
FullTitleArgs.Add(TEXT("Title"), Title);
FullTitleArgs.Add(TEXT("InterfaceClass"), SignatureClassAsText);
Title = FText::Format(LOCTEXT("EventFromInterface", "{Title}\nFrom {InterfaceClass}"), FullTitleArgs);
}
return Title;
}
else
{
return FText::FromName(CustomFunctionName);
}
}
FText UK2Node_Event::GetTooltipText() const
{
UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode());
if (CachedTooltip.IsOutOfDate(this) && (Function != nullptr))
{
CachedTooltip.SetCachedText(FText::FromString(UK2Node_CallFunction::GetDefaultTooltipForFunction(Function)), this);
if (bOverrideFunction || (CustomFunctionName == NAME_None))
{
FFormatNamedArguments Args;
Args.Add(TEXT("FunctionTooltip"), (FText&)CachedTooltip);
//@TODO: KISMETREPLICATION: Should do this for events with a custom function name, if it's a newly introduced replicating thingy
if (Function->HasAllFunctionFlags(FUNC_BlueprintCosmetic) || IsCosmeticTickEvent())
{
Args.Add(
TEXT("ClientString"),
NSLOCTEXT("K2Node", "ClientEvent", "\n\nCosmetic. 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("Event_SubtitledTooltip", "{FunctionTooltip}\n\n{ClientString}"), Args), this);
}
else if(Function->HasAllFunctionFlags(FUNC_BlueprintAuthorityOnly))
{
Args.Add(
TEXT("ClientString"),
NSLOCTEXT("K2Node", "ServerEvent", "Authority Only. This event only fires on the server.")
);
// FText::Format() is slow, so we cache this to save on performance
CachedTooltip.SetCachedText(FText::Format(LOCTEXT("Event_SubtitledTooltip", "{FunctionTooltip}\n\n{ClientString}"), Args), this);
}
}
}
return CachedTooltip;
}
FText UK2Node_Event::GetKeywords() const
{
FText Keywords;
UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode());
if (Function != NULL)
{
Keywords = UK2Node_CallFunction::GetKeywordsForFunction( Function );
}
return Keywords;
}
FString UK2Node_Event::GetDocumentationLink() const
{
if ( UClass* EventSignatureClass = EventReference.GetMemberParentClass(GetBlueprintClassFromNode()))
{
return FString::Printf(TEXT("Shared/Types/%s%s"), EventSignatureClass->GetPrefixCPP(), *EventSignatureClass->GetName());
}
return TEXT("");
}
FString UK2Node_Event::GetDocumentationExcerptName() const
{
return EventReference.GetMemberName().ToString();
}
void UK2Node_Event::PostReconstructNode()
{
UpdateDelegatePin();
Super::PostReconstructNode();
}
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) @ 2781164 #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2716841 on 2015/10/05 by Mike.Beach (WIP) Cleaning up how we setup script assets for replacement on cook (aligning more with the Blueprint conversion tool). #codereview Maciej.Mroz Change 2719089 on 2015/10/07 by Maciej.Mroz ToValidCPPIdentifierChars handles propertly '?' char. #codereview Dan.Oconnor Change 2719361 on 2015/10/07 by Maciej.Mroz Generated native code for AnimBPGC - some preliminary changes. Refactor: UAnimBlueprintGeneratedClass is not accessed directly in runtime. It is accessed via UAnimClassInterface interface. Properties USkeletalMeshComponent::AnimBlueprintGeneratedClass and UInterpTrackFloatAnimBPParam::AnimBlueprintClass were changed into "TSubclassOf<UAnimInstance> AnimClass" The UDynamicClass also can deliver the IAnimClassInterface interface. See UAnimClassData, IAnimClassInterface::GetFromClass and UDynamicClass::AnimClassImplementation. #codereview Lina.Halper, Thomas.Sarkanen Change 2719383 on 2015/10/07 by Maciej.Mroz Debug-only code removed Change 2720528 on 2015/10/07 by Dan.Oconnor Fix for determinsitc cooking of async tasks and load asset nodes #codereview Mike.Beach, Maciej.Mroz Change 2721273 on 2015/10/08 by Maciej.Mroz Blueprint Compiler Cpp Backend - Anim Blueprints can be converted - Various fixes/improvements Change 2721310 on 2015/10/08 by Maciej.Mroz refactor (cl#2719361) - no "auto" keyword Change 2721727 on 2015/10/08 by Mike.Beach (WIP) Setup the cook commandlet so it handles converted assets, replacing them with generated classes. - Refactored the conversion manifest (using a map over an array) - Centralized destination paths into a helper struct (for the manifest) - Generating an Editor module that automatically hooks into the cook process when enabled - Loading and applying native replacments for the cook Change 2723276 on 2015/10/09 by Michael.Schoell Blueprints duplicated for PIE will no longer register as dependencies to other Blueprint. #jira UE-16695 - Editor freezes then crashes while attempting to save during PIE #jira UE-21614 - [CrashReport] Crash while saving during PIE - FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:736 Change 2724345 on 2015/10/11 by Ben.Cosh Blueprint profiler at first pass, this includes the ability to instrument specific blueprints with realtime editor stat display. #UEBP-21 - Profiling data capture and storage #UEBP-13 - Performance capture landing page #Branch UE4 #Proj BlueprintProfiler, BlueprintGraph, EditorStyle, Kismet, UnrealEd, CoreUObject, Engine Change 2724613 on 2015/10/12 by Ben.Cosh Incremental update for blueprint profiler to fix the way some of the reported stats cascade through events and branches and additionally some missed bits of code are refactored/removed. #Branch UE4 #Proj BlueprintProfiler #info Whilst looking into this I spotted the reason why the stats seem so erratic, There appears to be an issue with FText's use of EXPERIMENTAL_TEXT_FAST_DECIMAL_FORMAT which I have reported, but ideally disable this locally until a fix is integrated. Change 2724723 on 2015/10/12 by Maciej.Mroz Constructor of a dynamic class creates CDO. #codereview Robert.Manuszewski Change 2725108 on 2015/10/12 by Mike.Beach [UE-21891] Minor fix to the array shuffle() function; now processes the last entry like all the others. Change 2726358 on 2015/10/13 by Maciej.Mroz UDataTable is properly saved even if its RowStruct is null. https://udn.unrealengine.com/questions/264064/crash-using-hotreload-in-custom-datatable-cdo-clas.html Change 2727395 on 2015/10/13 by Mike.Beach (WIP) Second pass on the Blueprint conversion pipeline; setting it up for more optimal (speedier) performance. * Using stubs for replacements (rather than loading dynamic replacement). * Giving the cook commandlet more control (so a conversion could be ran directly). * Now logging replacements by old object path (to account for UPackage replacement queries). * Fix for [UE-21947], unshelved from CL 2724944 (by Maciej.Mroz). #codereview Maciej.Mroz Change 2727484 on 2015/10/13 by Mike.Beach [UE-22008] Fixing up comment/tooltip typo for UActorComponent::bAutoActivate. Change 2727527 on 2015/10/13 by Mike.Beach Downgrading an inactionable EdGraph warning, while adding more info so we could possibly determine what's happening. Change 2727702 on 2015/10/13 by Dan.Oconnor Fix for crash in UDelegateProperty::GetCPPType when called on a function with no OwnerClass (events) Change 2727968 on 2015/10/14 by Maciej.Mroz Since ConstructorHelpers::FClassFinder is usually static, the loaded class should be in root set, to prevent the pointer stored in ConstructorHelpers::FClassFinder from being obsolete. FindOrLoadClass behaves now like FindOrLoadObject. #codereview Robert.Manuszewski, Nick.Whiting Change 2728139 on 2015/10/14 by Phillip.Kavan
2015-11-25 18:47:20 -05:00
void UK2Node_Event::FixupEventReference()
{
if (bOverrideFunction && !HasAnyFlags(RF_Transient))
{
if (!EventReference.IsSelfContext())
{
UBlueprint* Blueprint = GetBlueprint();
UClass* BlueprintType = (Blueprint != nullptr) ? Blueprint->SkeletonGeneratedClass : nullptr;
UClass* ParentType = EventReference.GetMemberParentClass();
if ((BlueprintType != nullptr) && ( (ParentType == nullptr) || !(BlueprintType->IsChildOf(ParentType) || BlueprintType->ImplementsInterface(ParentType)) ))
{
FName EventName = EventReference.GetMemberName();
const UFunction* OverriddenFunc = BlueprintType->FindFunctionByName(EventName);
while (OverriddenFunc != nullptr)
{
if (UFunction* SuperFunc = OverriddenFunc->GetSuperFunction())
{
OverriddenFunc = SuperFunc;
}
else
{
break;
}
}
if (OverriddenFunc != nullptr)
{
UClass* SuperClass = OverriddenFunc->GetOwnerClass();
if (UBlueprint* SuperBlueprint = Cast<UBlueprint>(SuperClass->ClassGeneratedBy))
{
SuperClass = SuperBlueprint->GeneratedClass;
}
if (SuperClass != nullptr)
{
EventReference.SetExternalMember(EventName, SuperClass);
}
}
}
}
}
}
void UK2Node_Event::UpdateDelegatePin(bool bSilent)
{
UEdGraphPin* Pin = FindPinChecked(DelegateOutputName);
checkSlow(EGPD_Output == Pin->Direction);
const UObject* OldSignature = FMemberReference::ResolveSimpleMemberReference<UFunction>(Pin->PinType.PinSubCategoryMemberReference);
if (!OldSignature)
{
OldSignature = Pin->PinType.PinSubCategoryObject.Get();
}
UFunction* NewSignature = NULL;
if(bOverrideFunction)
{
NewSignature = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode());
}
else if(UBlueprint* Blueprint = GetBlueprint())
{
NewSignature = Blueprint->SkeletonGeneratedClass
? Blueprint->SkeletonGeneratedClass->FindFunctionByName(CustomFunctionName)
: NULL;
}
Pin->PinType.PinSubCategoryObject = NULL;
FMemberReference::FillSimpleMemberReference<UFunction>(NewSignature, Pin->PinType.PinSubCategoryMemberReference);
if ((OldSignature != NewSignature) && !bSilent)
{
PinTypeChanged(Pin);
}
}
void UK2Node_Event::PinConnectionListChanged(UEdGraphPin* Pin)
{
if(Pin == FindPin(DelegateOutputName))
{
UpdateDelegatePin();
}
Super::PinConnectionListChanged(Pin);
}
FName UK2Node_Event::GetFunctionName() const
{
return bOverrideFunction ? EventReference.GetMemberName() : CustomFunctionName;
}
UFunction* UK2Node_Event::FindEventSignatureFunction()
{
return EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode());
}
void UK2Node_Event::AllocateDefaultPins()
{
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
CreatePin(EGPD_Output, K2Schema->PC_Delegate, TEXT(""), NULL, false, false, DelegateOutputName);
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_Then);
const UFunction* Function = FindEventSignatureFunction();
if (Function != NULL)
{
CreatePinsForFunctionEntryExit(Function, /*bIsFunctionEntry=*/ true);
}
UpdateDelegatePin(true);
Super::AllocateDefaultPins();
}
void UK2Node_Event::ValidateNodeDuringCompilation(class FCompilerResultsLog& MessageLog) const
{
Super::ValidateNodeDuringCompilation(MessageLog);
UFunction* Function = nullptr;
if (bOverrideFunction)
{
Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode());
if (!Function)
{
// If we are overriding a function, but we can;t find the function we are overriding, that is a compile error
MessageLog.Error(*FString::Printf(*NSLOCTEXT("KismetCompiler", "MissingEventSig_Error", "Missing Event '%s' for @@").ToString(), *EventReference.GetMemberName().ToString()), this);
}
}
else if (UBlueprint* Blueprint = GetBlueprint())
{
Function = Blueprint->SkeletonGeneratedClass
? Blueprint->SkeletonGeneratedClass->FindFunctionByName(CustomFunctionName)
: nullptr;
}
FKismetCompilerUtilities::DetectValuesReturnedByRef(Function, this, MessageLog);
}
bool UK2Node_Event::NodeCausesStructuralBlueprintChange() const
{
// FBlueprintEditor::CanAddParentNode requires actual data in skel class
return true;
}
void UK2Node_Event::GetRedirectPinNames(const UEdGraphPin& Pin, TArray<FString>& RedirectPinNames) const
{
Super::GetRedirectPinNames(Pin, RedirectPinNames);
if ( RedirectPinNames.Num() > 0 )
{
Copying //UE4/Dev-Blueprints to //UE4/Dev-Main (Source: //UE4/Dev-Blueprints @ 3255454) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3228496 on 2016/12/09 by Ben.Cosh This change adds extra information to component template arrays so that the component class can be determined in builds that strip out objects of certain class types such as the editor dedicated server build. #Jira UE-38842 - "LogBlueprint:Error: [Compiler BP_Skybox_World_RandomTrees_01] Error Can't connect pins ReturnValue and Target" after entering a lobby in a synced server #Proj KismetCompiler, BlueprintGraph, UnrealEd, Core, Engine, Kismet, BlueprintCompilerCppBackend Change 3232435 on 2016/12/13 by Ben.Cosh Fix for a bug introduced in CL 3228496 that caused component templates to fail to be identified by name and resulted in blueprint compilation issues for add component nodes. #Jira UE-39623 - Unknown template referenced by Add Component Node #Proj BlueprintGraph, Engine Change 3234581 on 2016/12/14 by Mike.Beach Backing out fix for UE-38842 (CL 3228496/3232435/3232564) - mapping UBlueprintGeneratedClass's ComponentTemplates array to a new format was causing issues with deferred dependency loading during serialization (trying to extract type information from a placeholder object). We're opting for a smaller/simpler solution to UE-38842, which will be to store the component information on the node itself (not with the templates). #jira UE-39707 Change 3236615 on 2016/12/15 by Maciej.Mroz Nativization: Fixed getter fuctions in FUnconvertedWrapper, the returned ref won;t be const. Change 3236967 on 2016/12/15 by Dan.Oconnor Test data showing an error for jira issue UE-39808 Change 3237021 on 2016/12/15 by Dan.Oconnor UE31622 test data Change 3237046 on 2016/12/15 by Dan.Oconnor UE-14123 test data Change 3239289 on 2016/12/17 by Phillip.Kavan [UE-38999] Dump component tree node hierarchy to the output log on error state during widget generation. change summary: - added FOnTableViewBadState delegate parameter to SSCSEditorDragDropTree - added SSCSEditor::DumpTree() as the FOnTableViewBadState delegate implementatioon for the STableView widget (to provide us with more info on future occurrences) #jira UE-38999 Change 3239448 on 2016/12/19 by Maciej.Mroz #jira UE-39794 New way of collecting dependencies assets. Only directly used assets are listed. It will be used in projects with EDL enabled, once the "EDL boot time" is enabled. Nativized projects with EDL disabled use the new mechanism as well. They use new __StaticDependenciesAssets functions generator. __StaticDependenciesAssets calls recursively __StaticDependenciesAssets of all Blueprints, that the current BP depends on. It reduces the size of __StaticDependenciesAssets. Notice, that at the moment, this change should no affect any projects with EDL enabled (because the EDL boot time doesn't work yet). Change 3239778 on 2016/12/19 by Phillip.Kavan [UE-39854] Fix nativized assets build error when there are no native code dependencies. change summary: - modified FDependenciesGlobalMapHelper::EmitBodyCode() to emit a NULL entry when there are no other entries to emit, in order to avoid a zero-length array initialization error at compile time. #jira UE-39854 Change 3239965 on 2016/12/19 by Phillip.Kavan [UE-39733] Fix incorrect graph pin value display names for user-defined enum types. change summary: - switched UEnum::GetDisplayNameText() to be a virtual API - added a UUserDefinedEnum::GetDisplayNameText() override to call FEnumEditorUtils::GetEnumeratorDisplayName() #jira UE-39733 Change 3240422 on 2016/12/19 by Dan.Oconnor Remove useless counter. ensureMsgf only fires once Change 3242313 on 2016/12/21 by Phillip.Kavan [UE-35418] The Actor details view will now refresh property mappings for the current Actor instance selection after a bytecode-only recompile of its Blueprint class as a dependency during reinstancing. change summary: - Modified FBlueprintCompileReinstancer::ReinstanceObjects() to invoke SelectActor() on the current editor selection after a bytecode-only recompile of its class as a dependent BP (i.e. when reinstancing/finalization is not actually incurred). This is meant to be consistent with how the refresh for the current Actor selection is handled by the reinstancer in the other cases. #jira UE-35418 Change 3242409 on 2016/12/21 by Dan.Oconnor PR #2995: Arbitrary base logarithm blueprint node (Contributed by Valkrysa) #jira UE-39169 Change 3243207 on 2016/12/22 by Phillip.Kavan [UE-39816] Renaming interface input/output parameters will no longer cause broken pin links at interface function call sites in Blueprints that are currently loaded. change summary: - modified FBasePinChangeHelper::Broadcast() to consider pin changes sourced from an interface Blueprint - also revised non-interface function call site check code a bit to try and avoid doing some unnecessary work when possible, since this code runs through every call site node #jira UE-39816 Change 3243210 on 2016/12/22 by Phillip.Kavan [UE-39944] Extend the GetClassDefaults node to include output pin exceptions for TSet/TMap properties (i.e. mirror safeguards already in place for TArray). change summary: - deprecated 'bExcludeObjectArrays' and replaced with 'bExcludeObjectContainers' (not using a redirect because I need the old property serialized on load for backwards-compatibility) - modified FClassDefaultsOptionalPinManager's ctor to consider both flags - modified FClassDefaultsOptionalPinManager::CanTreatPropertyAsOptional() to also test for TSet/TMap types, and exclude them if they contain a non-class UObject property as the inner type (same as we do for TArray) - modified UK2Node_GetClassDefaults::ValidateNodeDuringCompilation() to also test for TSet/TMap types, and emit a warning for existing pin connections that would have otherwise failed for newly-placed nodes (same as TArray) - modified UK2Node_GetClassDefaults::ExpandNode() to generate the necessary script needed to create a copy of TSet/TMap property value outputs (same as we do for TArray types) #jira UE-39944 Change 3243373 on 2016/12/23 by Maciej.Mroz #jira UE-39794 -Nativized build with EDL enabled use new dependency-gathering system. It shrinks size of the .exe file. This code will change once the boot time EDL is enabled. -In nativized code, ZCOnstructors are not called. They are replaced by ::StaticClass(). Static class doesn't call noting recursively. We still need to fix interfaces (they have no StaticClass). - Workaround for UE-40026 - Various minior improvements. Change 3244038 on 2016/12/28 by Phillip.Kavan [UE-34488] Child Blueprint assets are now marked as dirty if its parent Blueprint incurs a strucutural change. change summary: - modified FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified() to call MarkPackageDirty() after a skeleton-only compile pass on a child Blueprint. notes: - this only fixes the issue for child Blueprints that are loaded when the change to the parent Blueprint occurs. unloaded child Blueprints would still need a redirector to fix this up on load. #jira UE-34488 Change 3244087 on 2016/12/28 by Phillip.Kavan CIS warning fix (C6236). Change 3244388 on 2016/12/30 by Phillip.Kavan [UE-39816] Fix broken pin links caused by renaming interface function input/output parameters prior to compiling the interface, but after renaming the function itself. change summary: - modified FBlueprintEditorUtils::FindFunctionInImplementedInterfaces() to prefer the skeleton class when searching, as that is always up-to-date. - modified FBlueprintEditorUtils::RenameGraph() to update *all* function call site nodes, rather than just those within the current Blueprint class scope. #jira UE-39816 Change 3245322 on 2017/01/03 by Maciej.Mroz #jira UE-40125 Fixed a crash when implementing a native interface in a BP Change 3245667 on 2017/01/03 by Mike.Beach Mirroring CL 3245664 - Making it so level script bound nodes are fixed up on load (in case the level instances were saved out without the bindings). #jira UE-39950 Change 3247675 on 2017/01/05 by Maciej.Mroz BP is not DataOnly, when it overrides an inherited component related to UE-40131 Change 3247985 on 2017/01/05 by Maciej.Mroz NativizationSummary object is always present. #jira UE-40035 Change 3249423 on 2017/01/06 by Mike.Beach Mirroring CL 3248792 from Orion. Fix to keep placeholder classes from being needlessly created (when the object they represent already exists) - instead, attempt to lookup and find the existing import objects (which used to be set, but could be cleared during async loading by FLinkerManager::DissociateImportsAndForcedExports()). #jira OR-34038 Change 3249568 on 2017/01/06 by Mike.Beach Updating the UBlueprintThumbnailRenderer API so it can be sub-classed by plugin/projects. PR #2899: Expose UBlueprintThumbnailRenderer in the API (Contributed by e-agaubatz) #jira UE-38004 Change 3251903 on 2017/01/10 by Phillip.Kavan [UE-31640] Function inputs are now exposed as variable "Get" nodes via the right-click context menu in a Blueprint function graph context. Note: Changes are based on shelved CL# 2452724, original proof-of-concept code (credit: Michael.Noland). #jira UE-31640 #fyi Michael.Noland Change 3252119 on 2017/01/10 by Phillip.Kavan CIS fix (shadowed variable). Change 3252744 on 2017/01/10 by Dan.Oconnor Add GMinimalCompileOnLoad path for postponing compile on load until all data has been loaded - long term this will be used to improve bp compiler infrastructure (performance, correctness, succinctness) Change 3252968 on 2017/01/10 by Phillip.Kavan [UE-36798] Fix for an infinite loop case in the math expression parser. #jira UE-36798 Change 3253153 on 2017/01/10 by Dan.Oconnor Fixed construction scripts not being loaded before instancing occurs when using new lighter compile path Change 3253171 on 2017/01/10 by Mike.Beach Mirrored CL 3253147. Properly fills out FPropertyChangedEvent's MemberProperty field, for the property editor's NotifyHook. As its comment implies, "MemberProperty" is meant to represent the outermost property (in scenarios, like with nested struct properties). It was not working this way, and was instead set to the same nested property. Change 3253220 on 2017/01/10 by Dan.Oconnor These pins should infer together #jira UE-40427 Change 3253223 on 2017/01/10 by Phillip.Kavan [UE-35050] Fix a crash that occurs on an attempt to rename the category of an implemented interface function inherited from a native parent class in the My Blueprint panel. change summary: - modified FBlueprintEditorUtils::FindFunctionInImplementedInterfaces() to accept an additional input parameter so that callers can opt-in to searching all inherited interface classes - modified SMyBlueprint::CanRequestRenameOnActionNode() to prevent rename on implemented interface functions inherited from a native parent class #jira UE-35050 Change 3253259 on 2017/01/10 by Dan.Oconnor Quick cleanup, this stuff is in progress Change 3253983 on 2017/01/11 by Phillip.Kavan [UE-35629] Disable external curve asset creation when editing a local variable's default value in a Blueprint graph. change summary: - modified FCurveStructCustomization::CustomizeChildren() to set the "create" button visibility to "collapsed" when the Owner is NULL (as the default asset path is inferred from the Owner's package). #jira UE-35629 Change 3254024 on 2017/01/11 by Phillip.Kavan [UE-40131] Non-native child BPs can now properly override a nativized parent BP's components in a cooked build with exclusive Blueprint class nativiation. change summary: - added UBlueprintGeneratedClass::CheckAndApplyComponentTemplateOverrides() - switched FComponentKey::OwnerClass type from UBlueprintGeneratedClass to UClass to allow the reference to be loaded when it's a nativized BP class. - modified AActor::PostLoadSubobjects() to apply ICH template overrides to inherited component subobjects on load (only in a cooked build) - modified AActor::PostSpawnInitialize() to also apply ICH template overrides to inherited component subobjects on new Actor spawns (only in a cooked build) - modified FBlueprintEditorUtils::IsDataOnlyBlueprint() to additionally reject BPs that have a non-empty ICH (from Maciej) - added UBlueprint::bHasNativizedParent to cache this as an indicator for cooked builds to allow Actor instances to avoid incurring additional overhead for this at load time in the general case #jira UE-40131 Change 3254176 on 2017/01/11 by Mike.Beach Mirroring CL 3245838 to unblock the Odin build. Downgrading new error to warning until we can address it in content (and fully understand why it is triggering). #jira UE-40470 Change 3254391 on 2017/01/11 by Phillip.Kavan [UE-40131] CIS fix (non-unity). Change 3254442 on 2017/01/11 by Mike.Beach Mirroring CL 3245069 (from RobM), which is described as a "temp fix". #jira UE-40399 Change 3254599 on 2017/01/11 by Mike.Beach Updating some of our GetRedirectPinNames() functions - making local copy of an array element instead of a reference. We're adding to the array right after, and the ref can become invalid (if the array is grown and reallocated). Came to us via UDN. Change 3254624 on 2017/01/11 by Mike.Beach Backing out CL 3247675, as it removed the "data-only" status from certain Blueprints that, IMO, are still considered "data-only". This would have reprecussions to editor (compile-on) load times, and affect how these Blueprints are presented to the user. #fyi Maciej.Mroz, Phillip.Kavan Change 3254671 on 2017/01/11 by Mike.Beach Resolving CIS warning - USE_EVENT_DRIVEN_ASYNC_LOAD was replaced with GEventDrivenLoaderEnabled. [CL 3255791 by Mike Beach in Main branch]
2017-01-12 14:36:04 -05:00
const FString OldPinName = RedirectPinNames[0];
// first add functionname.param
RedirectPinNames.Add(FString::Printf(TEXT("%s.%s"), *EventReference.GetMemberName().ToString(), *OldPinName));
// if there is class, also add an option for class.functionname.param
if ( EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode()) != nullptr )
{
if(const UClass* EventSignatureClass = EventReference.GetMemberParentClass(GetBlueprintClassFromNode()))
{
RedirectPinNames.Add(FString::Printf(TEXT("%s.%s.%s"), *EventSignatureClass->GetName(), *EventReference.GetMemberName().ToString(), *OldPinName));
}
}
}
}
bool UK2Node_Event::IsFunctionEntryCompatible(const UK2Node_FunctionEntry* EntryNode) const
{
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
// Copy a set of the pin references for both nodes, so we can pare down lists
TArray<UEdGraphPin*> EventPins = Pins;
TArray<UEdGraphPin*> EntryPins = EntryNode->Pins;
// Prune the exec wires and inputs (delegate binding) from both sets
for(int32 i = 0; i < EventPins.Num(); i++)
{
const UEdGraphPin* CurPin = EventPins[i];
if( CurPin->PinType.PinCategory == K2Schema->PC_Exec
|| CurPin->PinType.PinSubCategory == K2Schema->PSC_Self
|| CurPin->PinName == DelegateOutputName
|| CurPin->Direction == EGPD_Input )
{
EventPins.RemoveAt(i, 1);
i--;
}
}
for(int32 i = 0; i < EntryPins.Num(); i++)
{
const UEdGraphPin* CurPin = EntryPins[i];
if( CurPin->PinType.PinCategory == K2Schema->PC_Exec
|| CurPin->PinType.PinSubCategory == K2Schema->PSC_Self
|| CurPin->Direction == EGPD_Input)
{
EntryPins.RemoveAt(i, 1);
i--;
}
}
// Early out: we don't have the same number of parameters
if( EventPins.Num() != EntryPins.Num() )
{
return false;
}
// Now check through the event's pins, and check for compatible pins, removing them if we find a match.
for( int32 i = 0; i < EventPins.Num(); i++ )
{
const UEdGraphPin* CurEventPin = EventPins[i];
bool bMatchFound = false;
for( int32 j = 0; j < EntryPins.Num(); j++ )
{
const UEdGraphPin* CurEntryPin = EntryPins[j];
if( CurEntryPin->PinName == CurEventPin->PinName )
{
// Check to make sure pins are of the same type
if( K2Schema->ArePinTypesCompatible(CurEntryPin->PinType, CurEventPin->PinType) )
{
// Found a match, remove it from the list
bMatchFound = true;
EntryPins.RemoveAt(j, 1);
break;
}
else
{
// Found a pin, but the type has changed, bail.
bMatchFound = false;
break;
}
}
}
if( bMatchFound )
{
// Found a match, remove it from the event array
EventPins.RemoveAt(i, 1);
i--;
}
else
{
// Didn't find a match...bail!
return false;
}
}
// Checked for matches, if any pins remain in either array, they were unmatched.
return (EventPins.Num() == 0) && (EntryPins.Num() == 0);
}
bool UK2Node_Event::IsCompatibleWithGraph(const UEdGraph* TargetGraph) const
{
bool bIsCompatible = Super::IsCompatibleWithGraph(TargetGraph);
if (bIsCompatible)
{
EGraphType const GraphType = TargetGraph->GetSchema()->GetGraphType(TargetGraph);
bIsCompatible = (GraphType == EGraphType::GT_Ubergraph);
}
return bIsCompatible;
}
bool UK2Node_Event::CanPasteHere(const UEdGraph* TargetGraph) const
{
// By default, to be safe, we don't allow events to be pasted, except under special circumstances (see below)
bool bDisallowPaste = !Super::CanPasteHere(TargetGraph);
if(!bDisallowPaste)
{
// Find the Blueprint that owns the target graph
UBlueprint* Blueprint = FBlueprintEditorUtils::FindBlueprintForGraph(TargetGraph);
if(Blueprint && Blueprint->SkeletonGeneratedClass)
{
TArray<FName> ExistingNamesInUse;
TArray<FString> ExcludedEventNames;
TArray<UK2Node_Event*> ExistingEventNodes;
TArray<UClass*> ImplementedInterfaceClasses;
// Gather all names in use by the Blueprint class
FBlueprintEditorUtils::GetFunctionNameList(Blueprint, ExistingNamesInUse);
FBlueprintEditorUtils::GetClassVariableList(Blueprint, ExistingNamesInUse);
// Gather all existing event nodes
FBlueprintEditorUtils::GetAllNodesOfClass<UK2Node_Event>(Blueprint, ExistingEventNodes);
// Gather any event names excluded by the Blueprint class
const FString ExclusionListKeyName = TEXT("KismetHideOverrides");
if(Blueprint->ParentClass->HasMetaData(*ExclusionListKeyName))
{
const FString ExcludedEventNameString = Blueprint->ParentClass->GetMetaData(*ExclusionListKeyName);
ExcludedEventNameString.ParseIntoArray(ExcludedEventNames, TEXT(","), true);
}
// Gather all interfaces implemented by the Blueprint class
FBlueprintEditorUtils::FindImplementedInterfaces(Blueprint, true, ImplementedInterfaceClasses);
// If this is an internal event, don't paste this event
if(!bInternalEvent)
{
// If this is a function override
if(bOverrideFunction)
{
// If the function name is hidden by the parent class, don't paste this event
bDisallowPaste = EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) == Blueprint->ParentClass
&& ExcludedEventNames.Contains(EventReference.GetMemberName().ToString());
if(!bDisallowPaste)
{
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2910968 on 2016/03/15 by Dan.Oconnor PR #2152: Fix for UE-27652 (Contributed by SNikon) #jira UE-28368, UE-27652 Change 2911052 on 2016/03/15 by Dan.Oconnor Moving Pin tooltip generating into GetPinHoverText to correct some issues with hovertext being stale. Motivation was PR #2095: Keep ResultPin Tooltip up to date on SpawnActor and CreateObject Nodes (Contributed by mollstam) #jira UE-27345 Change 2912261 on 2016/03/16 by Maciej.Mroz Fixed DynamicClass loading. #codereview Robert.Manuszewski Change 2912719 on 2016/03/17 by Phillip.Kavan [UE-28450] Cooked component template data now properly handles array property values having one or more items that differ from the default object. change summary: - modified FBlueprintEditorUtils::BuildComponentInstancingData() to generate additional data for individual array property values that differ from the component's class default object at cook time. - modified FBlueprintCookedComponentInstancingData::BuildCachedPropertyList() to parse cooked array property data at load time and generate a SubPropertyList representing the set of changed array property values. - modified UArrayProperty::SerializeItem() to handle an explicit custom property list when specified as part of the FArchive. - modified AActor::CreateComponentFromTemplateData() to set the 'PPF_Duplicate' PortFlag in order to emulate expected behavior that would otherwise occur when SDO is used for component instancing. - modified UActorComponent::Serialize() to not set 'bHasBeenCreated' on load for component template objects. Change 2912749 on 2016/03/17 by Phillip.Kavan [UE-28450] CIS fix Change 2912811 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix for a minor issue w/ branch nodes not including pure node chains in profiler tree view. Also reversed order of pure node chain display in tree view. #codereview Ben.Cosh Change 2912890 on 2016/03/17 by Maciej.Mroz Blueprint C++ Conversion: - Constructor handles private (inaccessible) member variables. - no ensure failed when a component was removed in a static actor instance. Change 2913115 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix for a potential profiler crash when processing a pure node event with a script code offset that also maps to an impure exec node in a different function context. (forgot to include this in the previous CL) #codereview Ben.Cosh Change 2913266 on 2016/03/17 by Maciej.Mroz Blueprint C++ Conversion: - fixed super:: call for BP native event. Change 2913313 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix reversed trace paths on pure nodes which caused missing pure timing data. (introduced in CL# 2912811) #codereview Ben.Cosh Change 2915001 on 2016/03/18 by Maciej.Mroz Blueprint C++ Conversion: Fixed color construction Change 2915306 on 2016/03/18 by Phillip.Kavan Fix /initProperties() optimization when PostLoad() changes a CDO property value away from the default value. Change 2916140 on 2016/03/20 by Phillip.Kavan Improved array property handling for both InitProperties() and cooked component data optimizations. Note: This should allow for proper runtime handling of array properties with an Inner that is potentially also an array property. change summary: - added FObjectInitializer::InitArrayPropertyFromCustomList() to assist with initializing instances from array properties with an explicit sub-property list. - added FBlueprintCookedComponentInstancingData::BuildCachedArrayPropertyList() to assist with recursively building a sub-property list for array deltas. - added FBlueprintGeneratedClass::BuildCustomArrayPropertyListForPostConstruction() to assist with recursively building a sub-property list for array deltas. Change 2916640 on 2016/03/21 by Ben.Cosh Support for tunnelling graphs in the blueprint profiler #UEBP-183 - Tunneling graph support #Proj Kismet, BlueprintProfiler - This removes the need to filter stat updates to prevent cyclic references ( now tunnel nodes are better described in terms of i/o pins ) - Moves to the more complete function based mapping of graphs. - Precursor to final macro code codereview Phillip.Kavan Change 2916902 on 2016/03/21 by Michael.Schoell The graph panel will now properly fade in splines when highlighting them. Added dynamic tick registering that will invalidate the graph panel, allowing it to update the current display per tick until the action is complete. Change 2917087 on 2016/03/21 by Ben.Cosh CIS mac fix Change 2917433 on 2016/03/21 by Dan.Oconnor PR #2163: Fix Bug for "IsDataOnlyBlueprint" Error (Contributed by cdsama) #jira UE-28534 Change 2917499 on 2016/03/21 by Mike.Beach Correcting an expectation that custom collision mappings were ordered (by collision channel). Now sorting the list before we translate them into trace types. #codereview Ori.Cohen, Lina.Halper, Zak.Middleton #rb Ori.Cohen, Zak.Middleton Change 2919538 on 2016/03/23 by Maciej.Mroz [CL 2937623 by Mike Beach in Main branch]
2016-04-07 21:18:08 -04:00
TArray<UK2Node_Event*> DisabledEventNodesToStomp;
// If the event function is already handled in this Blueprint, don't paste this event
for(int32 i = 0; i < ExistingEventNodes.Num() && !bDisallowPaste; ++i)
{
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2910968 on 2016/03/15 by Dan.Oconnor PR #2152: Fix for UE-27652 (Contributed by SNikon) #jira UE-28368, UE-27652 Change 2911052 on 2016/03/15 by Dan.Oconnor Moving Pin tooltip generating into GetPinHoverText to correct some issues with hovertext being stale. Motivation was PR #2095: Keep ResultPin Tooltip up to date on SpawnActor and CreateObject Nodes (Contributed by mollstam) #jira UE-27345 Change 2912261 on 2016/03/16 by Maciej.Mroz Fixed DynamicClass loading. #codereview Robert.Manuszewski Change 2912719 on 2016/03/17 by Phillip.Kavan [UE-28450] Cooked component template data now properly handles array property values having one or more items that differ from the default object. change summary: - modified FBlueprintEditorUtils::BuildComponentInstancingData() to generate additional data for individual array property values that differ from the component's class default object at cook time. - modified FBlueprintCookedComponentInstancingData::BuildCachedPropertyList() to parse cooked array property data at load time and generate a SubPropertyList representing the set of changed array property values. - modified UArrayProperty::SerializeItem() to handle an explicit custom property list when specified as part of the FArchive. - modified AActor::CreateComponentFromTemplateData() to set the 'PPF_Duplicate' PortFlag in order to emulate expected behavior that would otherwise occur when SDO is used for component instancing. - modified UActorComponent::Serialize() to not set 'bHasBeenCreated' on load for component template objects. Change 2912749 on 2016/03/17 by Phillip.Kavan [UE-28450] CIS fix Change 2912811 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix for a minor issue w/ branch nodes not including pure node chains in profiler tree view. Also reversed order of pure node chain display in tree view. #codereview Ben.Cosh Change 2912890 on 2016/03/17 by Maciej.Mroz Blueprint C++ Conversion: - Constructor handles private (inaccessible) member variables. - no ensure failed when a component was removed in a static actor instance. Change 2913115 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix for a potential profiler crash when processing a pure node event with a script code offset that also maps to an impure exec node in a different function context. (forgot to include this in the previous CL) #codereview Ben.Cosh Change 2913266 on 2016/03/17 by Maciej.Mroz Blueprint C++ Conversion: - fixed super:: call for BP native event. Change 2913313 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix reversed trace paths on pure nodes which caused missing pure timing data. (introduced in CL# 2912811) #codereview Ben.Cosh Change 2915001 on 2016/03/18 by Maciej.Mroz Blueprint C++ Conversion: Fixed color construction Change 2915306 on 2016/03/18 by Phillip.Kavan Fix /initProperties() optimization when PostLoad() changes a CDO property value away from the default value. Change 2916140 on 2016/03/20 by Phillip.Kavan Improved array property handling for both InitProperties() and cooked component data optimizations. Note: This should allow for proper runtime handling of array properties with an Inner that is potentially also an array property. change summary: - added FObjectInitializer::InitArrayPropertyFromCustomList() to assist with initializing instances from array properties with an explicit sub-property list. - added FBlueprintCookedComponentInstancingData::BuildCachedArrayPropertyList() to assist with recursively building a sub-property list for array deltas. - added FBlueprintGeneratedClass::BuildCustomArrayPropertyListForPostConstruction() to assist with recursively building a sub-property list for array deltas. Change 2916640 on 2016/03/21 by Ben.Cosh Support for tunnelling graphs in the blueprint profiler #UEBP-183 - Tunneling graph support #Proj Kismet, BlueprintProfiler - This removes the need to filter stat updates to prevent cyclic references ( now tunnel nodes are better described in terms of i/o pins ) - Moves to the more complete function based mapping of graphs. - Precursor to final macro code codereview Phillip.Kavan Change 2916902 on 2016/03/21 by Michael.Schoell The graph panel will now properly fade in splines when highlighting them. Added dynamic tick registering that will invalidate the graph panel, allowing it to update the current display per tick until the action is complete. Change 2917087 on 2016/03/21 by Ben.Cosh CIS mac fix Change 2917433 on 2016/03/21 by Dan.Oconnor PR #2163: Fix Bug for "IsDataOnlyBlueprint" Error (Contributed by cdsama) #jira UE-28534 Change 2917499 on 2016/03/21 by Mike.Beach Correcting an expectation that custom collision mappings were ordered (by collision channel). Now sorting the list before we translate them into trace types. #codereview Ori.Cohen, Lina.Halper, Zak.Middleton #rb Ori.Cohen, Zak.Middleton Change 2919538 on 2016/03/23 by Maciej.Mroz [CL 2937623 by Mike Beach in Main branch]
2016-04-07 21:18:08 -04:00
bDisallowPaste = ExistingEventNodes[i]->bOverrideFunction /*&& ExistingEventNodes[i]->IsNodeEnabled() */&& AreEventNodesIdentical(this, ExistingEventNodes[i]);
if (bDisallowPaste && !ExistingEventNodes[i]->IsNodeEnabled())
{
DisabledEventNodesToStomp.Add(ExistingEventNodes[i]);
bDisallowPaste = false;
}
}
// We need to also check for 'const' BPIE methods that might already be implemented as functions with a read-only 'self' context (these were previously implemented as events)
if(!bDisallowPaste)
{
TArray<UBlueprint*> ParentBPStack;
UBlueprint::GetBlueprintHierarchyFromClass(Blueprint->SkeletonGeneratedClass, ParentBPStack);
for(auto BPStackIt = ParentBPStack.CreateConstIterator(); BPStackIt && !bDisallowPaste; ++BPStackIt)
{
TArray<UK2Node_FunctionEntry*> ExistingFunctionEntryNodes;
FBlueprintEditorUtils::GetAllNodesOfClass<UK2Node_FunctionEntry>(*BPStackIt, ExistingFunctionEntryNodes);
for(auto NodeIt = ExistingFunctionEntryNodes.CreateConstIterator(); NodeIt && !bDisallowPaste; ++NodeIt)
{
UK2Node_FunctionEntry* ExistingFunctionEntryNode = *NodeIt;
bDisallowPaste = ExistingFunctionEntryNode->bEnforceConstCorrectness
&& ExistingFunctionEntryNode->SignatureName == EventReference.GetMemberName();
}
}
}
if(!bDisallowPaste)
{
// If the signature class is not implemented by the Blueprint parent class or an interface, don't paste this event
bDisallowPaste = !Blueprint->ParentClass->IsChildOf(EventReference.GetMemberParentClass(GetBlueprintClassFromNode()))
&& !ImplementedInterfaceClasses.Contains(EventReference.GetMemberParentClass(GetBlueprintClassFromNode()));
if(bDisallowPaste)
{
UE_LOG(LogBlueprint, Log, TEXT("Cannot paste event node (%s) directly because the event signature class (%s) is incompatible with this Blueprint."), *GetFName().ToString(), EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) ? *EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->GetFName().ToString() : TEXT("NONE"));
}
}
else
{
UE_LOG(LogBlueprint, Log, TEXT("Cannot paste event node (%s) directly because the event function (%s) is already handled."), *GetFName().ToString(), *EventReference.GetMemberName().ToString());
}
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2910968 on 2016/03/15 by Dan.Oconnor PR #2152: Fix for UE-27652 (Contributed by SNikon) #jira UE-28368, UE-27652 Change 2911052 on 2016/03/15 by Dan.Oconnor Moving Pin tooltip generating into GetPinHoverText to correct some issues with hovertext being stale. Motivation was PR #2095: Keep ResultPin Tooltip up to date on SpawnActor and CreateObject Nodes (Contributed by mollstam) #jira UE-27345 Change 2912261 on 2016/03/16 by Maciej.Mroz Fixed DynamicClass loading. #codereview Robert.Manuszewski Change 2912719 on 2016/03/17 by Phillip.Kavan [UE-28450] Cooked component template data now properly handles array property values having one or more items that differ from the default object. change summary: - modified FBlueprintEditorUtils::BuildComponentInstancingData() to generate additional data for individual array property values that differ from the component's class default object at cook time. - modified FBlueprintCookedComponentInstancingData::BuildCachedPropertyList() to parse cooked array property data at load time and generate a SubPropertyList representing the set of changed array property values. - modified UArrayProperty::SerializeItem() to handle an explicit custom property list when specified as part of the FArchive. - modified AActor::CreateComponentFromTemplateData() to set the 'PPF_Duplicate' PortFlag in order to emulate expected behavior that would otherwise occur when SDO is used for component instancing. - modified UActorComponent::Serialize() to not set 'bHasBeenCreated' on load for component template objects. Change 2912749 on 2016/03/17 by Phillip.Kavan [UE-28450] CIS fix Change 2912811 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix for a minor issue w/ branch nodes not including pure node chains in profiler tree view. Also reversed order of pure node chain display in tree view. #codereview Ben.Cosh Change 2912890 on 2016/03/17 by Maciej.Mroz Blueprint C++ Conversion: - Constructor handles private (inaccessible) member variables. - no ensure failed when a component was removed in a static actor instance. Change 2913115 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix for a potential profiler crash when processing a pure node event with a script code offset that also maps to an impure exec node in a different function context. (forgot to include this in the previous CL) #codereview Ben.Cosh Change 2913266 on 2016/03/17 by Maciej.Mroz Blueprint C++ Conversion: - fixed super:: call for BP native event. Change 2913313 on 2016/03/17 by Phillip.Kavan [UEBP-112] Fix reversed trace paths on pure nodes which caused missing pure timing data. (introduced in CL# 2912811) #codereview Ben.Cosh Change 2915001 on 2016/03/18 by Maciej.Mroz Blueprint C++ Conversion: Fixed color construction Change 2915306 on 2016/03/18 by Phillip.Kavan Fix /initProperties() optimization when PostLoad() changes a CDO property value away from the default value. Change 2916140 on 2016/03/20 by Phillip.Kavan Improved array property handling for both InitProperties() and cooked component data optimizations. Note: This should allow for proper runtime handling of array properties with an Inner that is potentially also an array property. change summary: - added FObjectInitializer::InitArrayPropertyFromCustomList() to assist with initializing instances from array properties with an explicit sub-property list. - added FBlueprintCookedComponentInstancingData::BuildCachedArrayPropertyList() to assist with recursively building a sub-property list for array deltas. - added FBlueprintGeneratedClass::BuildCustomArrayPropertyListForPostConstruction() to assist with recursively building a sub-property list for array deltas. Change 2916640 on 2016/03/21 by Ben.Cosh Support for tunnelling graphs in the blueprint profiler #UEBP-183 - Tunneling graph support #Proj Kismet, BlueprintProfiler - This removes the need to filter stat updates to prevent cyclic references ( now tunnel nodes are better described in terms of i/o pins ) - Moves to the more complete function based mapping of graphs. - Precursor to final macro code codereview Phillip.Kavan Change 2916902 on 2016/03/21 by Michael.Schoell The graph panel will now properly fade in splines when highlighting them. Added dynamic tick registering that will invalidate the graph panel, allowing it to update the current display per tick until the action is complete. Change 2917087 on 2016/03/21 by Ben.Cosh CIS mac fix Change 2917433 on 2016/03/21 by Dan.Oconnor PR #2163: Fix Bug for "IsDataOnlyBlueprint" Error (Contributed by cdsama) #jira UE-28534 Change 2917499 on 2016/03/21 by Mike.Beach Correcting an expectation that custom collision mappings were ordered (by collision channel). Now sorting the list before we translate them into trace types. #codereview Ori.Cohen, Lina.Halper, Zak.Middleton #rb Ori.Cohen, Zak.Middleton Change 2919538 on 2016/03/23 by Maciej.Mroz [CL 2937623 by Mike Beach in Main branch]
2016-04-07 21:18:08 -04:00
if (!bDisallowPaste)
{
for (UK2Node_Event* EventNode : DisabledEventNodesToStomp)
{
EventNode->DestroyNode();
}
}
}
else
{
UE_LOG(LogBlueprint, Log, TEXT("Cannot paste event node (%s) directly because the event function (%s) is hidden by the Blueprint parent class (%s)."), *GetFName().ToString(), *EventReference.GetMemberName().ToString(), EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) ? *EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->GetFName().ToString() : TEXT("NONE"));
}
}
else if(CustomFunctionName != NAME_None)
{
// If this name is already in use, we can't paste this event
bDisallowPaste = ExistingNamesInUse.Contains(CustomFunctionName);
if(!bDisallowPaste)
{
// Handle events that have a custom function name with an actual signature name/class that is not an override (e.g. AnimNotify events)
if(EventReference.GetMemberName() != NAME_None)
{
// If the signature class is not implemented by the Blueprint parent class or an interface, don't paste this event
bDisallowPaste = !Blueprint->ParentClass->IsChildOf(EventReference.GetMemberParentClass(GetBlueprintClassFromNode()))
&& !ImplementedInterfaceClasses.Contains(EventReference.GetMemberParentClass(GetBlueprintClassFromNode()));
if(bDisallowPaste)
{
UE_LOG(LogBlueprint, Log, TEXT("Cannot paste event node (%s) directly because the custom event function (%s) with event signature name (%s) has an event signature class (%s) that is incompatible with this Blueprint."), *GetFName().ToString(), *CustomFunctionName.ToString(), *EventReference.GetMemberName().ToString(), EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) ? *EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->GetFName().ToString() : TEXT("NONE"));
}
}
}
else
{
UE_LOG(LogBlueprint, Log, TEXT("Cannot paste event node (%s) directly because the custom event function (%s) is already handled."), *GetFName().ToString(), *CustomFunctionName.ToString());
}
}
else
{
UE_LOG(LogBlueprint, Log, TEXT("Cannot paste event node (%s) directly because the event configuration is not specifically handled (EventSignatureName=%s, EventSignatureClass=%s)."), *GetFName().ToString(), *EventReference.GetMemberName().ToString(), EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) ? *EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->GetFName().ToString() : TEXT("NONE"));
}
}
else
{
UE_LOG(LogBlueprint, Log, TEXT("Cannot paste event node (%s) directly because it is flagged as an internal event."), *GetFName().ToString());
}
}
}
return !bDisallowPaste;
}
FText UK2Node_Event::GetLocalizedNetString(uint32 FunctionFlags, bool Calling)
{
FText RPCString;
if (FunctionFlags & FUNC_Net)
{
if (FunctionFlags & FUNC_NetMulticast)
{
if (Calling)
{
RPCString = NSLOCTEXT("K2Node", "CustomEvent_ReplicatedMulticast", "Replicated To All (if server)");
}
else
{
RPCString = NSLOCTEXT("K2Node", "CustomEvent_ReplicatedMulticastFrom", "Replicated From Server\nExecutes On All");
}
}
else if (FunctionFlags & FUNC_NetServer)
{
if (Calling)
{
RPCString = NSLOCTEXT("K2Node", "CustomEvent_ReplicatedServer", "Replicated To Server (if owning client)");
}
else
{
RPCString = NSLOCTEXT("K2Node", "CustomEvent_ReplicatedServerFrom", "Replicated From Client\nExecutes On Server");
}
}
else if (FunctionFlags & FUNC_NetClient)
{
if (Calling)
{
RPCString = NSLOCTEXT("K2Node", "CustomEvent_ReplicatedClient", "Replicated To Owning Client (if server)");
}
else
{
RPCString = NSLOCTEXT("K2Node", "CustomEvent_ReplicatedClientFrom", "Replicated From Server\nExecutes on Owning Client");
}
}
if (FunctionFlags & FUNC_NetReliable)
{
FFormatNamedArguments Args;
Args.Add(TEXT("RPCString"), RPCString);
RPCString = FText::Format(NSLOCTEXT("K2Node", "CustomEvent_ReplicatedReliable", "RELIABLE {RPCString}"), Args);
}
}
return RPCString;
}
void UK2Node_Event::ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
{
Super::ExpandNode(CompilerContext, SourceGraph);
UEdGraphPin* OrgDelegatePin = FindPin(UK2Node_Event::DelegateOutputName);
if (OrgDelegatePin && OrgDelegatePin->LinkedTo.Num() > 0)
{
const UEdGraphSchema_K2* Schema = CompilerContext.GetSchema();
const FName FunctionName = GetFunctionName();
if(FunctionName == NAME_None)
{
CompilerContext.MessageLog.Error(*FString::Printf(*LOCTEXT("EventDelegateName_Error", "Event node @@ has no name of function.").ToString()), this);
}
UK2Node_Self* SelfNode = CompilerContext.SpawnIntermediateNode<UK2Node_Self>(this, SourceGraph);
SelfNode->AllocateDefaultPins();
UK2Node_CreateDelegate* CreateDelegateNode = CompilerContext.SpawnIntermediateNode<UK2Node_CreateDelegate>(this, SourceGraph);
CreateDelegateNode->AllocateDefaultPins();
CompilerContext.MovePinLinksToIntermediate(*OrgDelegatePin, *CreateDelegateNode->GetDelegateOutPin());
Schema->TryCreateConnection(SelfNode->FindPinChecked(Schema->PN_Self), CreateDelegateNode->GetObjectInPin());
// When called UFunction is defined in the same class, it wasn't created yet (previously the Skeletal class was checked). So no "CreateDelegateNode->HandleAnyChangeWithoutNotifying();" is called.
CreateDelegateNode->SetFunction(FunctionName);
}
}
FName UK2Node_Event::GetCornerIcon() const
{
if (UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode()))
{
if (bOverrideFunction || (CustomFunctionName == NAME_None))
{
//@TODO: KISMETREPLICATION: Should do this for events with a custom function name, if it's a newly introduced replicating thingy
if (Function->HasAllFunctionFlags(FUNC_BlueprintCosmetic) || IsCosmeticTickEvent())
{
return TEXT("Graph.Replication.ClientEvent");
}
else if(Function->HasAllFunctionFlags(FUNC_BlueprintAuthorityOnly))
{
return TEXT("Graph.Replication.AuthorityOnly");
}
}
}
if(IsUsedByAuthorityOnlyDelegate())
{
return TEXT("Graph.Replication.AuthorityOnly");
}
if(EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) != nullptr && EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->IsChildOf(UInterface::StaticClass()))
{
return TEXT("Graph.Event.InterfaceEventIcon");
}
return Super::GetCornerIcon();
}
FText UK2Node_Event::GetToolTipHeading() const
{
FText Heading = Super::GetToolTipHeading();
FText EventHeading = FText::GetEmpty();
if (UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode()))
{
if (bOverrideFunction || (CustomFunctionName == NAME_None))
{
if (Function->HasAllFunctionFlags(FUNC_BlueprintCosmetic) || IsCosmeticTickEvent())
{
EventHeading = LOCTEXT("ClinetOnlyEvent", "Client Only");
}
else if(Function->HasAllFunctionFlags(FUNC_BlueprintAuthorityOnly))
{
EventHeading = LOCTEXT("ServerOnlyEvent", "Server Only");
}
}
}
if (EventHeading.IsEmpty() && IsUsedByAuthorityOnlyDelegate())
{
EventHeading = LOCTEXT("ServerOnlyEvent", "Server Only");
}
else if(EventHeading.IsEmpty() && (EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) != nullptr) && EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->IsChildOf(UInterface::StaticClass()))
{
EventHeading = LOCTEXT("InterfaceEvent", "Interface Event");
}
FText CompleteHeading = Super::GetToolTipHeading();
if (!CompleteHeading.IsEmpty() && !EventHeading.IsEmpty())
{
CompleteHeading = FText::Format(FText::FromString("{0}\n{1}"), EventHeading, CompleteHeading);
}
else if (!EventHeading.IsEmpty())
{
CompleteHeading = EventHeading;
}
return CompleteHeading;
}
void UK2Node_Event::GetNodeAttributes( TArray<TKeyValuePair<FString, FString>>& OutNodeAttributes ) const
{
OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Type" ), TEXT( "Event" ) ));
OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Class" ), GetClass()->GetName() ));
OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Name" ), GetFunctionName().ToString() ));
}
FText UK2Node_Event::GetMenuCategory() const
{
FText FunctionCategory = LOCTEXT("AddEventCategory", "Add Event");
if (UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode()))
{
FunctionCategory = UK2Node_CallFunction::GetDefaultCategoryForFunction(Function, FunctionCategory);
}
return FunctionCategory;
}
bool UK2Node_Event::IsDeprecated() const
{
if (UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode()))
{
return Function->HasMetaData(FBlueprintMetadata::MD_DeprecatedFunction);
}
return false;
}
FString UK2Node_Event::GetDeprecationMessage() const
{
if (UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode()))
{
if (Function->HasMetaData(FBlueprintMetadata::MD_DeprecationMessage))
{
return FString::Printf(TEXT("%s %s"), *LOCTEXT("EventDeprecated_Warning", "@@ is deprecated;").ToString(), *Function->GetMetaData(FBlueprintMetadata::MD_DeprecationMessage));
}
}
return Super::GetDeprecationMessage();
}
UObject* UK2Node_Event::GetJumpTargetForDoubleClick() const
{
if(EventReference.GetMemberParentClass(GetBlueprintClassFromNode()) != NULL && EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->ClassGeneratedBy != NULL && EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->ClassGeneratedBy->IsA(UBlueprint::StaticClass()))
{
UBlueprint* Blueprint = CastChecked<UBlueprint>(EventReference.GetMemberParentClass(GetBlueprintClassFromNode())->ClassGeneratedBy);
TArray<UEdGraph*> Graphs;
Blueprint->GetAllGraphs(Graphs);
for(auto It(Graphs.CreateConstIterator()); It; It++)
{
if((*It)->GetFName() == EventReference.GetMemberName())
{
return *It;
}
}
}
return NULL;
}
Copying //UE4/Dev-Editor to //UE4/Dev-Main (Source: //UE4/Dev-Editor @ 2973866) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2937390 on 2016/04/07 by Cody.Albert #jira UE-29211 Fixed slider to properly bubble unhandled OnKeyDown events Change 2939672 on 2016/04/11 by Richard.TalbotWatkin Made a change to how file check out notifications work. Now the dirty package state is processed at the end of every tick, meaning that packages which are dirtied and then cleaned again are not processed. This fixes an issue where a number of child blueprints were flagged as needing checkout when a parent blueprint was compiled. This also allows multiple packages which are dirtied at the same time to be treated as one transaction. #jira UE-29193 - "Files need check-out" prompt spams Blueprint users Change 2939686 on 2016/04/11 by Richard.TalbotWatkin A number of further improvements to mesh vertex color painting: * Lower LODs are now automatically fixed up for instances which were created in a previous bugged version of the engine. * Since lower LODs cannot currently have their vertex colors edited, their vertex colors are always derived from LOD0. * Fixed a bug when building lower LODs so that vertices in neighboring octree nodes are considered when looking for the nearest vertex from LOD0 which corresponds. * Fixed issue where static meshes with imported LODs would not have the lower LODs' override colors set when "Copy instance vertex colors to source mesh" was used (static meshes with generated LODs were always getting correct override colors). #jira UE-28563 - Incorrectly displayed LOD VertexColor until paint mode is selected Change 2939906 on 2016/04/11 by Nick.Darnell Automation - Adding several enhancements to the automation framework and improving the UI. * Tests in the UI now have a link to the source and line where they orginate. * There's now a general purpose latent lambda command you can use to run arbitrary code latently. * Added Inlined AddCommand for regular and networked commands to the base automation class, to avoid the use of the macro, which prevents breakpoints from working in lambda code. * Front end now has better column displays offering more room to the test name * Changed several events to the automation controller to multicast delegates so that many could hook them. * The UI now refreshes the selection after tests finish so that the output log updates. Change 2939908 on 2016/04/11 by Nick.Darnell Automation - The editor import/export tests are now a complex test and actually sperate out all the tests that can be run, some trickiness was required on the filenames so that they didn't expand into more child tests in the UI. (replacing .'s with _'s) Change 2940028 on 2016/04/11 by Nick.Darnell Automation - Removing the search box from the toolbar. It's now inlined above the test tree. Tweaking the padding to make it look more other windows and make everything not look so squished. Recursive expansion now works on tests. Change 2940066 on 2016/04/11 by Nick.Darnell Automation - Moving the filter group dropdown out of the toolbar and onto the line with the search box above the treeview - additional tweaks to it. Change 2940092 on 2016/04/11 by Jamie.Dale PR #2248: Datatable select next row (Contributed by FineRedMist) Change 2940093 on 2016/04/11 by Jamie.Dale PR #2248: Datatable select next row (Contributed by FineRedMist) Change 2940157 on 2016/04/11 by Jamie.Dale Fixing FTextTest due to some changes made to how currency is formatted Change 2940694 on 2016/04/12 by Richard.TalbotWatkin Fixed issue where vertex override colors were not being propagated correctly for generated lower LODs. #jira UE-29360 - Override Colors not propagated correctly to generated lower LODs Change 2942379 on 2016/04/13 by Richard.TalbotWatkin Fixed issue where entering PIE while selecting an actor in Mesh Paint mode could lead to a MeshPaintStaticMeshAdapter holding onto an invalid pointer to an old mesh component, and causing a crash upon leaving the mode. This can happen because, when loading a new streaming level, the proxy actor can be selected when starting PIE, which will subsequently be added to the tool's internal lists. This needs to be added as a GC reference so that it can be NULLed when forcibly destroyed. #jira UE-29345 - Crash occurs exiting the editor after enabling mesh paint mode and PIEing Change 2942947 on 2016/04/13 by Richard.TalbotWatkin Fixed crash when pasting a material function call node from one project to another in which it is not defined. #jira UE-27087 - Crash when pasting MaterialFunctionCall expressions into the material editor between projects Change 2943452 on 2016/04/14 by Richard.TalbotWatkin Updated F4 debug key binding to match what's in ShowFlags.cpp PR #2197 (contributed by mfortin-bhvr) Change 2943824 on 2016/04/14 by Alexis.Matte #jira UE-29090 Make sure we cannot open the color picker when a property is edit const Change 2943841 on 2016/04/14 by Alexis.Matte #jira UE-28924 tooltip was add for every hierarchy import option Change 2943927 on 2016/04/14 by Alexis.Matte #jira UE-29423 Add Obj support for scene importer Github PR #2272 Change 2943967 on 2016/04/14 by Richard.TalbotWatkin Added relevant fields from FBodyInstance to the FoliageType customizations. #jira UE-20138 - FoliageType has a FBodyInstance but only shows Collision Presets and not other FBodyInstance properties Change 2948397 on 2016/04/19 by Andrew.Rodham Moved FSlateIcon definition to SlateCore It was previously declared as SLATE_API, despite its header residing inside SlateCore. Reviewed by Jamie Dale. Change 2948805 on 2016/04/19 by Andrew.Rodham Editor: Deprecated FName UEdGraphNode::GetPaletteIcon(FLinearColor&); in favor of FSlateIcon UEdGraphNode::GetIconAndTint(FLinearColor&); to allow for icons in external style sets to be used. - Previously, all icons were assumed to reside within FEditorStyle, which is not the case and would create broken icons in the graph editor. All relevant code has been updated to use FSlateIcon structures instead of a simple name. - This change required a significant overhaul to FClassIconFinder to support FSlateIcons. To keep the API clean, FSlateIconFinder now deals with FSlateIcon class icon finding operations, and FClassIconFinder for the most part just adds actor specific logic. #jira UE-26502 Change 2950658 on 2016/04/20 by Alexis.Matte #jira UE-24333 Skinxx workflow, we now output an error if there is mix of material with skinxx and some with no skinxx suffix Change 2950663 on 2016/04/20 by Alexis.Matte #jira UE-29582 When exporting to fbx we have to export each material instance as one fbx material Change 2951240 on 2016/04/21 by Alexis.Matte #jira UE-28473 Make sure light are render properly after importing a fbx scene Change 2951421 on 2016/04/21 by Alexis.Matte #jira UE-29773 fbx skeletalmesh import now support mesh hierarchy Change 2955873 on 2016/04/26 by Richard.TalbotWatkin PR #2225: Fix working package directory from the launch profiles (Contributed by projectgheist) Change 2955965 on 2016/04/26 by Nick.Darnell Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor) Change 2956717 on 2016/04/26 by Andrew.Rodham Editor: World Outliner now correctly calls ProcessEditDelete on editor modes that have asked to process delete operations #jira UE-26968 Change 2956822 on 2016/04/26 by Andrew.Rodham Editor: Fixed actors not being removed from the scene outliner when they are added and removed on the same frame #jira UE-7777 Change 2956931 on 2016/04/26 by Nick.Darnell New Module - UATHelper - Moving the UAT launching code from the MainFrame module into a reusable module other modules can trigger. Change 2956932 on 2016/04/26 by Nick.Darnell Plugins - Now allowing you to package a plugin from the plugin browsing view. Still work in progress. Change 2957164 on 2016/04/26 by Nick.Darnell Hot Reload - Fixing hot reload, it no longer creates a temporary copy of the module manager. Making the copy constructor private on the module manager to prevent this in the future. Change 2957165 on 2016/04/26 by Nick.Darnell Fixing the Editor Mode plugin sample, it no longer provides a bad starting example for where to create your widgets. #jira UE-28456 Change 2957510 on 2016/04/27 by Nick.Darnell PR #2198: Git Plugin implement the Sync operation to update local files using the git pull --rebase command (Contributed by SRombauts) #jira UE-28763 Change 2957511 on 2016/04/27 by Andrew.Rodham Editor: Make favorites button on details panel non-focusable - This was preventing users being able to tab between value fields on the details panel Change 2957610 on 2016/04/27 by Nick.Darnell PR #1836: Git plugin: make initial commit when initializing new project (Contributed by SRombauts) #jira UE-24190 Change 2957667 on 2016/04/27 by Jamie.Dale Fixed crash that could happen in FTextLayout::GetLineViewIndexForTextLocation if passed a bad location #jira OR-18634 Change 2958035 on 2016/04/27 by Nick.Darnell Fixing the DesignerRebuild flag detection so that we can just refresh the slate widget without recreating the preview UObject, which causes the destruction of the details panel, and the slate widget recreation was the only part that was required. Change 2958272 on 2016/04/27 by Jamie.Dale Added FAssetData::GetTagValue to handle getting asset tag values in a type-correct way This allows type-conversion using LexicalConversion, and also has specializations for FString, FText, and FName. #jira UE-12096 Change 2958348 on 2016/04/27 by Jamie.Dale PR #2282: Slate font shutdown order fix (Contributed by FineRedMist) Change 2958352 on 2016/04/27 by Jamie.Dale Fixed the subtitle manager updating the wrong list of subtitles #jira UE-29511 Change 2958390 on 2016/04/27 by Jamie.Dale Removed some old placement-new style array insertions Change 2959360 on 2016/04/28 by Richard.TalbotWatkin Fixed potential crash when mesh painting actors whose geometry adapters are no longer registered. #jira UE-29615 - [CrashReport] UE4Editor_MeshPaint!FEdModeMeshPaint::DoPaint() [meshpaintedmode.cpp:1127] Change 2959724 on 2016/04/28 by Cody.Albert Merging hardware survey gating logic from 4.10 #jira UE-28666 Change 2959807 on 2016/04/28 by Cody.Albert Removed deprecated function call #jira UE-28666 Change 2959894 on 2016/04/28 by Cody.Albert Fix for scroll offset being clamped by content size, not scroll max #jira UE-20676 Change 2960048 on 2016/04/28 by Jamie.Dale Added FAssetData::GetTagValueRef to go along with FAssetData::GetTagValue #jira UE-12096 Change 2960782 on 2016/04/29 by Jamie.Dale Updating code to use the new FText aware asset registry tag functions #jira UE-12096 Change 2960885 on 2016/04/29 by Jamie.Dale Updating code to use the new FText aware asset registry tag functions #jira UE-12096 Change 2961170 on 2016/04/29 by Jamie.Dale Updating code to use the new FText aware asset registry tag functions #jira UE-12096 Change 2961171 on 2016/04/29 by Jamie.Dale Updating code to use the new FText aware asset registry tag functions #jira UE-12096 Change 2961173 on 2016/04/29 by Jamie.Dale Removed some inline duplication on the specialized template functions #jira UE-12096 Change 2963124 on 2016/05/02 by Jamie.Dale FExternalDragOperation can now contain both text and file data at the same time This better mirrors what the OS level drag-and-drop operations are capable of, and some applications will actually give you both bits of data at the same time. #jira UE-26585 Change 2963175 on 2016/05/02 by Jamie.Dale Updated some font editor tooltips to be more descriptive #jira UE-17429 Change 2963290 on 2016/05/02 by Jamie.Dale The Localise UAT command can now be run with a null localisation provider Change 2963305 on 2016/05/02 by Jamie.Dale Fixed minor typo Change 2963402 on 2016/05/02 by Jamie.Dale Cleaned up all the current localization key conflicts and warnings from gathering Engine code #jira UE-25833 Change 2963415 on 2016/05/02 by Jamie.Dale Rephrased a message that could generate a CIS warning #jira UE-25833 Change 2964184 on 2016/05/03 by Jamie.Dale Fixed duplicate "Font" entry in asset picker menu This was caused by PropertyCustomizationHelpers::GetNewAssetFactoriesForClasses using CanCreateNew rather than ShouldShowInNewMenu, as UFont has two factories, but one is supposed to be hidden from the UI. We also now make sure the factories are sorted by display name before being shown in the UI. #jira UE-24903 Change 2966108 on 2016/05/04 by Nick.Darnell Engine - Rearranging the order of ELoadingPhase's enums so that they match the loading order of modules. Change 2966113 on 2016/05/04 by Nick.Darnell [Engine Loop Change] UEngine now defines a Start() function, that subclasses can use to start game related things after initialization of the engine. This is done so that after the Init() call on UEngine, we can then perform a module load for the ELoadingPhase::PostEngineInit phase of loading, then inform the UEngine that it's time to start the game. Therefore, UGameEngine now tells the GameInstance to Start during this phase now. Change 2966121 on 2016/05/04 by Jamie.Dale Config writing improvements when dealing with property values This updates FConfigFile::ShouldExportQuotedString to make sure that a property value containing any characters that FParse::LineExtended will consume when parsing back in the config file (such as { and }, or a trailing \) cause the string to be quoted. This also adds FConfigFile::GenerateExportedPropertyLine to generate the INI key->value lines in a consistent and correctly escaped way, and makes sure that everything that writes out lines to a config file uses it. FConfigCacheIni::SetString and FConfigCacheIni::SetText have been updated to update the value even if it only differs by case. UObject::SaveConfig and UObject::LoadConfig have had some code whitespace fix-up (from a bad merge). Change 2966122 on 2016/05/04 by Jamie.Dale Added a setting to control dialogue wave audio filenames Change 2966481 on 2016/05/04 by Jamie.Dale PR #2336: BUGFIX: Selection of objects in the Content browser from WorldSettings (Contributed by projectgheist) Change 2966887 on 2016/05/04 by Jamie.Dale PR #2336: BUGFIX: Selection of objects in the Content browser from WorldSettings (Contributed by projectgheist) Change 2967488 on 2016/05/05 by Ben.Marsh Changes to support packaging plugins from the editor. * UBT now has an option to explicitly disable hot-reloading in any circumstances. * When running with -module arguments for a monolithic target, UBT will no longer try to relink the executable in source builds (so it's possible to compile plugin libs outside of an installed engine build without having already built UE4Game). * When packaging, a temporary host project is always generated in the output directory to avoid invalidating intermediates in the source directory. * An empty Config\FilterPlugin.ini file is written out with instructions on how to list additional files to package if it is not already present. Change 2967947 on 2016/05/05 by Nick.Darnell PR #2358: Properly display Mip Level Count and Format for UTexture2DDynamic Textures (Contributed by Allegorithmic) #jira UE-30371 Change 2968333 on 2016/05/05 by Jamie.Dale Fixed MultiLine not working with arrays of string or text properties - The detail customizations for FString and FText properties now read the meta-data off the correct property. - The UDS editor now lets you set the "MultiLine" meta-data on arrays of FString and FText properties. - Fixed changing the "MultiLine" flag on a UDS property not rebuilding the default value editor. - Fixed the default values panel in the UDS editor having a title area. #jira UE-30392 Change 2968999 on 2016/05/06 by Jamie.Dale Fixed infinite loop in the editor if a directory that is being watched is deleted #jira UE-30172 Change 2969105 on 2016/05/06 by Richard.TalbotWatkin Fixed issue where opening a submenu while the parent menu had a text box focused would lead to a crash. The graph node comment text widget now only dismisses all menus if the text commit info implies that it was committed by some user action. #jira UE-29086 - Crash When Typing a Node Comment and Hovering Over the Alignment Option Change 2969440 on 2016/05/06 by Jamie.Dale Significant performance improvements when pasting a large amount of text #jira UE-19712 Change 2969619 on 2016/05/06 by Andrew.Rodham Auto-reimport is now disabled inside an editor running in unattended mode Change 2969621 on 2016/05/06 by Jamie.Dale Added the ability to override the subtitle used on a dialogue wave This is useful for effort sounds, plus some other cases, such as characters speaking in a foreign language not known to the player. #jira UETOOL-795 Change 2970588 on 2016/05/09 by Chris.Wood Fix typo in operator expression in UEndUserSettings::SetSendAnonymousUsageDataToEpic() [UE-26958] - GitHub 2056 : Fixing typo in the operator #2056 Change 2971151 on 2016/05/09 by Chris.Wood Logging ensure fails as errors. Automated tests with ensure fails will be unsuccessful. [UE-19579] - If an ensure() fails within an automated test, the test can still show a positive result. [UE-26575] - GitHub 2030 : Add error-severity message to log on ensure. PR #2030 Change 2971267 on 2016/05/09 by Alexis.Matte Wrong parameter when calling GetImportOptions #jira UE-30299 Change 2972073 on 2016/05/10 by Richard.TalbotWatkin Fixed UModel methods which make surfaces as modified. #jira UE-28831 - Unable to undo material placement on BSP Change 2972329 on 2016/05/10 by Nick.Darnell Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor) Change 2972887 on 2016/05/10 by Alexis.Matte #jira UE-30167 We now import the geometric transform also when we uncheck the absolute transform in the vertex. Change 2973664 on 2016/05/11 by Nick.Darnell Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor) Change 2973717 on 2016/05/11 by Nick.Darnell Fixing compiler issues from main merge. #jira UE-30590 Change 2973846 on 2016/05/11 by Jamie.Dale Exposed FConfigValue::ExpandValue and added FConfigValue::CollapseValue These are both static and can be used to expand or collapse the macros used in our config files (mostly when dealing with paths), in code that has to deal with the config system, but isn't internal to the config system (mostly things that deal with default configs outside of UObjects). The old non-static version of FConfigValue::ExpandValue is now FConfigValue::ExpandValueInternal, which just calls FConfigValue::ExpandValue on SavedValue and ExpandedValue. This also changes some code that was using FString.Replace to use FString.ReplaceInline. This reduces allocations, and also allows us to avoid another string comparison to see whether the strings are identical (as ReplaceInline returns the number of replacements that were made). Change 2973847 on 2016/05/11 by Jamie.Dale Changing the loading phase in the localization dashboard now writes to the default config #jira UE-30482 Change 2973866 on 2016/05/11 by Jamie.Dale Deprecated some functions that were taking an unused position. These unused parameters caused confusion and lead to UE-30276. The old versions have been deprecated, and new versions without those parameters have been added. Existing code has been updated to call the non-deprecated version. - FViewportFrame::ResizeFrame - FSceneViewport::ResizeFrame - FSceneViewport::ResizeViewport [CL 2973886 by Nick Darnell in Main branch]
2016-05-11 11:05:13 -04:00
FSlateIcon UK2Node_Event::GetIconAndTint(FLinearColor& OutColor) const
{
static FSlateIcon Icon("EditorStyle", "GraphEditor.Event_16x");
return Icon;
}
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2884592 on 2016/02/27 by Maciej.Mroz Packages containing Dynamic Types are listed as dependencies in FAsyncPackage::LoadImports #codereview Robert.Manuszewski Change 2884607 on 2016/02/27 by Maciej.Mroz CDO of DynamicClass is postponed as a regular CDO creation. This change is risky (it still requires some tests), but it seems to be necessary for solving (cyclic) dependencies while Async Loading. #codereview Robert.Manuszewski, Mike.Beach Change 2885915 on 2016/02/29 by Michael.Schoell Struct pins on exposed on spawn properties will no longer error on compile if they do not have a pin connected to them. UKismetSystemLibrary::SetStructurePropertyByName's Value pin is now marked as a AutoCreateRefTerm so literals can be used on the auto-generated node. Modified FKismetCompilerUtilities::GenerateAssignmentNodes to assign the literal value into the pin, which in turn allows it to expand into an auto-ref term. #jira UE-23130 - ExposeOnSpawn struct properties are not handled correctly Change 2887269 on 2016/03/01 by Maciej.Mroz Fixes related to DisregardForGC: - merged 2885687 from Dev-Core branch - ensure CDO of newly added class is created in CloseDisregardForGC Change 2887273 on 2016/03/01 by Maciej.Mroz GUObjectArray.CloseDisregardForGC(); is called before GUObjectArray.DisableDisregardForGC(); Change 2892502 on 2016/03/03 by Maciej.Mroz More descriptive ensures. Change 2892509 on 2016/03/03 by Maciej.Mroz Minor changes in Orion code, necessary to compile the project with nativized Blueprints #codereview David.Ratti Change 2892513 on 2016/03/03 by Maciej.Mroz Blueprint C++ Conversion: there is no crash when a asset used by a nativized class wasn't loaded. Change 2894347 on 2016/03/04 by Michael.Schoell Fixed crash with the Array Item Get node in the disassembler. #jira UE-27734 - Error in TeamLobby Change 2895311 on 2016/03/04 by Michael.Schoell Right click and using "Find References" on an event node in either the MyBlueprint window or a graph panel, will search the function's name, not the node's title (drops the Event text). #jira UE-27335 - GitHub 2092 : Skip "Event " Prefix when Finding References for Events PR #2092: Skip "Event " Prefix when Finding References for Events (Contributed by mollstam) Change 2896714 on 2016/03/07 by Ben.Cosh Fixes for a few related crash/assert issues when profiling blueprints that use event dispatchers/call event functions and latent nodes. #UE-27090 - Crash when calling an Event Dispatcher within a Sequence node with the Blueprint Profiler on #Proj KismetCompiler, BlueprintProfiler, BlueprintGraph, Kismet, CoreUObject #codereview Phillip.Kavan Change 2897335 on 2016/03/07 by Dan.Oconnor Unshelved from pending changelist '2889006': We now copy UObjects that are assigned to Instance properties via UObjectPropertyBase::ImportText_Internal #jira UE-26310 Change 2899151 on 2016/03/08 by Phillip.Kavan [UEBP-112] BP profiler - pure node timings change summary: - first-pass revisions for tracking/visualizing pure node execution timings while profiling - trace path debugging support (default: off) #codereview Ben.Cosh Change 2901763 on 2016/03/09 by Michael.Schoell Can undo/redo nodes added using shortcuts. Also fixed issue with macro nodes added using shortcuts not being selected. #jira UE-28027 - Cannot Undo Blueprint Nodes Placed Using Shortcuts Change 2902762 on 2016/03/10 by Phillip.Kavan [UE-28167] Fix compile-time crash caused by intermediate pure nodes when the BP profiler view is active. change summary: - modified FBlueprintExecutionContext::MapNodeExecution() to avoid impure nodes when mapping the pure node execution chain. #codereview Ben.Cosh Change 2907961 on 2016/03/14 by Maciej.Mroz #jira UE-28249 Cooked win32 Fortnite server crash loading in to FastCook map Manually integrated CL#2906835 from Dev-Core - Reset last non-gc index when disabling disregard for GC pool Change 2908013 on 2016/03/14 by Maciej.Mroz EmptyLinkFunctionForGeneratedCode function for all .generated.*.cpp files Fixed problem when stuff from some .generated.*.cpp files for nativized Blueprints plugin were not linked at all. #codereview Robert.Manuszewski, Steve.Robb Change 2908033 on 2016/03/14 by Maciej.Mroz Various fixes and improvements related to initialization sequence of converted Dynamic Classes. [CL 2910931 by Mike Beach in Main branch]
2016-03-15 19:07:47 -04:00
FString UK2Node_Event::GetFindReferenceSearchString() const
{
FString FunctionName = EventReference.GetMemberName().ToString(); // If we fail to find the function, still want to search for its expected name.
if (UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode()))
{
FunctionName = UEdGraphSchema_K2::GetFriendlySignatureName(Function).ToString();
}
return FunctionName;
}
bool UK2Node_Event::AreEventNodesIdentical(const UK2Node_Event* InNodeA, const UK2Node_Event* InNodeB)
{
return InNodeA->EventReference.GetMemberName() == InNodeB->EventReference.GetMemberName()
&& InNodeA->EventReference.GetMemberParentClass(InNodeA->GetBlueprintClassFromNode()) == InNodeB->EventReference.GetMemberParentClass(InNodeB->GetBlueprintClassFromNode());
}
bool UK2Node_Event::HasExternalDependencies(TArray<class UStruct*>* OptionalOutput) const
{
const UBlueprint* SourceBlueprint = GetBlueprint();
UFunction* Function = EventReference.ResolveMember<UFunction>(GetBlueprintClassFromNode());
const UClass* SourceClass = Function ? Function->GetOwnerClass() : nullptr;
const bool bResult = (SourceClass != NULL) && (SourceClass->ClassGeneratedBy != SourceBlueprint);
if (bResult && OptionalOutput)
{
OptionalOutput->AddUnique(Function);
}
const bool bSuperResult = Super::HasExternalDependencies(OptionalOutput);
return bSuperResult || bResult;
}
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#undef LOCTEXT_NAMESPACE