2016-12-08 08:52:44 -05:00
|
|
|
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
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_MatineeController.h"
|
|
|
|
|
#include "EdGraphSchema_K2.h"
|
|
|
|
|
#include "K2Node_Event.h"
|
|
|
|
|
#include "Kismet2/BlueprintEditorUtils.h"
|
2014-09-18 19:04:57 -04:00
|
|
|
|
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 "BlueprintNodeBinder.h"
|
2014-09-18 19:04:57 -04:00
|
|
|
#include "BlueprintActionDatabaseRegistrar.h"
|
|
|
|
|
#include "BlueprintBoundNodeSpawner.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
#include "KismetCompiler.h"
|
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 "MatineeDelegates.h"
|
2014-05-22 06:52:28 -04:00
|
|
|
#include "Matinee/MatineeActor.h"
|
|
|
|
|
#include "Matinee/InterpData.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-10-14 10:29:11 -04:00
|
|
|
UK2Node_MatineeController::UK2Node_MatineeController(const FObjectInitializer& ObjectInitializer)
|
|
|
|
|
: Super(ObjectInitializer)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-01-23 20:24:45 -05:00
|
|
|
if (GetOutermost() != GetTransientPackage())
|
|
|
|
|
{
|
|
|
|
|
// Register the delegate ONLY if this isn't the transient package (temp node during compilation)
|
|
|
|
|
FMatineeDelegates::Get().OnEventKeyframeAdded.AddUObject(this, &UK2Node_MatineeController::OnEventKeyframeAdded);
|
|
|
|
|
FMatineeDelegates::Get().OnEventKeyframeRenamed.AddUObject(this, &UK2Node_MatineeController::OnEventKeyframeRenamed);
|
|
|
|
|
FMatineeDelegates::Get().OnEventKeyframeRemoved.AddUObject(this, &UK2Node_MatineeController::OnEventKeyframeRemoved);
|
|
|
|
|
}
|
2014-04-23 20:18:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UK2Node_MatineeController::BeginDestroy()
|
|
|
|
|
{
|
|
|
|
|
Super::BeginDestroy();
|
|
|
|
|
|
|
|
|
|
FMatineeDelegates::Get().OnEventKeyframeAdded.RemoveAll(this);
|
|
|
|
|
FMatineeDelegates::Get().OnEventKeyframeRenamed.RemoveAll(this);
|
|
|
|
|
FMatineeDelegates::Get().OnEventKeyframeRemoved.RemoveAll(this);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UK2Node_MatineeController::AllocateDefaultPins()
|
|
|
|
|
{
|
|
|
|
|
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
|
|
|
|
|
|
|
|
|
|
// Preload the matinee data, if needed, so that we can have all the event tracks we need
|
|
|
|
|
if (MatineeActor != NULL)
|
|
|
|
|
{
|
|
|
|
|
PreloadObject(MatineeActor);
|
|
|
|
|
PreloadObject(MatineeActor->MatineeData);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Create the "finished" playing pin
|
|
|
|
|
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_MatineeFinished);
|
|
|
|
|
|
|
|
|
|
// Create pins for each event
|
|
|
|
|
if(MatineeActor != NULL && MatineeActor->MatineeData != NULL)
|
|
|
|
|
{
|
|
|
|
|
TArray<FName> EventNames;
|
|
|
|
|
MatineeActor->MatineeData->GetAllEventNames(EventNames);
|
|
|
|
|
|
|
|
|
|
for(int32 i=0; i<EventNames.Num(); i++)
|
|
|
|
|
{
|
|
|
|
|
FName EventName = EventNames[i];
|
|
|
|
|
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, EventName.ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Super::AllocateDefaultPins();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FLinearColor UK2Node_MatineeController::GetNodeTitleColor() const
|
|
|
|
|
{
|
|
|
|
|
return FLinearColor(1.0f, 0.51f, 0.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-04-23 18:30:37 -04:00
|
|
|
FText UK2Node_MatineeController::GetNodeTitle(ENodeTitleType::Type TitleType) const
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
if(MatineeActor != NULL)
|
|
|
|
|
{
|
2014-04-23 18:30:37 -04:00
|
|
|
return FText::FromString(MatineeActor->GetActorLabel());
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-04-23 18:30:37 -04:00
|
|
|
return NSLOCTEXT("K2Node", "InvalidMatineeController", "INVALID MATINEECONTROLLER");
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AActor* UK2Node_MatineeController::GetReferencedLevelActor() const
|
|
|
|
|
{
|
|
|
|
|
return MatineeActor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UEdGraphPin* UK2Node_MatineeController::GetFinishedPin() const
|
|
|
|
|
{
|
|
|
|
|
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
|
|
|
|
|
return FindPin(K2Schema->PN_MatineeFinished);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UK2Node_MatineeController::ExpandNode(FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
|
|
|
|
|
{
|
|
|
|
|
if (SourceGraph != CompilerContext.ConsolidatedEventGraph)
|
|
|
|
|
{
|
|
|
|
|
CompilerContext.MessageLog.Error(*FString::Printf(*NSLOCTEXT("KismetCompiler", "InvalidNodeOutsideUbergraph_Error", "Unexpected node @@ found outside ubergraph.").ToString()), this);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Super::ExpandNode(CompilerContext, SourceGraph);
|
|
|
|
|
|
|
|
|
|
if (MatineeActor != NULL)
|
|
|
|
|
{
|
|
|
|
|
UFunction* MatineeEventSig = FindObject<UFunction>(AMatineeActor::StaticClass(), TEXT("OnMatineeEvent__DelegateSignature"));
|
|
|
|
|
check(MatineeEventSig != NULL);
|
|
|
|
|
|
|
|
|
|
const UEdGraphSchema_K2* Schema = CompilerContext.GetSchema();
|
|
|
|
|
|
|
|
|
|
// Create event for each exec output pin
|
|
|
|
|
for(int32 PinIdx=0; PinIdx<Pins.Num(); PinIdx++)
|
|
|
|
|
{
|
|
|
|
|
UEdGraphPin* MatineePin = Pins[PinIdx];
|
|
|
|
|
if(MatineePin->Direction == EGPD_Output && MatineePin->PinType.PinCategory == Schema->PC_Exec)
|
|
|
|
|
{
|
|
|
|
|
FName EventFuncName = MatineeActor->GetFunctionNameForEvent( FName(*(MatineePin->PinName)) );
|
|
|
|
|
|
Copying //UE4/Dev-Blueprints to //UE4/Dev-Main (Source: //UE4/Dev-Blueprints @ 3042808)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3026763 on 2016/06/24 by Phillip.Kavan
[UE-32259] Fix missing heat map coloration on pure nodes.
change summary:
- modified FScriptExecutionNode::RefreshStats() to ensure that child nodes are updated for 'standard' exec node types.
#jira UE-32259
Change 3026829 on 2016/06/24 by Mike.Beach
Mirroring CL 3025832 from Release-4.12
Guarding GetClassDefault nodes against asserts while loading cyclically dependent content. Regenerating one Blueprint could trigger a ReconstructNode() in a separate Blueprint (that had already been regenerated). However, not all objects in that Blueprint's package have been post-loaded, so object Rename() will assert is you try to reset loaders with it.
#jira UE-32356
Change 3026888 on 2016/06/24 by Mike.Beach
PR #2460: Functionality to flag blueprint as abstract (Contributed by Pierdek)
Change 3027245 on 2016/06/24 by Phillip.Kavan
[UEBP-180] Alternate treatment for Blueprint profiler tree view node expander icon (to differentiate from exec pin icons).
change summary:
- added SProfilerStatExpander (from BenC)
- modified original to replace indicator icons w/ FontAwesome glyphs (they're a bit clearer) - see screenshot attached to JIRA
#jira UEBP-180
Change 3027279 on 2016/06/24 by Ryan.Rauschkolb
Fixed issue where unsupported pins could be added to custom Event nodes which can lead to a crash
#jira UE-31148
Change 3027606 on 2016/06/25 by Dan.Oconnor
Back out changelist 3027279, this change breaks custom events coupled to multicast delegate nodes (see ProjRocket.uasset in shooter game for an example)
Change 3028731 on 2016/06/27 by Ben.Cosh
Minor change to the spacing around the new expander icons for the blueprint profiler.
#Jira UEBP-180 - Pin icons are too similar to the tree expander icons in the node execution graph display.
#Proj Kismet
Change 3028740 on 2016/06/27 by Ben.Cosh
This change modifies the way the blueprint profiler detects and maps delegate events that are created at blueprint compile time.
#Jira UE-32055 - Assert when profiling timelines in the blueprint profiler
#Proj BlueprintProfiler, KismetCompiler, BlueprintGraph, LiveEditor, Kismet, Engine
Change 3028844 on 2016/06/27 by Maciej.Mroz
#jira UE-32470 Nativized Orion: Sparrow has no Rentless ability.
Better way to find Placeholder classes in BlueprintNativeCodeGenModule.
Change 3029573 on 2016/06/27 by Ryan.Rauschkolb
Fixed issue where Preview Connection would be drawn incorrectly when an input and output pin share the same name
#jira UE-32211
Change 3030335 on 2016/06/28 by Maciej.Mroz
#jira UE-30858 Nativized Orion - Some particle effects are not rendering
List of AssetRegistrySearchable properties, that should be stored for DynamicClasses in moved to .ini file.
Added SearchDynamicClassCues function in GameplayCueManager.cpp
Change 3030492 on 2016/06/28 by Ben.Cosh
CIS Mac Build fix
Change 3030494 on 2016/06/28 by Ben.Cosh
This change reworks the way the blueprint profiler maps latent re-entry points to address problems that could be triggered when multiple re-entries happenned within close proximity.
#Jira UE-32452 - Blueprint profiler asserts when a second latent entry is triggered
#Proj BlueprintProfiler, CoreUObject, Engine, Kismet
Change 3030612 on 2016/06/28 by Maciej.Mroz
typo fixed
Change 3031461 on 2016/06/28 by Dan.Oconnor
Fixed for crash involving a stale UEdGraphPin after performing an undo/redo operation inolving UEdGraphNode(s)
#jira UE-32553
Change 3031537 on 2016/06/28 by Ben.Cosh
Fix for a problem introduced in CL 3030494 and recent graph pin changes that caused problems uniquely naming tunnel entry/exit pins.
#Jira UE-32578 - Crash when profiling blueprint containing a for-loop
#Proj BlueprintProfiler
Change 3031556 on 2016/06/28 by Ben.Cosh
This fixes a problem with the profiler tracking of PIE actor instances adding a mechanism to refresh the actor references when a subsequent PIE session is started.
#Jira UE-32595 - Running two subsequent PIE sessions with a latent entry point causes an assert.
#Proj BlueprintProfiler, Kismet
Change 3031588 on 2016/06/28 by Ryan.Rauschkolb
Fixed issue where unsupported pins could be added to custom Event nodes which can lead to a crash
#jira UE-31148
Change 3031887 on 2016/06/28 by Dan.Oconnor
Fix for crash caused by stale pin access in SGraphPin, also fixes 'double opacity' effect when ctrl+dragging off of a macro
#jira UE-32604
Change 3031932 on 2016/06/28 by Dan.Oconnor
Fix for major regression in pin value visibility
#jira UE-32614
Change 3032568 on 2016/06/29 by Phillip.Kavan
[UE-31681] Ensure that cached component data cache template objects are referenced during garbage collection.
change summary:
- modified AActor::AddReferencedObjects() to include CurrentTransactionAnnotation
- added UChildActorComponent::AddReferencedObjects() to include CachedInstanceData
- also added FChildActorComponentInstanceData::AddReferencedObjects() to include ComponentInstanceData (just in case some future task happens to trigger a reference gather during its lifetime)
additional notes:
- should also resolve UE-32558
#jira UE-31681
Change 3032998 on 2016/06/29 by Dan.Oconnor
Fixing shutdown crash after LinkedTo lists are corrupted. An ensure couldn't fire when a node had already been destroyed. UE-32631 tracks the actual ensure.
#jira UE-32634
Change 3033448 on 2016/06/29 by Ryan.Rauschkolb
Discard Return Nodes that have no outputs when collapsing to function
#jira UE-23381
Change 3034407 on 2016/06/30 by Phillip.Kavan
[UE-32675] Fix no-editor compile issue.
Change 3034691 on 2016/06/30 by Ryan.Rauschkolb
Fixed issue where Macro nodes with ambiguous links could be collapsed into a function
Change 3034701 on 2016/06/30 by Ryan.Rauschkolb
Cleaned up UEdGraphSchema_K2::GetVariableTypeTree to use a filter rather than several booleans
Change 3035093 on 2016/06/30 by Maciej.Mroz
#jira UE-32683 BP_Hero Blueprint failing to compile in Orion - K2Node_CustomEvent_1050 is out of date
Temporary fix.
Change 3035440 on 2016/07/01 by Maciej.Mroz
#jira UE-32706 Nativized Orion crash - Cannot find "Root" subobject in ABP_HeroPedestal_C...
Make sure, the CDO of DynamicClass (and its subobjects) have AsyncLoading flag cleared.
Change 3035442 on 2016/07/01 by Maciej.Mroz
Added UDynamicClass::FindArchetype
#jira UE-30667 Ground material in Agora incorrect in Nativized Orion
Change 3036233 on 2016/07/01 by Dan.Oconnor
Proper handling of null pin references in compiler results logs
Change 3036541 on 2016/07/01 by Dan.Oconnor
Fix for more assymetry in LinkedTo after undo/redo. This solution addresses both UE-32645 and UE-32553. The key to correct behavior is to explictly detect the case where only one of the two nodes in a peer (LinkedTo) relationship are in the transaction buffer. Added IsObjectTransacting to transaction interface to detect this.
#jira UE-32645
Change 3036581 on 2016/07/02 by Dan.Oconnor
Non-editor fix
Change 3036632 on 2016/07/02 by Maciej.Mroz
Removed too strict check in BlueprintNativeCodeGenModule
Change 3036715 on 2016/07/02 by Maciej.Mroz
#jira UE-32612 Odin emits a error when nativized - attempting to access a hidden boolean bitfield property
- Private bitfield can be used as LHS expression in generated code.
- Refactoring. Introduced ENativizedTermUsage.
Change 3037014 on 2016/07/04 by Maciej.Mroz
#jira UE-32729 Orion failing to package for PS4 with Nativization
Make sure that temporary variable used in ternary operator: "context ? context->variable : temp-variable", has exactly the same type as the wanted variable.
Change 3037300 on 2016/07/05 by Maciej.Mroz
#jira UE-31756 Fixup hardcoded function names in BP=>Cpp backend
Change 3037303 on 2016/07/05 by Maciej.Mroz
#jira UE-31756
Nativization - fixed hardcoded string.
Change 3037307 on 2016/07/05 by Maciej.Mroz
AutomationTool:
Fixed issue: A nativized client was compiled with both client and server NativizedAssets plugins.
Paths to nativized BP plugin is stored in a map.
Change 3037712 on 2016/07/05 by Mike.Beach
Adding a non-const version of MultiFindPointer() for TMultiMap.
Change 3037790 on 2016/07/05 by Mike.Beach
Fixing a bug where overridden components in Blueprints could load with cleared properties - this could happen in cyclically dependent parent/child Blueprints (where the child's component would be zeroed). In this case, the Blueprint's CDO would be deferred, so to solve this new issue we now defer the Blueprint's sub-object overrides as well.
#jira UE-32693
Change 3038014 on 2016/07/05 by Ben.Cosh
Refactor of the blueprint profiler tunnel mapping and playback to address issues blocking MVP
#Jira UE-32056 - The blueprint profiler can still get hung up with cyclic links in the graph
#Proj Kismet, BlueprintProfiler, KismetCompiler, BlueprintGraph, UnrealEd
Change 3038533 on 2016/07/05 by Mike.Beach
PR #2558: Stopping Zoom-to-Fit On User Input (Fixed) (Contributed by MichaelSchoell)
Change 3038608 on 2016/07/05 by Dan.Oconnor
Fix for crash when altering ConstructObjectFromClass nodes, removed now unused InvalidateAndTrash function from UEdGraphPin, removed subpin leak counter
#jira FORT-26495
Change 3038770 on 2016/07/05 by Dan.Oconnor
Hiding TThreadSingleton<FBlueprintExceptionTracker>::Get() to fix clang for windows link error
#jira UE-31935
Change 3038841 on 2016/07/05 by Dan.Oconnor
Simple null check to prevent crash after loading a blueprint to diff. The diff'd blueprint is ending up in other blueprint's DependentBlueprintsToRecompile, for now this is the safest fix
#jira UE-31115
Change 3039179 on 2016/07/06 by Maciej.Mroz
#jira UE-31987 Editor crashes when transforming actor after applying instances changes
Selected (in Level editor) instance components are still selected after they are converted to regular components.
Change 3039216 on 2016/07/06 by Maciej.Mroz
#jira UE-31767 [CrashReport] UE4Editor_Engine!AActor::GetLevel() [actor.cpp:1663]
FIxed unsafe code.
Change 3040046 on 2016/07/06 by Ben.Cosh
This fixes a problem found where tunnel instances inside tunnel graphs fail to map correctly in the blueprint profiler
#Jira UE-32862 - Tunnel instances inside tunnels do not map correctly in the blueprint profiler
#Proj BlueprintProfiler
Change 3040061 on 2016/07/06 by Ben.Cosh
fix for bad unshelve before submit in CL 3040046
- Phillip already reviewed this version of the file and not what was actually submitted.
Change 3040346 on 2016/07/06 by Maciej.Mroz
#jira UE-32840 //UE4/Dev-Blueprints: UE4_StaticAnalysis completed with Warnings - 2 Warnings
Fix(?) for warning C28182
Change 3040349 on 2016/07/06 by Dan.Oconnor
Updating test data
Change 3040473 on 2016/07/06 by Dan.Oconnor
Fix SMyBlueprint in blueprint diff tool so that kismet inspector is updated with the object selected in SMyBlueprint, needed to investigate UE-18200
Change 3040536 on 2016/07/06 by Dan.Oconnor
Call to APITestFunction
Change 3040565 on 2016/07/06 by Dan.Oconnor
Clone saved GeneratedClass when not doing COL. Groundwork to fix for UE-17268.
Change 3040603 on 2016/07/06 by Dan.Oconnor
PR #2539: Option to disable Grid in the blueprint and material editor and change grid colors (Contributed by CelPlays)
#jira UE-32497
Change 3040798 on 2016/07/07 by Maciej.Mroz
Fixed warning C6011: Dereferencing NULL pointer 'Object'.
Added some comments.
#jira UE-32840
Change 3041185 on 2016/07/07 by Ben.Cosh
This fixes problems with the blueprint profiler with name collisions for nodes in different graphs and improves nested tunnel detection.
#Jira UE-32862 - Tunnel instances inside tunnels do not map correctly in the blueprint profiler
#Jira UE-32889 - Name collisions can now occur in the blueprint profiler for stat nodes.
#Proj BlueprintProfiler, Kismet
Notes:
This attempts to continue to address fall out from CL 3040046 to improve stability.
Previously execution nodes were patched into the function contexts that called a tunnel instance. However this proved problematic after spotting a rare case where node names collide between
between event and tunnel graphs and caused havok in the node mapping. This change moves to an approach that patches in tunnel contexts and any dependent contexts and instead attempts
to locate critical path nodes using a new node search system making use of these child function contexts.
CL 3040046 also modified TunnelContext's to be actually more representative of a tunnel instance context, I have updated naming conventions to reflect this for clarity.
The changes here also add a single function context for tunnel graphs which contain the bulk of the nodes in the graph and the tunnel instance contexts reference this and make use of it to create
non boundary / tunnel instance nodes so they are located in a single place for all instances of that tunnel graph.
Change 3041603 on 2016/07/07 by Dan.Oconnor
Fix for check failure: PreviousCDO != nullptr, when loading blueprints that have circularly dependent interfaces
#jira UE-31639
Change 3042058 on 2016/07/07 by Dan.Oconnor
Ensures that the correct ComponentClass is assigned to our template node. This pins are normally allocated lazilly in BlueprintActionFilterImpl::HasMatchingPin, so not a huge change
#jira UE-32769
Change 3042468 on 2016/07/08 by Maciej.Mroz
#jira UE-32882, UE-32887
Fixed Crash in UHT.
Fixed "Ambiguous search" error, when delegate has owner class declared.
Change 3042739 on 2016/07/08 by Maciej.Mroz
Nativization. Included headers for native subobjects.
Change 3042747 on 2016/07/08 by Maciej.Mroz
Minor changes in Orion code, necessary to compile the project with nativized Blueprints
Change 3042758 on 2016/07/08 by Maciej.Mroz
"OrionGame.h" is included in NativizedAssets module.
[CL 3043181 by Mike Beach in Main branch]
2016-07-08 14:59:19 -04:00
|
|
|
UK2Node_Event* MatineeEventNode = CompilerContext.SpawnIntermediateEventNode<UK2Node_Event>(this, MatineePin, SourceGraph);
|
2015-02-06 09:41:28 -05:00
|
|
|
MatineeEventNode->EventReference.SetFromField<UFunction>(MatineeEventSig, false);
|
2014-03-14 14:13:41 -04:00
|
|
|
MatineeEventNode->CustomFunctionName = EventFuncName;
|
|
|
|
|
MatineeEventNode->bInternalEvent = true;
|
|
|
|
|
MatineeEventNode->AllocateDefaultPins();
|
|
|
|
|
|
|
|
|
|
// Move connection from matinee output to event node output
|
|
|
|
|
UEdGraphPin* EventOutputPin = Schema->FindExecutionPin(*MatineeEventNode, EGPD_Output);
|
|
|
|
|
check(EventOutputPin != NULL);
|
2014-04-23 17:45:37 -04:00
|
|
|
CompilerContext.MovePinLinksToIntermediate(*MatineePin, *EventOutputPin);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-04-23 20:18:55 -04:00
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-09-18 19:04:57 -04:00
|
|
|
void UK2Node_MatineeController::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const
|
|
|
|
|
{
|
2014-10-10 17:48:56 -04:00
|
|
|
UClass* ActionKey = GetClass();
|
|
|
|
|
if (!ActionRegistrar.IsOpenForRegistration(ActionKey))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-18 19:04:57 -04:00
|
|
|
auto CanBindObjectLambda = [](UObject const* BindingObject)
|
|
|
|
|
{
|
|
|
|
|
if (AMatineeActor const* Actor = Cast<AMatineeActor>(BindingObject))
|
|
|
|
|
{
|
|
|
|
|
// Make sure the Actor has a world
|
|
|
|
|
if (Actor->GetWorld())
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
|
2014-09-29 14:31:08 -04:00
|
|
|
auto UiSpecOverride = [](const FBlueprintActionContext& /*Context*/, const IBlueprintNodeBinder::FBindingSet& Bindings, FBlueprintActionUiSpec* UiSpecOut)
|
2014-09-18 19:04:57 -04:00
|
|
|
{
|
2014-09-29 14:31:08 -04:00
|
|
|
if (Bindings.Num() == 1)
|
2014-09-18 19:04:57 -04:00
|
|
|
{
|
2014-09-29 14:31:08 -04:00
|
|
|
UiSpecOut->MenuName = FText::Format(NSLOCTEXT("K2Node", "MatineeeControllerTitle", "Create a Matinee Controller for {0}"),
|
|
|
|
|
FText::FromString((*(Bindings.CreateConstIterator()))->GetName()));
|
2014-09-18 19:04:57 -04:00
|
|
|
}
|
2014-09-29 14:31:08 -04:00
|
|
|
else if (Bindings.Num() > 1)
|
2014-09-18 19:04:57 -04:00
|
|
|
{
|
2014-09-29 14:31:08 -04:00
|
|
|
UiSpecOut->MenuName = FText::Format(NSLOCTEXT("K2Node", "MultipleMatineeeControllerTitle", "Create Matinee Controllers for {0} selected MatineeActors"),
|
|
|
|
|
FText::AsNumber(Bindings.Num()));
|
2014-09-18 19:04:57 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-09-29 14:31:08 -04:00
|
|
|
UiSpecOut->MenuName = NSLOCTEXT("K2Node", "FallbackMatineeeControllerTitle", "Error: No MatineeActors in Context");
|
2014-09-18 19:04:57 -04:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
auto PostBindSetupLambda = [](UEdGraphNode* NewNode, UObject* BindObject)
|
|
|
|
|
{
|
|
|
|
|
UK2Node_MatineeController* MatineeNode = CastChecked<UK2Node_MatineeController>(NewNode);
|
|
|
|
|
MatineeNode->MatineeActor = CastChecked<AMatineeActor>(BindObject);
|
2015-09-08 17:52:27 -04:00
|
|
|
MatineeNode->MatineeActor->MatineeControllerName = MatineeNode->GetFName();
|
2014-09-18 19:04:57 -04:00
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
|
2014-10-01 18:15:54 -04:00
|
|
|
auto FindPreExistingNodeLambda = []( const UBlueprint* Blueprint, IBlueprintNodeBinder::FBindingSet const& BindingSet ) -> UEdGraphNode*
|
|
|
|
|
{
|
|
|
|
|
TArray<UK2Node_MatineeController*> ExistingMatineeControllers;
|
|
|
|
|
FBlueprintEditorUtils::GetAllNodesOfClass(Blueprint, ExistingMatineeControllers);
|
|
|
|
|
for (auto Controller : ExistingMatineeControllers)
|
|
|
|
|
{
|
|
|
|
|
if (BindingSet.Contains( Controller->MatineeActor ))
|
|
|
|
|
{
|
|
|
|
|
return Controller;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return nullptr;
|
|
|
|
|
};
|
|
|
|
|
|
2014-09-18 19:04:57 -04:00
|
|
|
UBlueprintBoundNodeSpawner* NodeSpawner = UBlueprintBoundNodeSpawner::Create(GetClass());
|
|
|
|
|
NodeSpawner->CanBindObjectDelegate = UBlueprintBoundNodeSpawner::FCanBindObjectDelegate::CreateStatic(CanBindObjectLambda);
|
2014-09-29 14:31:08 -04:00
|
|
|
NodeSpawner->OnBindObjectDelegate = UBlueprintBoundNodeSpawner::FOnBindObjectDelegate::CreateStatic(PostBindSetupLambda);
|
|
|
|
|
NodeSpawner->DynamicUiSignatureGetter = UBlueprintBoundNodeSpawner::FUiSpecOverrideDelegate::CreateStatic(UiSpecOverride);
|
2014-10-01 18:15:54 -04:00
|
|
|
NodeSpawner->FindPreExistingNodeDelegate = UBlueprintBoundNodeSpawner::FFindPreExistingNodeDelegate::CreateStatic( FindPreExistingNodeLambda );
|
2014-10-10 17:48:56 -04:00
|
|
|
ActionRegistrar.AddBlueprintAction(ActionKey, NodeSpawner);
|
2014-09-18 19:04:57 -04:00
|
|
|
}
|
|
|
|
|
|
2014-04-23 20:18:55 -04:00
|
|
|
void UK2Node_MatineeController::OnEventKeyframeAdded(const AMatineeActor* InMatineeActor, const FName& InPinName, int32 InIndex)
|
|
|
|
|
{
|
|
|
|
|
if ( MatineeActor == InMatineeActor )
|
|
|
|
|
{
|
2015-01-23 20:24:45 -05:00
|
|
|
// Only add unique event names to the controller node
|
|
|
|
|
if (!FindPin(InPinName.ToString()))
|
|
|
|
|
{
|
|
|
|
|
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
|
2014-04-23 20:18:55 -04:00
|
|
|
|
2015-01-23 20:24:45 -05:00
|
|
|
// Add one to the index as we insert "finished" at index 0
|
|
|
|
|
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, InPinName.ToString(), false, InIndex + 1);
|
2014-04-23 20:18:55 -04:00
|
|
|
|
2015-01-23 20:24:45 -05:00
|
|
|
// Update and refresh the blueprint
|
|
|
|
|
FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
|
|
|
|
|
}
|
2014-04-23 20:18:55 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UK2Node_MatineeController::OnEventKeyframeRenamed(const AMatineeActor* InMatineeActor, const FName& InOldPinName, const FName& InNewPinName)
|
|
|
|
|
{
|
|
|
|
|
if ( MatineeActor == InMatineeActor )
|
|
|
|
|
{
|
|
|
|
|
if( UEdGraphPin* OldPin = FindPin(InOldPinName.ToString()) )
|
|
|
|
|
{
|
2014-11-20 12:31:19 -05:00
|
|
|
OldPin->Modify();
|
|
|
|
|
OldPin->PinName = InNewPinName.ToString();
|
2014-04-23 20:18:55 -04:00
|
|
|
|
|
|
|
|
GetGraph()->NotifyGraphChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UK2Node_MatineeController::OnEventKeyframeRemoved(const AMatineeActor* InMatineeActor, const TArray<FName>& InPinNames)
|
|
|
|
|
{
|
|
|
|
|
if ( MatineeActor == InMatineeActor )
|
|
|
|
|
{
|
|
|
|
|
bool bNeedsRefresh = false;
|
|
|
|
|
for(int32 PinIdx=0; PinIdx<InPinNames.Num(); PinIdx++)
|
|
|
|
|
{
|
|
|
|
|
if(UEdGraphPin* Pin = FindPin(InPinNames[PinIdx].ToString()))
|
|
|
|
|
{
|
2015-03-06 16:58:09 -05:00
|
|
|
RemovePin(Pin);
|
2014-04-23 20:18:55 -04:00
|
|
|
bNeedsRefresh = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( bNeedsRefresh )
|
|
|
|
|
{
|
|
|
|
|
// Update and refresh the blueprint
|
|
|
|
|
FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|