Files
UnrealEngineUWP/Engine/Source/Developer/BlueprintNativeCodeGen/Private/BlueprintNativeCodeGenModule.cpp
Mike Beach f64d552970 Copying //UE4/Dev-Blueprints to //UE4/Dev-Main (Source: //UE4/Dev-Blueprints @ 3152873)
#lockdown Nick.Penwarden
#rb none

==========================
MAJOR FEATURES + CHANGES
==========================

Change 3131279 on 2016/09/19 by Mike.Beach

	Fixing FText::Format warning for the Sub-Level Blueprints menu - Was using {LevelName} tag when there was no value for {LevelName} (defaulted to the first argument).

	#jira UE-36097

Change 3131318 on 2016/09/19 by Phillip.Kavan

	[UE-35690] Minor revisions to Blueprint SCS execution to improve efficiency and address an out-of-order registration issue.

	change summary:
	- modified AActor::PostSpawnInitialize() to defer native component registration if there is no native scene root component set and if the actor is a BP type (i.e. will invoke SCS). this means that native actor classes with only non-scene components will now defer registration/post-registration until after SCS execution has established a valid scene root.
	- modified AActor::ExecuteConstruction() to gather the set of native scene components that SCS nodes can attach to before invoking the SCS. this was previously being done redundantly within the SCS itself at each level of the BP class inheritance hierarchy.
	- modified AActor::ExecuteConstruction() to do a final registration pass over all components after the all SCS levels have been executed. this was also previously being done within the SCS at each level. this avoids some extra redundancy.
	- modified USCS_Node::ExecuteNodeOnActor() to call RegisterAllComponents() on the given actor instance after establishing a valid scene root component if it was previously deferred at spawn time.
	- modified USCS_Node::ExecuteNodeOnActor() to now register components after they're created. since SCS execution goes from parent to child, parent scene components will always be registered before their children. non-native, non-scene component registration will also be deferred until a scene root component has been established.
	- added AActor::HasDeferredComponentRegistration()
	- modified AActor::RegisterAllComponents() to reset the actor's deferred component registration flag when called
	- modified AActor::AddComponent() to check the 'bAutoRegister' flag before calling RegisterComponent() (for consistency)
	- moved the RegisterInstancedComponent() utility method into USimpleConstructionScript and modified it to ensure that parent attachments are registered before their children.
	- modified USimpleConstructionScript::ExecuteScriptOnActor() to include an additional input parameter for passing in the set of native scene components that can be attached to.
	- modified USimpleConstructionScript::ExecuteScriptOnActor() to remove redundant/unnecessary work as noted above.

	#jira UE-35690

Change 3131842 on 2016/09/20 by Maciej.Mroz

	#jira UE-34984 Broken (weak) object params on Blueprint function (cannot add plain reference)

Change 3131847 on 2016/09/20 by Maciej.Mroz

	SPropertyEditorAsset doesn't display UClass with "_C" prefix anymore.

Change 3131923 on 2016/09/20 by Maciej.Mroz

	#jira UE-33812 Crash while closing Create Blank New Blueprint window after attempting to name blueprint the same name as another blueprint

Change 3132348 on 2016/09/20 by Phillip.Kavan

	Fix CIS build issue (SA).

Change 3132383 on 2016/09/20 by Maciej.Mroz

	#jira UE-35830 Float Curve that is set as a local variable in an actor's function is garbage collected when in Standalone, causing a crash

	Array UStruct::ScriptObjectReferences is filled while compilation. GC doesn't serialize script bytecode in editor anymore.

Change 3133072 on 2016/09/20 by Maciej.Mroz

	#jira UE-34388 Crash upon deleting Blueprints folder

Change 3133216 on 2016/09/20 by Dan.Oconnor

	+ BlueprintSetLibrary (add, remove, find, etc)
	+ HasGetTypeHash compile time function for detecting types that have GetTypeHish (modeled after HasOperatorEquals)
	= SPinTypeSelector can now disable container types based on current primary type, required transition to SComboButtton/SListView from SComboBox
	= Hide blueprint set library via BaseEditor.ini
	#jira UE-2114

Change 3133227 on 2016/09/20 by Dan.Oconnor

	Test assets for TSet

Change 3133804 on 2016/09/21 by Maciej.Mroz

	#jira UE-34069 	ObjectLibrary stores UBlueprint instead of BPGC

	In UObjectLibrary, when bHasBlueprintClasses is true, BP references are automatically replaced by BPGC references.

Change 3133817 on 2016/09/21 by Maciej.Mroz

	Fixed static Static Analysis warning

Change 3134377 on 2016/09/21 by Dan.Oconnor

	ShowWorldContextObject is now inherited
	#jira UE-35674

Change 3134955 on 2016/09/21 by Mike.Beach

	Making it so AdvancedDisplay metadata is taken into consideration and used in MakeStruct nodes.

Change 3134965 on 2016/09/21 by Dan.Oconnor

	Fix for crash in FCDODiffControl when CDOs have different numbers of properties. First branch in the while loop would incorrectly advance Iter past the end of the array. Comments courtesy of Jon.Nabozny
	#jira UE-36263

Change 3135523 on 2016/09/22 by Dan.Oconnor

	PR #2755: Master (Contributed by jeremyyeung)
	Notable change: searching for Vector in BP editor context menu now gives different default result, prior result was mediocre, though (vector - vector)

	#jira UE-35450

Change 3136508 on 2016/09/22 by Mike.Beach

	Removing a bIsVisible guard for level Blueprint menu actions - this was causing level BP options to disappear when you hid sub-levels. The guard doesn't seem to matter, as those actions will be removed with the world (when it is updated, or unloaded).

	#jira UE-34019

Change 3137587 on 2016/09/23 by Maciej.Mroz

	#jira ODIN-1017 [Nativization] Crash while loading Hub_env level

	Merged cl#3137578 from Odin branch

Change 3137666 on 2016/09/23 by Ben.Cosh

	This adds the ability to map composite graph instances in the same way we map macro instances for blueprint debug data and improves the quality of the debug data providing correct information for nested macro/composite instances at any script location in instrumented blueprint compilations.
	#Jira UE-33396 - Nested macro nodes don't map correctly if you place multiple instances in the same graph
	#Proj KismetCompiler, BlueprintGraph, UnrealEd

	- This is the first part of a two part change, the subsequent change will make use of the debug output to resolve complex trees of tunnel instances in the blueprint profiler.

Change 3137800 on 2016/09/23 by Phillip.Kavan

	[UE-34896] Properties are now generated for client-only Blueprint components in an uncooked server-only context.

	change summary:
	- bumped BlueprintObjectsVersion
	- added a new 'ComponentClass' property to USCS_Node
	- added a new 'ComponentClass' field to the FComponentOverrideRecord struct (UInheritableComponentHandler)
	- added a USCS_Node::Serialize() override to fix up 'ComponentClass' on load (so that it's set prior to compile-on-load)
	- modified USimpleConstructionScript::CreateNodeImpl() to set the ComponentClass property in a new SCS node
	- modified USimpleConstructionScript::ValidateNodeTemplates() to consider the node to be valid if ComponentClass is set and is known to be filtered (i.e. the node will not be removed in this case)
	- modified USimpleConstructionScript::ValidateNodeTemplates() to emit a warning message in an uncooked client-only or server-only context if the ComponentClass could not be set in an existing package (i.e. if a resave is needed)
	- modified UInheritableComponentHandler::PostLoad() to fix up 'ComponentClass' on load
	- modified UInheritableComponentHandler::CreateOverridenComponentTemplate() to set the ComponentClass field in a new override record
	- modified UInheritableComponentHandler::IsRecordValid() to consider the record to be valid if ComponentClass is set (when ComponentTemplate is NULL)
	- modified UInheritableComponentHandler::IsRecordNecessary() to consider the record to be necessary if ComponentClass is set and is known to be filtered
	- modified FKismetCompilerContext::CreateClassVariablesFromBlueprint() to use 'ComponentClass' rather than 'ComponentTemplate' to infer the property subtype

	#jira UE-34896

Change 3137851 on 2016/09/23 by Phillip.Kavan

	[UE-36079] Component overrides in a child blueprint will no longer trigger a warning message when the original component is removed from its parent.

	change summary:
	- modified UInheritableComponentHandler::IsRecordValid() to no longer consider a NULL OriginalTemplate to be invalid (so that the warning message is suppressed)
	- modified UInheritableComponentHandler::IsRecordNecessary() to consider a NULL OriginalTemplate to be unnecessary (so that the record is still removed in this case)

	#jira UE-36079

Change 3137948 on 2016/09/23 by Ben.Cosh

	CIS warning fix on mac for out of order initialisation.

Change 3139351 on 2016/09/25 by Ben.Cosh

	Updates the blueprint profiler to make use of the recent changes to macro/composite tunnel mapping and enhanced debug data.
	#Jira UE-33396 - Nested macro nodes don't map correctly if you place multiple instances in the same graph
	#Proj BlueprintProfiler, Engine

	- This is the second part of a two part change enabling multiple instances of nested macro/composite graphs in the blueprint profiler.

Change 3139376 on 2016/09/25 by Ben.Cosh

	CIS static analysis fix for CL 3137666

Change 3139377 on 2016/09/25 by Ben.Cosh

	Adding script code location checking for pure nodes that was missed in CL 3139351
	#Jira UE-33396 - Nested macro nodes don't map correctly if you place multiple instances in the same graph
	#Proj BlueprintProfiler

	- Fixes a missed issue with pure nodes inside macros/tunnels

Change 3139624 on 2016/09/26 by Maciej.Mroz

	Fixed const local variables in Nativized code

	Merged cl#3139622 from Odin branch.

Change 3139641 on 2016/09/26 by Maciej.Mroz

	#jira UE-31099 Renaming an input mapping does not generate a warning when compile a blueprint using that input

	Since we cannot distinguish which nodes are isolated by users (and shouldn't be validated) and which nodes are isolated during expansion step (and should be validated), the isolated nodes are pruned both before and after expantion step (and validation).

Change 3139961 on 2016/09/26 by Ben.Cosh

	CIS static analysis fix for CL 3137666

	- missed one of the warnings in a previous attempt.

Change 3140143 on 2016/09/26 by Dan.Oconnor

	Fix for component property clearing on load, submitted on behalf of Mike.Beach
	#jira UE-36395

Change 3140694 on 2016/09/26 by Dan.Oconnor

	Fix for GLEO when duplicating levels that have knots that reference delegates (specifically custom events)
	#jira UE-34954

Change 3140772 on 2016/09/26 by Dan.Oconnor

	Further hardening SGraphPin::GraphPinObj access
	#jira UE-36280

Change 3140812 on 2016/09/26 by Dan.Oconnor

	Corrected overzealous warning. Codepath is expected when functions are deleted but breakpoints aren't updated
	#jira UE-32736

Change 3140869 on 2016/09/26 by Dan.Oconnor

	Update check to handle nested DSOs
	#jira UE-34568

Change 3141125 on 2016/09/27 by Maciej.Mroz

	#jira UE-36326 Attempting to generate abstract class from blueprint crashes editor on compile

	While reinstancing the CLASS_Abstract is cleared (just like the CLASS_Deprecated flag)

Change 3142715 on 2016/09/27 by Dan.Oconnor

	Fix for crash when pasting nodes that have connections to nodes that aren't in the clipboard from one graph into another
	#jira OR-29584

Change 3143469 on 2016/09/28 by Ryan.Rauschkolb

	BP Profiler: Fixed Assert when profiling parent/child Blueprint
	#jira UE-35487

Change 3145215 on 2016/09/29 by Maciej.Mroz

	#jira UE-36494 [CrashReport] UE4Editor_KismetCompiler!FKismetCompilerContext::CreatePinEventNodeForTimelineFunction() [kismetcompiler.cpp:2062]

Change 3145580 on 2016/09/29 by Dan.Oconnor

	Collapse secondary image instead of hiding it, allowing x button to be closer to primary image when secondary type image isn't present
	#jira UE-36577

Change 3146470 on 2016/09/30 by Maciej.Mroz

	#jira UE-36655 Failed ensure when TIleline is pasted

	Restored cl#3085572 - it was lost while merging.

Change 3147046 on 2016/09/30 by Maciej.Mroz

	#jira UE-34961 Assert when calling BP function with weak object parameter.

	BP doesn;t support weak obj ptr as parameters - Validation added. Function, created from colappsed nodes, cannot have a parameter of weakptr type.

Change 3148022 on 2016/10/01 by Phillip.Kavan

	[UE-21109] Fix component instance data loss after renaming SCS component nodes at the Blueprint class level.

	change summary:
	- deprecated the public USCS_Node::VariableName member and replaced it with an internal-only member accessible via Get/Set method (i need to be in control of the set logic)
	- changed all occurrences of direct access to USCS_Node::VariableName to use a GetVariableName() call (since it's now internal)
	- simplified USCS_Node::GetVariableName() as what it used to do was legacy and thus is no longer necessary (it's been handled by USimpleConstructionScript::PostLoad for awhile now)
	- added USCS_Node::SetVariableName(); this now renames the component template (if valid) and all instances of it prior to changing the internal variable name. this ensures that archetype lookups will continue to function after a rename.
	- added USCS_Node::RenameComponentTemplate() to handle SCS node component template rename logic on a variable name change
	- switched the AActor::CheckComponentInstanceName() API to be publically-accessible; need to call this when renaming instanced components to match a new variable name in order to ensure that we rename any instance-only components out of the way first (this is the same logic that we run when constructing component instances on map load/RRCS, so it's consistent)
	- modified UInheritableComponentHandler::PostLoad() to fix up the component template within each record to match the original template object name. this ensures that ICH-specific archetype lookups will continue to function after a rename. it also ensures that any mismatched template names in existing assets will now be fixed up on load.
	- moved UActorComponent::ComponentTemplateSuffixName into the USimpleConstructionScript class (since the association is tied to templates created by that class specifically). note: this revises a change from a recent PR submission.
	- modified UpdateAttachedIsEditorOnly() to check the RF_ArchetypeObject flag rather than the ComponentTemplateSuffixName (part of the revision to the recent PR submission noted above)

	#jira UE-21109

Change 3148023 on 2016/10/01 by Phillip.Kavan

	[UE-35562] Fix inherited Blueprinted component template defaults data loss in child Blueprint classes after recompiling the Blueprinted component class.

	change summary:
	- added a local FArchetypeReinstanceHelper struct + GetArchetypeObjects()/FindUniqueArchetypeObjectName() utility method implementations to KismetReinstanceUtilities.cpp
	- modified FBlueprintCompileReinstancer::ReplaceInstancesOfClass_Inner() to ensure that the full inherited component template (archetype) ancestry is renamed along with the base template when we rename the base template object away from its original name in order to make way for the new (reinstanced) template. the names must match the base template along the entire inheritance hierarchy in order for forward/reverse inherited component archetype lookups to succeed.

	notes:
	- BP (non-native) component templates (e.g. SCS/AddComponent nodes) that belong to the class being reinstanced (i.e. whose templates are not inherited from a parent BP) always inherit directly from the component CDO, and thus do not require this code path (that is, archetype lookups are not dependent on matching the CDO by name). similarly, native components (defined in C++) are included as part of the CDO defaults data, and thus also do not require this code path.

	#jira UE-35562

Change 3148030 on 2016/10/01 by Phillip.Kavan

	UT fixes for CIS warnings related to SCS node API changes.

Change 3148256 on 2016/10/02 by Ben.Cosh

	This change adds the ability to filter debug/wire trace instrumenation and tracks expansion nodes for future use.
	#Jira UE-34866 - No profiler timings listed for nodes executed after an interface message
	#Proj KismetCompiler, BlueprintGraph, UnrealEd

Change 3148261 on 2016/10/02 by Ben.Cosh

	CIS fix, some code from another changelist leaked into CL 3148256

Change 3148480 on 2016/10/03 by Ben.Cosh

	This change attempts to address some profiler issues with class function context switching in the blueprint profiler.
	#Jira UE-35819 - Crash occurs when instrumenting an event from a member actor
	#Proj BlueprintProfiler, BlueprintGraph

Change 3148545 on 2016/10/03 by Phillip.Kavan

	Skip unnecessary component validation work to fix invalid warnings when duplicating a BP class for reinstancing.

Change 3149001 on 2016/10/03 by Ben.Cosh

	This fixes an issue found with the instrumented blueprint compilations in which a certain compilation path would not provide the extended composite tunnel node heararchy in debug data and removes an unneceassary check that was causing problems.
	#Jira UE-36704 - Crash on PIE while profiling TestBP_ProfilerEvents in QAGame
	#Proj KismetCompiler, BlueprintProfiler

Change 3149031 on 2016/10/03 by Maciej.Mroz

	#jira UE-36687, UE-36691

	Tunnel nodes without exec pin are not pruned before expansion.

Change 3149150 on 2016/10/03 by Maciej.Mroz

	#jira UE-36685

	UGameplayTagsK2Node_LiteralGameplayTag is pure.

Change 3149290 on 2016/10/03 by Maciej.Mroz

	#jira UE-36750

	GetBlueprintContext node is Pure.

Change 3149595 on 2016/10/03 by Mike.Beach

	Fixing up some Orion content errors/warnings that should have been issues a while ago (error reporting was broken for a time, now fixed).

	#jira UE-36758, UE-36759

Change 3149667 on 2016/10/03 by Mike.Beach

	Fixing up some Ocean content errors as fallout from a change in Dev-Blueprints - the errors properly identified a node that was using a culled input that was uninitialized.

	#jira UE-36770

Change 3149777 on 2016/10/03 by Mike.Beach

	Fixing up  an Orion content warning - disconnecting a cast path in Hero_Automation, now that the node is producing a warning (the cast is impossible, and therefore the path is superfluous).

	#jira UE-36759

Change 3149988 on 2016/10/04 by Maciej.Mroz

	#jira UE-36750, UE-36685

	Fixed IsNodePure functions.

Change 3150146 on 2016/10/04 by Maciej.Mroz

	#jira UE-36759

	First pruning pass in done after ExpandTunnelsAndMacros is called.
	Isolated tunnels are pruned just like regular nodes.

Change 3150743 on 2016/10/04 by Mike.Beach

	Mirroring CL 3150661 from Dev-VREditor

	Fix for crash on editor close after VR Foliage Editing.

	#jira UE-36754

Change 3151104 on 2016/10/04 by Maciej.Mroz

	Added comment.

Change 3151979 on 2016/10/05 by Mike.Beach

	Adding the keyword "custom" to K2Node_CustomEvent, so that it is prioritized when searching the Blueprint menu.

	#jira UE-35512

Change 3152286 on 2016/10/05 by Maciej.Mroz

	Make sure, that an isolated node, that should be pure (but is not) won't be pruned.

[CL 3152997 by Mike Beach in Main branch]
2016-10-05 23:32:35 -04:00

26 KiB