Files
UnrealEngineUWP/Engine/Source/Developer/FunctionalTesting/Private/AutomationBlueprintFunctionLibrary.cpp
Matt Kuhlenschmidt 765a83175b Copying //UE4/Dev-Editor to //UE4/Dev-Main (Source: //UE4/Dev-Editor @ 3379190)
#lockdown Nick.Penwarden
#rb none

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

Change 3342222 on 2017/03/10 by Nick.Darnell

	UMG - Adding a GetContent to the UContentWidget.

Change 3342228 on 2017/03/10 by Nick.Darnell

	Project Launcher - Always consume mouse wheel vertically so it stops scrolling to the right.

Change 3342310 on 2017/03/10 by Nick.Darnell

	UMG - Cleaning up some extra class references.

Change 3343382 on 2017/03/13 by Jamie.Dale

	Applying optimization to FChunkManifestGenerator::ContainsMap

Change 3343523 on 2017/03/13 by Mike.Fricker

	New details view option:  "Show Hidden Properties while Playing"
	- Enabling this allows you to see every property on selected objects that belong to a simulating world, even non-visible and non-editable properties.  Very useful for inspection and debugging.
	- Remember to change World Outliner to show you actors in the "Play World" if you want to select and inspect those objects first!
	- This setting is saved for your entire project, similar to "Show All Advanced"

Change 3343573 on 2017/03/13 by Mike.Fricker

	New details view option:  "Show Hidden Properties while Playing" (part 2)
	- Fixed missing include / unity issue

Change 3343709 on 2017/03/13 by Jamie.Dale

	Some fixes for gathering cached dependency data

	- We no longer load dependency data that doesn't have the correct package name.
	- We no longer populate the dependency results when bGatherDependsData is false.

Change 3343900 on 2017/03/13 by Alexis.Matte

	fix crash when creating too much LOD at import
	#jira UE-42785

Change 3344104 on 2017/03/13 by Alexis.Matte

	Add a boolean to the static mesh socket so we know if the socket was imported or created in UE4. This allow us to not impact editor socket when we re-import a fbx
	#jira UE-42736

Change 3344802 on 2017/03/14 by Michael.Dupuis

	#jira UE-42244 : added missing nullptr so render thread wont try to access global var when we're no longer in landscape mode
	Changed the sync method between graphic resource from render thread and game thread to prevent desync

Change 3346061 on 2017/03/14 by Jamie.Dale

	Adding const& and && overloads of FText::Format

Change 3346192 on 2017/03/14 by Arciel.Rekman

	Linux: fix VHACD to retain bincompat with the baseline (UE-42895).

	- It is now compiled against libc++ instead of libstdc++ in the toolchain.

Change 3347083 on 2017/03/15 by Andrew.Rodham

	Fixed crash when changing anchors on a background blur widget

Change 3347359 on 2017/03/15 by Michael.Dupuis

	#jira UE-38193:
	Added Rename, Delete, New Folder, Size Map, Show In Explorer for folder and asset in the path view and asset view

Change 3347382 on 2017/03/15 by Michael.Dupuis

	missing include incremental

Change 3347500 on 2017/03/15 by Alex.Delesky

	#jira UE-41231 - Selecting multiple text widgets in UMG will now allow you to set their value correctly, and the "Multiple Values" text will no longer be set in the widgets instead.

Change 3347920 on 2017/03/15 by Jamie.Dale

	Fixing some places passing tooltips as FString rather than FText

	#jira UE-42603

Change 3347925 on 2017/03/15 by Jamie.Dale

	Re-saving some assets so their tooltips can be gathered

	#jira UE-42603

Change 3348788 on 2017/03/15 by Jamie.Dale

	Updated the Windows platform to use the newer Vista+ style browser dialogs, rather than the older XP style dialogs

Change 3349187 on 2017/03/16 by Andrew.Rodham

	Sequencer: Added the ability to specify additional event receivers for level sequence actors
	  - Such actors will receive events from event tracks

Change 3349194 on 2017/03/16 by Andrew.Rodham

	Sequencer: Reset compiled templates on load in the editor, and ensure correct serialization of generation ledger
	  - Resetting on load means that we guarantee up-to-date templates, even if underlying compilation logic changes.

	#jira UE-42198
	#jira UE-40969

Change 3349210 on 2017/03/16 by Andrew.Rodham

	Sequencer: Event tracks can now be defined to trigger events at the start of evaluation, after objects are spawned, or at the end of evaluation

Change 3349211 on 2017/03/16 by Andrew.Rodham

	Sequencer: Add ability to retrieve bound objects from blueprint

Change 3349398 on 2017/03/16 by Nick.Darnell

	UMG - Fixing a flashing hierarchy view.  Looks like assets continuing to stream in causing the object change notification to continue to fire, and the widget designer refreshed any time it happened.  Now limit to only if widgets are changing.

Change 3349420 on 2017/03/16 by Alex.Delesky

	#jira UE-40720 - Multiline editable text boxes can now be set to Read-Only.

Change 3349548 on 2017/03/16 by Alexis.Matte

	Fbx importer, when importing a staticmesh with combine mesh option check and the fbx file contain some "MultiSub Material" the materialinstance are now always hook properly.

Change 3349818 on 2017/03/16 by Cody.Albert

	Fixed constructor for FNavigationMetaData

Change 3350047 on 2017/03/16 by Cody.Albert

	Removed unneeded check so that children actors are never orphaned when their parent is moved into a newly created folder in the world outliner

Change 3350072 on 2017/03/16 by Arciel.Rekman

	ShaderCompiler: make sure strings are at least 4-byte aligned.

	- Can crash wcscpy() under Linux otherwise (reported by a licensee).

Change 3350146 on 2017/03/16 by Arciel.Rekman

	Fix CodeLite project generation (UE-42921).

	- Reportedly causes a crash in CodeLite 10.x

Change 3350235 on 2017/03/16 by Arciel.Rekman

	Fix memory leak in address symbolication on Linux.

	- Makes MallocProfiler work again.
	- Also add progress update in MallocProfiler since symbolication is still slow.

	Merging CL 3338764 from Fortnite to Dev-Editor.

Change 3350382 on 2017/03/16 by Arciel.Rekman

	Linux: fix incorrect cast of rlimit in i686.

Change 3350471 on 2017/03/16 by Jamie.Dale

	Enabling loc dashboard by default for new projects

Change 3350516 on 2017/03/16 by Jamie.Dale

	Enabling content hot-reloading by default

Change 3350582 on 2017/03/16 by Cody.Albert

	Corrected Widget Interaction Component to use current impact point instead of last impact point

Change 3350945 on 2017/03/16 by Jamie.Dale

	Gave FConfigFile::FindOrAddSection API linkage

Change 3351441 on 2017/03/17 by Michael.Dupuis

	#jira UE-42843: Fixed Transaction begin/end order issue happening with min slider passing max slider value
	Add support for multiple selection value display

Change 3351558 on 2017/03/17 by Michael.Dupuis

	#jira UE-42845: Always refresh the detail panel to properly update for selection change, delete, etc.

Change 3351657 on 2017/03/17 by Matt.Kuhlenschmidt

	Adding USD Third Party dependencies

Change 3351665 on 2017/03/17 by Matt.Kuhlenschmidt

	Added experimental USD Importer Plugin
	This plugin supports basic static mesh importing and scene creation of actors using static meshes

Change 3351682 on 2017/03/17 by Matt.Kuhlenschmidt

	Enabling USD importer in engine test project for automation tests

Change 3351749 on 2017/03/17 by Alexis.Matte

	Make sure the selection proxy is off for the skeletal mesh component. UE4 use the selection outline instead

	#jira UE-41677

Change 3351831 on 2017/03/17 by Michael.Dupuis

	#jira UETOOL-1102:
	Added HSV controls to Color Grading
	Some look improvement for RGV/HSV
	Color Grading refactor
	Group Reset bug fix (relevant only to color grading)

Change 3352041 on 2017/03/17 by Matt.Kuhlenschmidt

	Updated USD plugin whitelisting

Change 3352093 on 2017/03/17 by Michael.Dupuis

	when FREEZERENDERING is called, stop the foliage culling too

Change 3352211 on 2017/03/17 by Alexis.Matte

	Fix the physic asset missing skeleton warning
	#jira UE-43006

Change 3352336 on 2017/03/17 by Alexis.Matte

	We now allow a negative W value of the ScreenPoint vector in the ScreenToPixel function. In this case we simply reverse the W value to kept the manipulator direction on the good side.
	#jira UE-37458

Change 3352947 on 2017/03/17 by Phillip.Kavan

	#jira UE-42510 - Instanced static mesh transform edits are now reflected in the Blueprint editor's preview scene.

	Change summary:
	- Added IPropertyHandle::GetValueBaseAddress() (interface).
	- Modified IPropertyHandle::NotifyPostChange() to include EPropertyChangeType as an optional input.
	- Added FPropertyHandleBase::GetValueBaseAddress() (implementation).
	- Modified FPropertyHandleBase::NotifyPostChange() to include the optional input arg in the property change event.
	- Modified FPropertyHandleBase::CreatePropertyNameWidget() to clear the override text after temporarily replacing display name/tooltip text for the creation of the SPropertyNameWidget. This was done to allow for transactions to be named according to the property that's being modified.
	- Modified FMathStructProxyCustomization::OnValueCommitted() to only apply the input value while not interactively editing via spinbox as well as when not post-processing an undo/redo (which can trigger a focus loss).
	- Modified the FMathStructProxyCustomization::OnEndSliderMovement() delegate to include property handle and proxy value input parameters, as well as to call FlushValues() as part of the implementation.
	- Modified FlushValues() for each of FMatrixStructCustomization, FTransformStructCustomization and FQuatStructCustomization to explicitly handle both propagation and transaction processing.
	- Modified UInstancedStaticMeshComponent::UpdateInstanceTransform() to call Modify() prior to applying changes (so that the previous state is recorded when inside a transaction context).
	- Modified FInstanceStaticMeshSCSEditorCustomization::HandleViewportDrag() to propagate changes to all instances of the ISMC archetype.

	Known issues:
	- Using the spinbox to edit instanced mesh transform values in the Blueprint editor will not apply the change to instances in the level editor until after you release the mouse button (i.e. - it will not be shown as a "live" update).

Change 3353678 on 2017/03/20 by Michael.Dupuis

	properly unfreeze the culling of foliage when toggling the freezerendering command

Change 3353747 on 2017/03/20 by Matt.Kuhlenschmidt

	PR #3372: Git plugin: fix update status on directories hotfix (still) slightly broken in master (UE4.16) (Contributed by SRombauts)

Change 3353749 on 2017/03/20 by Matt.Kuhlenschmidt

	PR #3373: Git Plugin: hotfix for regression off Visual Diffs with older version of Git in master (UE4.16) (Contributed by SRombauts)

Change 3353754 on 2017/03/20 by Matt.Kuhlenschmidt

	PR #3390: Allow OBJ imports to change if materials and textures are also imported (Contributed by mmdanggg2)

Change 3353909 on 2017/03/20 by Matt.Kuhlenschmidt

	Fixed actors showing thumbnails in details panel and made a few other tweeks to thumbnail displays in details panels
	- The color of the accepted type is now  shown properly
	- All object based properties now have thumbnails on by default.

Change 3353948 on 2017/03/20 by Nick.Darnell

	UMG - Updating the background blur widget's upgrade code to use the custom version, and handling older cases that were continuing to generate blur slots, even when already upgraded.

Change 3354335 on 2017/03/20 by Nick.Darnell

	Paragon - Excluding Archetype objects from reporting references, which causes crashes in the fast template mode.

Change 3354495 on 2017/03/20 by Nick.Darnell

	Core - Making it so order that outers are discovered does not matter, initializing the chain of outers if hasn't been created when instancing subobjects.

Change 3354578 on 2017/03/20 by Nick.Darnell

	Slate - There's now a console variable option, Slate.VerifyHitTestVisibility (off by default) which enables additional visibility checks for widgets.  Normally this isn't nessesary, but if you're changing the visibility of widgets during a frame, and several hit tests need to be performed that frame there's a chance that a button could be clicked twice in one frame.  Enabling this mode will make all hit testing more expensive, so for now it's off by default, but available for licensees that need the extra testing.

Change 3354737 on 2017/03/20 by Nick.Darnell

	Core - Adding a fix to Dev-Editor from that enables objects in the same package being requested to also be loaded.  This came about during async streaming callbacks alerting that a requested class was done loading, but there were still other assets in the package 'not loaded' but were available, just needed post load called on them.

Change 3355923 on 2017/03/21 by Yannick.Lange

	VR Editor: - Remove unnecessary cleanup functions.
	- Initialize with VR Mode and remove SetOwner function, since it shouldn't be possible to reset the VR Mode afterwards.

Change 3355959 on 2017/03/21 by Yannick.Lange

	VR Editor: - Rename VREditorWorldInteraction to VREditorPlacement, to avoid confusion with ViewportWorldInteraction. VREditorPlacement will only handle placing objects from content browser in the VR Mode.
	- Removed SnapSelectedActorsToGround to VREditorMode.

Change 3355965 on 2017/03/21 by Yannick.Lange

	VR Editor:  Forgot to add files to previous submit 3355959.

Change 3355977 on 2017/03/21 by Yannick.Lange

	VR Editor: Remove function to add a new extension with  TSubclassOf<UEditorWorldExtension>.

Change 3356017 on 2017/03/21 by Yannick.Lange

	VR Editor: - UI system check owner VRMode.
	- UI system fix check on VRMode on shutdown.

Change 3356028 on 2017/03/21 by Nick.Darnell

	Slate - SButton now correctly releases mouse capture even if it becomes disabled while pressed, but before 'click' has been fired.

	#jira UE-42777

Change 3356071 on 2017/03/21 by Yannick.Lange

	VR Editor: Copy of change 3353663.
	- Fix having to press once on the landscape to see the visuals for landscape editing.
	- Fix when sculpting/painting the position wouldn't update.
	- Fix inverted action for brushes while holding down shift or modifier on motioncontroller.
	- Cleanup FLandscapeToolInteractorPosition.

	- Change from 3353663: Use TStrokeClass::UseContinuousApply and TimeSinceLastInteractorMove to decide when to apply ToolStroke on tick.

Change 3356180 on 2017/03/21 by Michael.Dupuis

	Added ShowFlag Foliage Occlusion Bounds
	Fixed non initialized variable
	Expose changing Min Occlusion Bounds instead of assuming 6

	#rn none

Change 3356347 on 2017/03/21 by Nick.Darnell

	UMG - Introducing a faster CreateWidget.  When cooking, the widget compiler now generates a widget template/archetype that is stored in the same package as the generated blueprint class.  During compiling we generate a nearly fully initialized widget tree including all sub userwidgets and their trees, hookup all member variables, initialize named slots, setup any animations...etc.  This nearly fully constructed widget can be instanced using it as an archetype in the NewObject call, and does not have to use the correspondingly slow StaticDuplicateObject path.  There are restrictions on this method, part of the compiling step for widgets now inspects if the instancing would be successful, or if there would be GLEO references after instancing because a user forgot to setup Instanced on a subobject property.  Luckily that should be few and far between, all UVisuals (Widgets & Slots) are now DefaultToInstanced, which takes care of the overwhelming cases that demand the instanced flag.  Especially given the bulk of cases using BindWidget in native code.

	UMG - Removing a lot of deprecated functions from 4.8 on UUserWidget.

Change 3356357 on 2017/03/21 by Nick.Darnell

	Build - Fixing some IWYU issues on the incremental build.

Change 3356461 on 2017/03/21 by Nick.Darnell

	Build - Fixing linux build errors.

Change 3356468 on 2017/03/21 by Jamie.Dale

	STextPropertyEditableTextBox now handles empty texts correctly

Change 3356916 on 2017/03/21 by Matt.Kuhlenschmidt

	Fixed a crash when a material render proxy on a preview node is deleted when it is in flight on the render thread

	#jira UE-40556

Change 3357033 on 2017/03/21 by Alexis.Matte

	Fix crash when importing file with import commandlet
	Make sure path are combine properly to avoid crash
	Add some missing pointer check
	Make sure the asset are save when there is no source control
	#jira UE-42334

Change 3357176 on 2017/03/21 by Alex.Delesky

	#jira UE-42445 - TMaps now support editing the values of structs that act as map keys. TMaps with struct keys will now show the types of their elements in the details panel as well, and structs will now also display numbers next to set elements.

Change 3357197 on 2017/03/21 by Alex.Delesky

	#jira none - Fixing build issue for TMap key struct change.

Change 3357205 on 2017/03/21 by Michael.Dupuis

	Forgot to reset min granularity to 6 from testing

Change 3357340 on 2017/03/21 by Arciel.Rekman

	Mark FMallocAnsi (standard libc malloc) thread-safe on Linux.

Change 3357413 on 2017/03/21 by matt.kuhlenschmidt

	Added '/Game/Effects/Fort_Effects/Materials/Smoke/M_Main_Smoke_Puff.M_Main_Smoke_Puff' to collection 'MattKTest'

	Upgraded collection 'MattKTest' (was version 1, now version 2)

Change 3357505 on 2017/03/21 by Alexis.Matte

	Fix to avoid changing the CDO of FbxAssetImportData. The UI was saving the Config which was saving the CDO. But already serialized data will be reload badly if the CDO change since we serialize only the diff.

	#jira UE-42947

Change 3357825 on 2017/03/21 by Arciel.Rekman

	Clean up the large thread pool on exit.

	- Seems like the destruction was missed in the original CL 2785131 (12/1/15).
	- Fixes problems when threads were allocated in memory that is being cleaned up in another place on exit.

Change 3358086 on 2017/03/22 by Yannick.Lange

	VR Editor: - Fix gizmo scaling down when dragging the world.
	- Fix gizmo scaling down when dragging rotation handle.

Change 3358175 on 2017/03/22 by Andrew.Rodham

	Sequencer: Made ALevelSequenceActor::AdditionalEventReceivers advanced display

Change 3358367 on 2017/03/22 by tim.gautier

	Submitting resaved QAGame assets - Materials, Material Instances, Material Functions and Parameters

Change 3358457 on 2017/03/22 by Yannick.Lange

	VR Editor: Deleting unused UI assets.

Change 3358801 on 2017/03/22 by Matt.Kuhlenschmidt

	Guard against crash if the level editor is shut down when the object system has already been shut down

	#jira UE-35605

Change 3358897 on 2017/03/22 by matt.barnes

	Checking in WIP test content for UEQATC-1635 (UMG Navigation)

Change 3358976 on 2017/03/22 by Alex.Delesky

	#jira none - Fixing an issue where ItemPropertyNode could potentially dereference a null property

Change 3358987 on 2017/03/22 by Yannick.Lange

	VR Editor: Fix warning: Can't find file for asset '/Engine/VREditor/UI/VRButtonBackground' while loading ../../../Engine/Content/VREditor/Devices/Vive/VivePreControllerMaterial.uasset.

Change 3359067 on 2017/03/22 by Yannick.Lange

	VR Editor: Fix Radial Menu remains on controller after exiting VR Preview
	#jira UE-42885

Change 3359179 on 2017/03/22 by Matt.Kuhlenschmidt

	Fixed "Multiple Values" in Body Setup when single bone has multiple bodies

	#jira UE-41546

Change 3359626 on 2017/03/22 by Arciel.Rekman

	Linux: pool OS allocations.

	- Add a TMemoryPool and TMemoryPoolArray classes that can be used with any type of OS allocator functions.
	- Add ability to bypass CachedOSPageAllocator for given sizes. Also, corrected the condition on AllocImpl to match one on FreeImpl.
	- Switch Linux to pool mmap()/munmap() by default (helps 32-bit Linux and also speeds up 64-bit one), except 64-bit servers.
	- Add a test to TestPAL to check performance and thread safety.
	- Misc. fixes.

Change 3359989 on 2017/03/23 by Andrew.Rodham

	Sequencer: Binding overrides improvements
	  - Added the ability to override spawnable bindings
	  - Added the ability to override bindings in sub sequences
	  - Deprecated "Get Sequence Bindings" node in favor of "Get Sequence Binding", which is more robust, and provides a better UI/UX for selecting single bindings

	#jira UE-42470

Change 3360369 on 2017/03/23 by Alexis.Matte

	Fix the staticmesh conversion from UE4 4.13 to earlier UE4 versions
	#jira UE-42731

Change 3360556 on 2017/03/23 by Andrew.Rodham

	Sequencer: Added drag/drop support for binding overrides
	  - You can now drag and drop sequencer object binding nodes into blueprint graphs (to create 'Get Sequence Binding' nodes), and onto binding overrides specified on level sequence actors.

Change 3360618 on 2017/03/23 by Arciel.Rekman

	Make Binned2 work on Mac.

	- Game/server will use Binned2 by default.

Change 3360838 on 2017/03/23 by Nick.Darnell

	CommonUI - Making the SingleMaterialStyleMID property transient.  It had been serialized mistakenly onto several widgets when it appears the intent is to dynamically allocate it upon demand.

Change 3360841 on 2017/03/23 by Nick.Darnell

	UMG - Updating the editor to use DuplicateAndInitializeFromWidgetTree, so that Initialize is properly called when duplicating sub widget trees.

Change 3362561 on 2017/03/24 by Matt.Kuhlenschmidt

	Fixed text outlines being cropped at large sizes

	#jira UE-42647

Change 3362565 on 2017/03/24 by Matt.Kuhlenschmidt

	Added automation test for font outlines

Change 3362567 on 2017/03/24 by Matt.Kuhlenschmidt

	Resaved this file to fix 0 engine version warnings

Change 3362582 on 2017/03/24 by Yannick.Lange

	VR Editor: - Fix log warnings when teleporting.
	- Fix undo/redo when using teleport scaling.
	- Improved teleport scaling and push/pull input.
	#jira UE-43214

Change 3362631 on 2017/03/24 by Jamie.Dale

	Split the monolithic culture concept in UE4

	UE4 has historically only supported the concept of a single monolithic "culture" that applied to both text localization and internationalization, as well as all asset localization. Typically the "culture" was set to the "locale" of the OS, however that could be undesirable or incorrect on platforms (such as newer versions of Windows) that have a distinct concept of "language" (for localization) and "locale" (for internationalization).

	This change splits the concept of "culture" into "language" and "locale", and also adds the concept of "asset groups". The language is now used to work out which localization we should use, and the locale is used to control how numbers/dates/times/etc are formatted within our internationalization library.

	Asset groups expand on the language used by asset localization and allow you to create a group of asset classes that can be assigned a different culture than the main game language. A typical use-case of this would be creating an "audio" group that could, for example, be set to Japanese while the rest of the game runs in English.

	If your game doesn't care about the distinction between language and locale, and doesn't need to use asset groups, then you're able to continue to use "culture" as you always have. If, however, you do care about those things, then you'll likely want to avoid using the "culture" directly (as it's now a very aggressive setting that overrides all others), and instead favor using language/locale (games will typically treat these as the same) and asset groups as separate concepts (both in settings, and in your in-game UI).

	The language or locale for a game can be controlled by settings within the "Internationalization" section of your configs (this would typically be set in your GameUserSettings config, in the same way that "culture" works), eg)

	  [Internationalization]
	  language=fr
	  locale=fr

	The asset groups for a game can be controlled by settings within the "Internationalization.AssetGroupClasses" and "Internationalization.AssetGroupCultures" sections of your configs (the asset group class definition would typically be set in your DefaultGame config, and the cultures the groups use would typically be set in your GameUserSettings config), eg)

	  [Internationalization.AssetGroupClasses]
	  +Audio=SoundWave
	  +Audio=DialogueWave

	  [Internationalization.AssetGroupCultures]
	  +Audio=ja

	#jira UE-38418
	#jira UE-43014

Change 3362798 on 2017/03/24 by Nick.Darnell

	UMG - Putting the finishing touches on the hardware cursor system.  Can now load them from blueprints, and there are options for setting them up in the project settings.

	UMG - Deprecating the old properties for software widget cursors.  They've been moved into a map that can handle any of the mouse cursors as the enum key, which was always the intent/desire but maps couldn't be used as UProperties then.

Change 3362805 on 2017/03/24 by Jamie.Dale

	PR #3397: Allow empty source to override display string (Contributed by jorgenpt)

Change 3363039 on 2017/03/24 by Jamie.Dale

	Use the pre-scaled font height where possible to avoid an extra multiply

Change 3363188 on 2017/03/24 by Joe.Graf

	Added support for -iterate for content plugins that require path remapping during cook/packaging

	#CodeReview: matt.kuhlenschmidt
	#rb: matt.kuhlenschmidt

Change 3363355 on 2017/03/24 by Nick.Darnell

	UMG - Removing the CookAdditionalFiles function in UserInterfaceSettings.

Change 3363672 on 2017/03/24 by Matt.Kuhlenschmidt

	Material thumbnails now respect used particle system sprites flag and show a quad insead of a sphere by default. For this change I added the ability to have per asset type override for the default thumbnail shape and I added a way to reset thumbnails to default.  All existinging particle system materials that have not had a custom thumbnail will have to be reloaded and resaved for this to work

	#jira UE-42410

Change 3363699 on 2017/03/24 by Mike.Fricker

	VR Editor: Improved extensibility (for mesh editor)
	- This was merged from CL 3352612 and re-opened for edit before commit
	- All mesh editor changes were stripped before merging

Change 3363784 on 2017/03/24 by Matt.Barnes

	Adding content for tests following UEQATC-3548

Change 3363872 on 2017/03/24 by Arciel.Rekman

	Linux: require user to setup clang/clang++ for building hlslcc.

	- Earlier we tried to handle most common scenarios since libhlslcc needed to be built during the setup. Now that we supply a prebuilt version we don't need to be as user friendly, especially given that the attempts to second guess the compiler started to look complicated.

Change 3364089 on 2017/03/24 by Matt.Kuhlenschmidt

	Fix CIS

Change 3364381 on 2017/03/24 by JeanMichel.Dignard

	UV Packing optim
	- Use horizontal segments instead of checking texel by texel to fit source chart in layout.
	- Skip a couple of rasterize by flipping either the X texels or the Y texels when possible.
	- Keep the best chart raster so that we don't need to reraster when adding the chart to the layout.
	- Added a lightmap UV version in StaticMesh so that we don't invalidate the lighting cache. Only use the new lightmap UV generation when going through UStaticMesh::Build which invalidates the lighting.

Change 3364587 on 2017/03/24 by Arciel.Rekman

	Fix ordered comparison warning from clang 4.0.

Change 3364596 on 2017/03/24 by Arciel.Rekman

	Linux: fix editor being stuck (hack).

	- Rebuilt hlslcc in Debug.

Change 3364863 on 2017/03/25 by Max.Chen

	Sequencer: Fixed crash when deactivating a section in sequencer

	#jira UE-39880

Change 3364864 on 2017/03/25 by Max.Chen

	Sequencer: Integrating fix from licensee to ensure FVirtualTrackArea::HitTestSection checks the row of the section

Change 3364865 on 2017/03/25 by Max.Chen

	Cine Camera: Default post process depth of field method to CircleDOF and use that setting in UpdateCameraLens.

	#jira UE-40621

Change 3364866 on 2017/03/25 by Max.Chen

	GitHub #3183: Conversion to base class is inaccessible.

Change 3364869 on 2017/03/25 by Max.Chen

	Sequencer: Changed the time snapping interval in the toolbar ui so that it no longer additionally updates the sequencer setting. The setting is only used to initialize the time snapping interval of the level sequence. Added translate keys with ctrl and left-right arrows.

	#jira UE-41009
	#jira UE-41210

Change 3364870 on 2017/03/25 by Max.Chen

	Sequencer: Added translate keys with ctrl and left-right arrows.

	#jira UE-41210

Change 3364871 on 2017/03/25 by Max.Chen

	Sequencer: Add level sequence actor customization to open sequencer from the details panel. For matinee parity.

	#jira UE-41459

Change 3364879 on 2017/03/25 by Max.Chen

	Sequencer: Duplicate shot should put the duplicate on the next available row, keeping the start/end times the same.

	#jira UE-41289

Change 3364880 on 2017/03/25 by Max.Chen

	Sequencer: Opening the API for MovieSceneAudio-related classes along with some minor functionality additions:
	- Adding _API specifiers to MovieSceneAudioTrack, MovieSceneAudioSection, and FAudioTrackEditor so they can be subclassed in other modules.
	- Made GetSoundDuration function in MovieSceneAudioTrack.cpp a member function so it's functionaliy could be reused by subclasses.
	- Adding ability to specify delegates for OnQueueSubtitles, OnAudioFinished, and OnAudioPlaybackPercent in a MovieSceneAudioSection, and have them automatically assigned to any AudioComponents that are played by the MovieSceneAudioTemplate

Change 3364884 on 2017/03/25 by Max.Chen

	Sequencer fbx import
	- Removed the PostRotation compensation as it was setuped for 3ds max.
	- On import, add a rotation to camera and light animation keys like we do on export.
	- Merge the component local transform with the ActorNode transform when exporting only one component that isn't the root component in fbx since we're not creating child nodes in that case.

	#jira UE-34692

Change 3364885 on 2017/03/25 by Max.Chen

	Sequence Recorder: Fix crash when clearing properties to record.

	#jira UE-41873

Change 3364886 on 2017/03/25 by Max.Chen

	Sequencer: Add error when attempting to add a circularly dependent level sequence

	#jira UE-22358

Change 3364890 on 2017/03/26 by Max.Chen

	Sequencer: Added ability to specify a 'notify' function to property instance bindings
	  - When specified, the (parameterless) function will be called after a property is set

Change 3364891 on 2017/03/26 by Max.Chen

	Sequencer: Various fixes to thumbnails
	  - Fixed alpha blending being used when presenting the full screen quad for thumbnails

Change 3364892 on 2017/03/26 by Max.Chen

	Sequencer: PreRoll and PostRoll is now exposed at the section level, for all sections
	  - For the majority of sections this will be unimplemented, but it will allow for some tracks to set up their data ahead of time

Change 3364896 on 2017/03/26 by Max.Chen

	Sequencer: Add segment flags to equality operator for movie scene evaluation segments
	  - This prevents them from being accumulated into adjacent segments of the same index and forced time, but differing flags

Change 3364897 on 2017/03/26 by Max.Chen

	Sequencer: Fixed "Evaluate in preroll" and "Evaluate in Postroll" options
	  - Pre and postroll flags now come through on compiled segments, so the previous manual logic for sub sections is obsolete; we can just use the compiled segment data directly.

Change 3364898 on 2017/03/26 by Max.Chen

	Sequencer: Moved track options to be accessible on all nodes, and operate on all selected tracks

Change 3364902 on 2017/03/26 by Max.Chen

	Sequencer: Ensure evaluation flags are considered when compiling segments from external sequences
	  - This ensures that preroll regions in sub sequences are correctly evaluated when their parent section has preroll
	  - Changed high pass blending to always allow preroll

Change 3364903 on 2017/03/26 by Max.Chen

	Engine: Moved proxy mesh transform update out of camera view computation code
	  - GetCameraView can happen as part of end of frame updates, which will assert if any changes of transform happen during its processing

Change 3364908 on 2017/03/26 by Max.Chen

	Sequencer: Added visualization of pre and postroll on sections

Change 3364909 on 2017/03/26 by Max.Chen

	Sequencer: Prevent MovieSceneCompiler from removing preroll segments

Change 3364910 on 2017/03/26 by Max.Chen

	Sequencer: MediaPlayer PreRoll/PostRoll fix
	- Handle PreRoll/PostRoll on sub scenes that have a start offset

Change 3364922 on 2017/03/26 by Max.Chen

	Sequencer: Add check for valid property before dereferencing.

	#jira UE-40951

Change 3364923 on 2017/03/26 by Max.Chen

	Sequencer: Fix MovieScene preroll so that it seeks to the start correct frame before the preroll.

Change 3364924 on 2017/03/26 by Max.Chen

	Sequencer - change default behavior for pre/post roll evaluation
	- MovieSceneTracks are NOT evaluated by default

Change 3364925 on 2017/03/26 by Max.Chen

	Sequencer: Shot track rows now consider pre and post roll when being compiled

Change 3364926 on 2017/03/26 by Max.Chen

	Sequencer: Added the ability to define shared execution tokens, identifyable with a unique identifier, and sortable based on a sort order (<=0: before standard tokens, >0: after other tokens)

Change 3364927 on 2017/03/26 by Max.Chen

	Sequencer: Added the ability to selectively restore state for specific anim type IDs for a given object
	  - This allows us to specifically restore one particular type of animation for a given object (ie, transform, skeletal animation control, or motion blur)

Change 3364928 on 2017/03/26 by Max.Chen

	Sequencer: Fixed sub-sub tracks not being present in master sequences
	  - In order to correctly handle preroll in inner-inner sequences, we need to have access to those tracks when compiling intermediate sub sections. By caching off all the inner templates, we can have access to these tracks to check whether they want to be evaluated in pre/post roll in the master sequence

Change 3364937 on 2017/03/26 by Max.Chen

	Sequencer: Update cine camera component debug focus plane on tick, rather than in GetCameraView

	#jira UE-41332

Change 3364938 on 2017/03/26 by Max.Chen

	Sequencer: Fix crash inserting a level sequence with an invalid shot.

	#jira UE-41481

Change 3364940 on 2017/03/26 by Max.Chen

	Sequencer: Made handling of pre and post roll more consistent between explicit section pre/post roll and pre/post roll inherited from an outer sub section

Change 3364942 on 2017/03/26 by Max.Chen

	Movie Scene Capture: Move EDL generation to setup instead of close to ensure it gets written out when capturing as a separate process.

	#jira UE-41703

Change 3364943 on 2017/03/26 by Max.Chen

	Sequencer: Prevent capturing movies in editor while a PIE session is running

	#jira UE-41399

Change 3364944 on 2017/03/26 by Max.Chen

	CIS fixes

Change 3364951 on 2017/03/26 by Max.Chen

	Sequencer: Fix autokey not setting a keyframe for slate color with specified color.

	#jira UE-41645

Change 3364952 on 2017/03/26 by Max.Chen

	Sequencer: Level sequence frame snapshots now take account of fixed-frame interval offsets, and overlapping shot sections on the same row

	#jira UE-41684

Change 3364953 on 2017/03/26 by Max.Chen

	Sequencer: Fix edl so that it doesn't write out when a shot is out of range. Also fixed not writing the EDL with the correct frame rate when exporting from the track. Reworked the cmx EDL so that its encoded in the same edit time space, including a blank slug at the beginning of the edit.

	#jira UE-41925

Change 3364954 on 2017/03/26 by Max.Chen

	Sequencer - Allow animating parameters on cascade effect components which aren't owned by an AEmitter.

Change 3364955 on 2017/03/26 by Max.Chen

	Sequencer: Fixed sequencer anim instance not being used in the case where one was requested, but a different anim instance was already set

	This fixes an issue when rendering in seaprate process, animations that were set up to use the sequencer instance would be controlled using montage animation instead.

Change 3364963 on 2017/03/26 by Max.Chen

	Sequencer: Fix filtering to include child nodes.

	#jira UE-42068

Change 3364964 on 2017/03/26 by Max.Chen

	Sequencer: Enable UseCustomStartFrame and UseCustomEndFrame when rendering a single shot from the menu.

	#jira UE-42021

Change 3364965 on 2017/03/26 by Max.Chen

	Sequencer: Set the fade color in the track display

Change 3364966 on 2017/03/26 by Max.Chen

	Sequencer: Show actor attached to label in attach section.

Change 3364967 on 2017/03/26 by Max.Chen

	Sequencer: Fix static analysis warnings

Change 3364968 on 2017/03/26 by Max.Chen

	Sequencer: Fix crash on converting to spawnable.

	The previous implementation purported to allow null objects to set up spawnable defaults but it actually needed to compare the spawned object to the supported type.  This new mechanism now allows the spawner to indicate that it accepts null objects and doesn't crash.

	#jira UE-42069

Change 3364969 on 2017/03/26 by Max.Chen

	Sequencer: Fixed crash caused by holding onto stale properties through a raw ptr

	#jira UE-42072

Change 3364977 on 2017/03/26 by Max.Chen

	Sequencer: Convert FLinearColor to FColor for fade.

	#jira UE-41990

Change 3364978 on 2017/03/26 by Max.Chen

	Sequencer: Limit GetAllSections to the sections that actually correspond to the track

	#jira UE-42167

Change 3364979 on 2017/03/26 by Max.Chen

	Sequencer: Filter root nodes too

	#jira UE-42068

Change 3364980 on 2017/03/26 by Max.Chen

	Sequencer: Filter relevant material parameters

	#jira UE-40712

Change 3364982 on 2017/03/26 by Max.Chen

	Sequencer: Remove audio range bounds which clamps to the section bounds (needed for evaluating in pre and post roll)

Change 3364983 on 2017/03/26 by Max.Chen

	Sequencer: Add socket name to attach track section.

Change 3364984 on 2017/03/26 by Max.Chen

	Sequencer: Fix sub track node deletion so that all the sub tracks aren't deleted, only the row being requested.

	#jira UE-40955

Change 3364988 on 2017/03/26 by Max.Chen

	Sequencer: Invalidate expired objects when blueprints are compiled. Fix actor references now handles sections that need to have their guids updated (ie. attach tracks).

Change 3364994 on 2017/03/26 by Max.Chen

	Sequencer: Audio waveforms now show peak samples with smoothed RMS in the center
	  - Audio row heights are now also resizable by dragging on the bottom end of the track lane in the track area view

Change 3364995 on 2017/03/26 by Max.Chen

	UMG: Fix crash on undo

	#jira UE-42210

Change 3365000 on 2017/03/26 by Max.Chen

	Sequencer: Fix crash from GetCurrentValue.

Change 3365001 on 2017/03/26 by Max.Chen

	Sequencer: Split "Snap to the Dragged Key" option into two options, pressed key and dragged key.

	#jira UE-42382

Change 3365002 on 2017/03/26 by Max.Chen

	Sequencer: Downgraded check to ensure for FMovieSceneEvalTemplateBase::GetScriptStructImpl()

Change 3365003 on 2017/03/26 by Max.Chen

	Sequencer: Fixed section template script struct
	  - Because the cpp is not parsed by UHT, the empty template had its parent struct, rather than its own
	  - We now just return null, and handle empty segments correctly in the segment remapper as part of the track compilation

Change 3365013 on 2017/03/26 by Max.Chen

	Sequencer: Added data validation on compiled template loads, and extra guards against misuse of movie scene types

Change 3365014 on 2017/03/26 by Max.Chen

	Sequencer: Sequencer now re-evaluates when starting PIE or Simulate
	  - This can be disabled by disabling "Bind Sequencer to PIE" and "Bind Sequencer to Simulate" in PIE advanced settings

Change 3365015 on 2017/03/26 by Max.Chen

	Sequencer: Fix edl files so that they don't write out empty range shots

Change 3365017 on 2017/03/26 by Max.Chen

	Sequencer: Set max tick rate when in game.

	#jira UE-41078

Change 3365018 on 2017/03/26 by Max.Chen

	Sequencer: When finishing a scrub, playback status is now correctly set to stopped rather than stepping
	  - This fixes a hack that was previously in place from the old PostTickRenderFixup that caused it to run that step after scrubbing bad finished. This is no longer necessary, and actually breaks clicking to set the scrub position, as it now means that we step across the entire range between the previous and current time.

Change 3365022 on 2017/03/26 by Max.Chen

	Sequencer: Insert shot now creates a shot at the current time and puts it on the next available row.

	#jira UE-41480, UE-27699

Change 3365023 on 2017/03/26 by Max.Chen

	Sequencer: Add loop selection range. If there is no selection range, loop mode is restricted to loop or no loop.

	#jira UE-42285

Change 3365029 on 2017/03/26 by Max.Chen

	Sequencer: Add hotkeys to set the selection range to the next and previous shot (page up, page down). Also, added hotkey to set the playback range to all the shots (end)

Change 3365030 on 2017/03/26 by Max.Chen

	Sequencer: Fix particle system restore state so that it gets the proper initial active state of the particle system.

	#jira UE-42861, UE-42859

Change 3365031 on 2017/03/26 by Max.Chen

	Sequencer: Snap time when changing time snapping intervals.

	#jira UE-42590

Change 3365032 on 2017/03/26 by Max.Chen

	Sequencer: Add When Finished state to sections. By default, sections now restore state.

	#jira UE-41991, UE-31569

Change 3365033 on 2017/03/26 by Max.Chen

	#jira UE-42028 "DialogueWave playback calls OnQueueSubtitles multiple times"

	Only queue subtitles once per wave instance playback

Change 3365041 on 2017/03/26 by Max.Chen

	Sequencer: Subscene hierarchical bias

	Tracks can now be prioritized based on their subscene hierarhical bias value. Higher bias values take precedence.

	#jira UE-42078

Change 3365042 on 2017/03/26 by Max.Chen

	Sequencer: Generic paste menu for master (root) tracks.

Change 3365043 on 2017/03/26 by Max.Chen

	Sequencer: Hierarchical bias for level visibility track

	#jira UE-43024

Change 3365044 on 2017/03/26 by Max.Chen

	Sequencer: Prevent throttling on editing keys/sections.

Change 3365045 on 2017/03/26 by Max.Chen

	Sequencer: Set sequencer audio components bIsUISound to false so that they don't continue playing when the game is paused.

	#jira UE-39391

Change 3365046 on 2017/03/26 by Max.Chen

	Sequencer: Add missing BindLevelEditorCommands()

Change 3365049 on 2017/03/26 by Max.Chen

	Sequencer: Set tick prerequites for spawnables when they are spawned.

	#jira UE-43009

Change 3365050 on 2017/03/26 by Max.Chen

	Sequencer: Jump to Start and End of playback shortcuts.

	Rewind renamed to Jump to Start. Shortcut - up arrow.
	Jump to End Shortcut - ctrl up arrow.

	#jira UE-43224

Change 3365051 on 2017/03/26 by Max.Chen

	Sequencer: Add last range to playback

Change 3365057 on 2017/03/26 by Max.Chen

	Sequencer: Fix master sequence subscene generation times.

Change 3365058 on 2017/03/26 by Max.Chen

	Sequencer: Fix paste so that it doesn't paste both onto object nodes and master tracks.

Change 3365059 on 2017/03/26 by Max.Chen

	Sequencer: Fix crash pasting audio track.

Change 3365060 on 2017/03/26 by Max.Chen

	Sequencer: Cache player fade state so that restore state will return the values to the pre animated state.

	#jira UE-43313

Change 3365061 on 2017/03/26 by Max.Chen

	Sequencer: Filter hidden functions. This fixes a bug where the field of view property for a cinematic camera appears to be animatable. It should be hidden just like it is in the property editor.

	#jira UE-41461

Change 3365065 on 2017/03/26 by Max.Chen

	Sequencer: Support component hierarchies when drawing animation paths

	#jira UE-39500

Change 3365066 on 2017/03/26 by Max.Chen

	Sequencer: Refine pause behaviour in sequencer to always evaluate the next frame
	  - This ensures that we get a full frame's worth of evaluation so that the paused frame is of a good quality (and avoids us evaluating a tiny range)

Change 3365075 on 2017/03/26 by Max.Chen

	Sequencer: Fix add shot not setting next row.

Change 3365076 on 2017/03/26 by Max.Chen

	Sequencer: Export MovieSceneTrackEditor

	#jira UE-41641

Change 3365472 on 2017/03/27 by Yannick.Lange

	VR Editor landscape. Back out changelist 3356071 with new proper fixes.
	CL 3356071 introduced another bug and it wasn't correct because of removing FLandscapeToolInteractorPosition. This changelist fixes the same and additional bugs for VREditor Landscape mode.
	- Fix when sculpting/painting the position wouldn't update.
	- Fix inverted action for brushes while holding down shift or modifier on motioncontroller.
	- Fix VREditor Landscape Texture Painting does not paint continuously
	- Fix having to press once on the landscape to see the visuals for landscape editing.
	- Removed Interactor parameter from BeginTool.
	#jira UE-42780, UE-42779

Change 3365497 on 2017/03/27 by Matt.Kuhlenschmidt

	Fix texture importing when an FBX file incorrectly reports absolute path as relative.  First we try absolute, then we try fbx reported relative, then we try relative to parent FBX file.

Change 3365498 on 2017/03/27 by Matt.Kuhlenschmidt

	Fix attempting to load a package in FBX scene import when the import path is empty. This greatly reduces FBX scene import time

Change 3365504 on 2017/03/27 by Yannick.Lange

	VR Editor landscape fix ensure in when starting to paint/sculpt. Mousemove on tool should only be called when the tool is actually active, not when hovering.

Change 3365551 on 2017/03/27 by Matt.Kuhlenschmidt

	PR #3425: Added Scrollbar customization to SComboBox (Contributed by Altrue)

	#jira UE-43338

Change 3365580 on 2017/03/27 by Matt.Kuhlenschmidt

	PR #3409: Add support for per-Category filtering in Output Log (Contributed by thagberg)

Change 3365672 on 2017/03/27 by Andrew.Rodham

	Sequencer: Preanimated state producers can now produce null tokens
	  - Doing so implies no preanimated state should be saved

Change 3365791 on 2017/03/27 by Andrew.Rodham

	Sequencer: Added Material Parameter Collection track

Change 3365806 on 2017/03/27 by Max.Chen

	Sequencer: Add option to instance sub sequences.

	#jira UE-43307

Change 3365822 on 2017/03/27 by Matt.Kuhlenschmidt

	Subdue the output log font color a bit

Change 3365846 on 2017/03/27 by Jamie.Dale

	Added package redirection on load/find

Change 3365852 on 2017/03/27 by Jamie.Dale

	Adding a way to mark a package as no longer missing

Change 3365896 on 2017/03/27 by Jamie.Dale

	Adding GlobalNotification to Slate

	This is the guts of the GlobalEditorNotification, so it can be used by code that doesn't link to UnrealEd.

Change 3365900 on 2017/03/27 by Jamie.Dale

	Prevent the default cooked sandbox from trying to read non-cooked assets

Change 3366550 on 2017/03/27 by Max.Chen

	Sequencer: Fix case

Change 3367301 on 2017/03/28 by Andrew.Rodham

	Tests: Added test actor with a variety of properties for testing purposes

Change 3367303 on 2017/03/28 by Andrew.Rodham

	Tests: Enabled ActorSequenceEditor plugin in EngineTest project

Change 3367304 on 2017/03/28 by Andrew.Rodham

	Tests: Added several functional testing maps for sequencer
	  - SequencerTest_Properties - tests animating various property types
	  - SequencerTest_Events - tests basic event triggering functionality (including additional event receivers and event ordering)
	  - SequencerTest_BindingOverrides - tests overriding possessable and spawnable bindings, along with bindings in sub sequences
	  - SequencerTest_ActorSequence - tests basic actor sequence functionality

Change 3367465 on 2017/03/28 by Max.Chen

	Sequencer: Set Bind Sequencer to PIE off by default, Bind Sequencer to Simulate remains on by default.

Change 3367515 on 2017/03/28 by Matt.Kuhlenschmidt

	Guard against visual studio accessor crash

	#jira UE-43368

Change 3368118 on 2017/03/28 by Alexis.Matte

	Fix the staticmesh conversion from 4.13. There was a error in the LOD loop we where not remapping the LOD 0.
	#jira UE-42731

Change 3368485 on 2017/03/28 by Alex.Delesky

	#jira UE-42207 - Updated SVN Binaries for MacOSX 64-bit:
	- Subversion 1.9.4 -> 1.9.5
	- OpenSSL 1.0.2h -> 1.0.2k
	- BerkeleyDB 5.3.15 -> 6.2.23
	- Java 8u101 -> 8u121
	- Sqlite 3.13.0 -> 3.17.0
	- Serf 1.3.8 -> 1.3.9
	- Swig 3.0.10 -> 3.0.12
	- ZLib 1.2.9 -> 1.2.11

Change 3368495 on 2017/03/28 by Alex.Delesky

	#jira UE-42207 - Updated SVN Binaries for Windows 64-bit:
	- Subversion 1.9.4 -> 1.9.5
	- OpenSSL 1.0.2h -> 1.0.2k
	- BerkeleyDB 5.3.15 -> 6.2.23
	- Java 8u101 -> 8u121
	- Sqlite 3.13.0 -> 3.17.0
	- Serf 1.3.8 -> 1.3.9
	- Swig 3.0.10 -> 3.0.12
	- ZLib 1.2.9 -> 1.2.11

Change 3368501 on 2017/03/28 by Alex.Delesky

	#jira UE-42207 - SVN Build instructions for Windows and Mac 64-bit libraries, and license files for Mac libraries

Change 3368782 on 2017/03/28 by Nick.Darnell

	UMG - Improving some logging for fast widget creation.

Change 3368826 on 2017/03/28 by Nick.Darnell

	Slate - Slate Application now maintains seperate tracking for each pointer being utilized for drag drop, so now multiple fingers on multiple widgets can now simultaneously be attempting a drag, however once one of them becomes successful, we clear all state of all other tracking since only one Drag Drop operation is possible at a time.

	Slate - bFoldTick is now removed from the codebase, we haven't supported the other (non-folded) code path for awhile, so there was no point in maintaining the switch.

	Slate - Users have noticed issues where the cursor does not appear when changing visibility (through toggling the way the cursor appears).  This was rooted in how the OS requested cursor changes, WM_SETCURSOR on Windows only asks for new cursors when the mouse moves, but often cursors change just because mouse capture changes.  So now the path has been centralized in Slate Tick to only handle the cursor changes in one place, and several places that need to refresh the cursor state, now set a flag to handle it on next tick.

	#jira UE-40486

Change 3368917 on 2017/03/28 by Arciel.Rekman

	Linux: allow building with clang 4.0.

Change 3369074 on 2017/03/28 by Nick.Darnell

	UMG - Fixing some spelling on the hardware cursor tip.

	UMG - Changed some checks to ensure now that users can input the wrong data from the editor.  Adding some clamping to the editor interface so that users are not tempted to enter incorrect hotspot ranges for their cursors.

	#jira UE-43419
	#jira UE-43425

Change 3369137 on 2017/03/28 by Max.Chen

	Sequencer: Add given master track sets the outer to the movie scene.

Change 3369360 on 2017/03/29 by Andrew.Rodham

	Sequencer: Reconciled 3349194 and 3365041 with animphys merge

Change 3369410 on 2017/03/29 by Alexis.Matte

	Fix the select filename in the FileDialog "Desktop window platform"
	#jira UE-43319

Change 3369475 on 2017/03/29 by Nick.Darnell

	PR #3413: UE-37710: Proper scaling of WebBrowserViewport (Contributed by projectgheist)

	Modified - you can't use the clip rect to decide on how large you should be.

	#jira UE-37710

Change 3369775 on 2017/03/29 by Max.Chen

	ControlRig: Fix crash on exit.

	#jira UE-43411

Change 3370466 on 2017/03/29 by Nick.Darnell

	AsyncLoading - Adding USoundBase to the set of CDOs that have a particular fixed boot order.

	StreamableManager - Only showing the duplicate load error in debug builds, it's not a real error.

	#jira UE-43409

Change 3370570 on 2017/03/29 by Nick.Darnell

	Slate - Fixing a bug with ZOrder being discarded on the SOverlay Slot.

	#jira UE-43431

Change 3370644 on 2017/03/29 by Andrew.Rodham

	Temporarily disabling sequencer functional test "Event Position"

Change 3370713 on 2017/03/29 by Nick.Darnell

	PR #3399: UE-42831: Anchor text ignores scale (Contributed by projectgheist)

	#jira UE-43156
	#jira UE-42831

Change 3371243 on 2017/03/30 by Arciel.Rekman

	Linux: scale OS allocation pool to match memory size.

	- Number of distinct VMAs (contiguous virtual memory areas, i.e. mappings done via mmap()) is rather low (~64k)
	  and we can run out of VMAs earlier than we will run into available memory. Larger pool makes this less likely.

Change 3371262 on 2017/03/30 by Arciel.Rekman

	Linux: fix custom present.

	- PR #3383 contributed by yaakuro.

Change 3371301 on 2017/03/30 by Arciel.Rekman

	Linux: fix copying to a non-existent directory during Setup.

Change 3371307 on 2017/03/30 by Andrew.Rodham

	Editor: Added "Resave All" functionality to content browser folders

Change 3371364 on 2017/03/30 by Andrew.Rodham

	Sequencer: Level streaming improvements
	  - Tick prerequisites are now set up when any object binding is resolved, not at the start of the sequence. This unifies code between spawnables and possessables, and allows tick prerequisites to still be set up when levels are streamed in
	  - Actor references are no longer resolved when a PIEInstance is specified on the package, and it cannot be fixed up to a different ptr than the original. This stops us resolving actors from one world into another.
	  - Fixed level visibility request getting cleared when the cumulative total was 0 (it should only do this if there are no requests left)

	#jira UE-43225

Change 3371365 on 2017/03/30 by Andrew.Rodham

	Tests: Sequencer level streaming tests

Change 3371493 on 2017/03/30 by Nick.Darnell

	PR #3408: UE-19980: Added FCanExecuteAction to prevent keyboard shortcut. (Contributed by projectgheist)

Change 3371524 on 2017/03/30 by Nick.Darnell

	PR #2938: Minor UMG code fixups (Contributed by projectgheist), accepted most of the changes.

Change 3371545 on 2017/03/30 by Nick.Darnell

	UMG - Fixing some minor issues with WidgetComponents not properly limiting input depending on what is supported with reguard to hardware input.

Change 3371576 on 2017/03/30 by Matt.Kuhlenschmidt

	PR #3433: Fix for the Standalone D3D Slate Shader using the wrong value for the. (Contributed by megasjay)

Change 3371590 on 2017/03/30 by Nick.Darnell

	UMG - Fixing widget alignment in the viewport when using the widget component with screen space, with an aspect ratio lock on the player's camera.  The widgets should now show up in the right locations.

Change 3371625 on 2017/03/30 by Alexis.Matte

	Fix the merge tool material id assignment
	#jira UE-43246

Change 3371666 on 2017/03/30 by Nick.Darnell

	UMG - Reducing logging, don't need to tell everyone all the time we're using the fast widget path.

Change 3371687 on 2017/03/30 by Arciel.Rekman

	Linux: switch to new managed filehandles.

Change 3371778 on 2017/03/30 by Matt.Kuhlenschmidt

	Fixed the animation to play property on skeletal meshes being too small to read anything

	#jira UE-43327

Change 3372709 on 2017/03/30 by Matt.Kuhlenschmidt

	Made slate loading widget / movie play back more thread safe by eliminating Slate applicaiton or the main window from being ticked directly on another thread.  We now have a separate virtual window for ticking and painting the loading screen widgets in isolation

Change 3372757 on 2017/03/30 by Nick.Darnell

	Paragon - Fixing cases where people were using PostLoad() where really it should have done when the widget was constructed or created.  This is a side effect of the FastWidget creation path 'PostLoad()' is not called on newly constructed widgets, though it did before because part of duplicating the WidgetTree, required serialization, which would have called it.

Change 3372777 on 2017/03/30 by Nick.Darnell

	Fixing fast widget template cooking so that it does the same logic as Initialize did, centralizing the code to find the first widgetblueprintclass.

Change 3372949 on 2017/03/30 by Nick.Darnell

	UMG - Fixing some cooking crashes for the super class.

Change 3373139 on 2017/03/30 by Jeff.Farris

	Added TimingPolicy option to WidgetComponent, so widgets can optionally tick in game time rather than real time.

	(Copy of CL 3279699 from Robo Recall to Dev-Editor)

Change 3373235 on 2017/03/30 by Nick.Darnell

	Fixing a cooking issue, accidentally removed code that was properly loading some needed assets.

Change 3373266 on 2017/03/30 by Matt.Kuhlenschmidt

	Made GetMoviePlayer thread safe.  Simply accessing GetMoviePlayer is safe now as is checking IsLoadingFinished.  However, most of the functions on movie player are only safe from the game thread!

Change 3374026 on 2017/03/31 by Andrew.Rodham

	Sequencer: Moved evaluation group registration to IMovieSceneModule

	#jira UE-43420

Change 3374060 on 2017/03/31 by Yannick.Lange

	VR Editor: Collision on motion controllers in simulate.

Change 3374185 on 2017/03/31 by Nick.Darnell

	Attempting to fix the build.

Change 3374232 on 2017/03/31 by Max.Chen

	Sequencer: Fix audio not playing in editor

	#jira UE-43514

Change 3374322 on 2017/03/31 by Nick.Darnell

	UMG - SafeZone widget now has comments, and useful tips.  Using the debugging console commands now trigger the broadcast that will cause controls like the SSafeZone widget to resample the display metrics to learn the new safezone ratio.

Change 3374424 on 2017/03/31 by Max.Chen

	Updated test content so that the door animation is now set to "Keep State" for the When Finished property.

	#jira UE-43519

Change 3374447 on 2017/03/31 by Max.Chen

	Sequencer: Notify streaming system prior to camera cuts

	By default, this does nothing. Users will need to enable the preroll section of camera cuts for the streaming system to activate prior to cutting to cameras.

	#jira UE-42406

Change 3374571 on 2017/03/31 by Andrew.Rodham

	Sequencer: Unified global and object-bound pre animated state, added InitializeObjectForAnimation method to state producers

Change 3374578 on 2017/03/31 by Andrew.Rodham

	Sequencer: Added unit tests for pre-animated state

Change 3374592 on 2017/03/31 by Max.Chen

	Color Customization: Set curve color names.

	#jira UE-43405

Change 3374596 on 2017/03/31 by Andrew.Rodham

	Corrected documentation comment

Change 3374671 on 2017/03/31 by Matt.Kuhlenschmidt

	Fix movie scene audio track not compiling outside of editor

Change 3374689 on 2017/03/31 by Matt.Kuhlenschmidt

	Remove the slate thread masquerading as the game thread in IsInGameThread

Change 3374730 on 2017/03/31 by Max.Chen

	Sequencer: Add check for null loaded level.

Change 3374732 on 2017/03/31 by Max.Chen

	Sequencer: Remove null tracks on postload.

Change 3374737 on 2017/03/31 by tim.gautier

	- Updated UMG_Optimization: Adjusted Variable names to resolve compile errors due to Widget Components and Variables sharing names (cannot be done with new compile improvements)

	- Set Level Blueprint for TM-UMG back to AllPalettes

Change 3374987 on 2017/03/31 by Nick.Darnell

	UMG - Introducing a way to inform the widgets more information about the designer.  There's now a DesignerChanged event sent to all design time widgets letting them know things like the current screen size and DPI scale.

	UMG - The SafeZone widget will now show the correct safe zone amount if you use the safezone command line options, which are now documented in the comment for the USafeZone class.

Change 3375599 on 2017/03/31 by Max.Chen

	Cine Camera: Update camera debug plane when property changes, rather rely soley on tick. This fixes a bug where sliding the value on the details panel doesn't update the debug plane in the viewport simultaneously.

	#jira UE-43543

Change 3375601 on 2017/03/31 by Arciel.Rekman

	Linux: switch to v9 cross-toolchain.

Change 3375856 on 2017/04/01 by Andrew.Rodham

	Sequencer: Fixed 'formal parameter with requested alignment of 16 won't be aligned'

Change 3375870 on 2017/04/01 by Andrew.Rodham

	Sequencer: Fixed explicit template instantiation ocurring before the complete definition of type's members
	  - This resulted such members not being instantiated (and hence exported) when compiled with clang

Change 3376114 on 2017/04/02 by Arciel.Rekman

	Linux: make source code accessor aware of clang 3.9 and 4.0.

Change 3376138 on 2017/04/02 by Arciel.Rekman

	Linux: add clang to fedora deps (UE-42123).

	- PR #3273 submitted by cpyarger.

Change 3376159 on 2017/04/02 by Arciel.Rekman

	Linux: some support for building on Debian Sid or Stretch (UE-35841).

	- Basd on PR #2790 by haimat.

Change 3376163 on 2017/04/02 by Arciel.Rekman

	Linux: install latest clang on Arch (UE-42341).

	- This undoes PR #1905.
	- PR #2897 by SiebenCorgie.
	- PR #3302 by awesomeness872.
	- PR #3341 by patrickelectric.

Change 3376167 on 2017/04/02 by Arciel.Rekman

	Add FreeBSD mem info (courtesy support for the out of tree build) (UE-42994).

	- PR #3378 by mdcasey.

Change 3376168 on 2017/04/02 by Arciel.Rekman

	Linux: fixed VHACD Makefile on a case sensitive fs (UE-42905).

	- PR #3381 by slonopotamus.

Change 3376177 on 2017/04/02 by Arciel.Rekman

	SlateDlg: case-insensitive comparison of filter extensions (UE-39477).

	- PR #3019 by aknarts.

Change 3376178 on 2017/04/02 by Arciel.Rekman

	WebRTC: only x86_64 version exists for Linux.

Change 3376245 on 2017/04/03 by Andrew.Rodham

	Sequencer: Re-enabled event order test

Change 3376339 on 2017/04/03 by Matt.Kuhlenschmidt

	Fix crash during loading movie playback on DX12 due to not ever cleaning up old resources

	#jira UE-27026

Change 3376481 on 2017/04/03 by Alex.Delesky

	#jira UE-43495 - TMaps will now support customized key properties correctly.

Change 3376741 on 2017/04/03 by Matt.Kuhlenschmidt

	Fix crash flushing font cache when loading a movie.  This is no longer save on the slate movie thread

	#jira UE-43567

Change 3376763 on 2017/04/03 by Shaun.Kime

	Material Reroute nodes do not work for Texture Object Parameters as they return a base output type. Modified logic to now support this node type.
	#jira UE-43521

Change 3376836 on 2017/04/03 by Jamie.Dale

	Fixed text format history being clobbered by reference collection

	#jira UE-37513

Change 3376852 on 2017/04/03 by Nick.Darnell

	Paragon - Found a case where a user had marked a BindWidget property as Transient which prevents serializing the property binding now for widget fast mode.

	#jira UE-43564

Change 3377207 on 2017/04/03 by Jamie.Dale

	Desktop platform directory pickers are expected to return absolute paths

	File pickers return relative paths though, and we should make this consistent at some point.

	#jira UE-43588

Change 3377214 on 2017/04/03 by Matt.Kuhlenschmidt

	Fix movie player shutdown crash in non-editor builds

	#jira UE-43577

Change 3377299 on 2017/04/03 by Michael.Dupuis

	#jira UE-43586 : properties should be non transactional
	#jira UE-43559

Change 3378333 on 2017/04/04 by Michael.Dupuis

	#jira UE-43585
	#jira UE-43586
	Revert back to purple color

Change 3378633 on 2017/04/04 by Matt.Kuhlenschmidt

	Resaved this asset to avoid zero engine version warnings

Change 3378958 on 2017/04/04 by Nick.Darnell

	Automation - Fixing the race condition to finish compiling shaders on screenshots for UI.

[CL 3379345 by Matt Kuhlenschmidt in Main branch]
2017-04-04 15:35:21 -04:00

492 lines
16 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "AutomationBlueprintFunctionLibrary.h"
#include "HAL/IConsoleManager.h"
#include "Misc/AutomationTest.h"
#include "EngineGlobals.h"
#include "UnrealClient.h"
#include "Camera/CameraActor.h"
#include "Camera/PlayerCameraManager.h"
#include "Engine/Texture.h"
#include "Engine/GameViewportClient.h"
#include "Kismet/GameplayStatics.h"
#include "Engine/Engine.h"
#include "Tests/AutomationCommon.h"
#include "Logging/MessageLog.h"
#include "TakeScreenshotAfterTimeLatentAction.h"
#include "HighResScreenshot.h"
#include "Slate/SceneViewport.h"
#include "Tests/AutomationTestSettings.h"
#include "Slate/WidgetRenderer.h"
#include "DelayAction.h"
#include "Widgets/SViewport.h"
#include "Framework/Application/SlateApplication.h"
#include "ShaderCompiler.h"
#include "AutomationBlueprintFunctionLibrary.h"
#include "BufferVisualizationData.h"
#include "Engine/LocalPlayer.h"
#include "ContentStreaming.h"
#define LOCTEXT_NAMESPACE "Automation"
DEFINE_LOG_CATEGORY_STATIC(BlueprintAssertion, Error, Error)
DEFINE_LOG_CATEGORY_STATIC(AutomationFunctionLibrary, Log, Log)
static TAutoConsoleVariable<int32> CVarAutomationScreenshotResolutionWidth(
TEXT("AutomationScreenshotResolutionWidth"),
0,
TEXT("The width of automation screenshots."),
ECVF_Default);
static TAutoConsoleVariable<int32> CVarAutomationScreenshotResolutionHeight(
TEXT("AutomationScreenshotResolutionHeight"),
0,
TEXT("The height of automation screenshots."),
ECVF_Default);
void FinishLoadingBeforeScreenshot()
{
// Force all shader compiling to finish.
GShaderCompilingManager->FinishAllCompilation();
// Force all mip maps to load before taking the screenshot.
UTexture::ForceUpdateTextureStreaming();
IStreamingManager::Get().StreamAllResources(0.0f);
}
#if (WITH_DEV_AUTOMATION_TESTS || WITH_PERF_AUTOMATION_TESTS)
class FConsoleVariableSwapper
{
public:
FConsoleVariableSwapper(FString InConsoleVariableName)
: bModified(false)
, ConsoleVariableName(InConsoleVariableName)
{
}
void Set(int32 Value)
{
IConsoleVariable* ConsoleVariable = IConsoleManager::Get().FindConsoleVariable(*ConsoleVariableName);
if ( ensure(ConsoleVariable) )
{
if ( bModified == false )
{
bModified = true;
OriginalValue = ConsoleVariable->GetInt();
}
ConsoleVariable->Set(Value);
}
}
void Restore()
{
if ( bModified )
{
IConsoleVariable* ConsoleVariable = IConsoleManager::Get().FindConsoleVariable(*ConsoleVariableName);
if ( ensure(ConsoleVariable) )
{
ConsoleVariable->Set(OriginalValue);
}
bModified = false;
}
}
private:
bool bModified;
FString ConsoleVariableName;
int32 OriginalValue;
};
class FAutomationScreenshotTaker
{
public:
FAutomationScreenshotTaker(UWorld* InWorld, const FString& InName, FAutomationScreenshotOptions InOptions)
: World(InWorld)
, Name(InName)
, Options(InOptions)
, DefaultFeature_AntiAliasing(TEXT("r.DefaultFeature.AntiAliasing"))
, DefaultFeature_AutoExposure(TEXT("r.DefaultFeature.AutoExposure"))
, DefaultFeature_MotionBlur(TEXT("r.DefaultFeature.MotionBlur"))
, PostProcessAAQuality(TEXT("r.PostProcessAAQuality"))
, MotionBlurQuality(TEXT("r.MotionBlurQuality"))
, ScreenSpaceReflectionQuality(TEXT("r.SSR.Quality"))
, EyeAdaptationQuality(TEXT("r.EyeAdaptationQuality"))
, ContactShadows(TEXT("r.ContactShadows"))
{
GEngine->GameViewport->OnScreenshotCaptured().AddRaw(this, &FAutomationScreenshotTaker::GrabScreenShot);
check(IsInGameThread());
if ( Options.bDisableNoisyRenderingFeatures )
{
DefaultFeature_AntiAliasing.Set(0);
DefaultFeature_AutoExposure.Set(0);
DefaultFeature_MotionBlur.Set(0);
PostProcessAAQuality.Set(0);
MotionBlurQuality.Set(0);
ScreenSpaceReflectionQuality.Set(0);
EyeAdaptationQuality.Set(0);
ContactShadows.Set(0);
}
Options.SetToleranceAmounts(Options.Tolerance);
if ( UGameViewportClient* ViewportClient = GEngine->GameViewport )
{
static IConsoleVariable* ICVar = IConsoleManager::Get().FindConsoleVariable(FBufferVisualizationData::GetVisualizationTargetConsoleCommandName());
if ( ICVar )
{
if ( ViewportClient->GetEngineShowFlags() )
{
ViewportClient->GetEngineShowFlags()->SetVisualizeBuffer(InOptions.VisualizeBuffer == NAME_None ? false : true);
ViewportClient->GetEngineShowFlags()->SetTonemapper(InOptions.VisualizeBuffer == NAME_None ? true : false);
ICVar->Set(*InOptions.VisualizeBuffer.ToString());
}
}
}
}
virtual ~FAutomationScreenshotTaker()
{
check(IsInGameThread());
DefaultFeature_AntiAliasing.Restore();
DefaultFeature_AutoExposure.Restore();
DefaultFeature_MotionBlur.Restore();
PostProcessAAQuality.Restore();
MotionBlurQuality.Restore();
ScreenSpaceReflectionQuality.Restore();
EyeAdaptationQuality.Restore();
ContactShadows.Restore();
if ( UGameViewportClient* ViewportClient = GEngine->GameViewport )
{
static IConsoleVariable* ICVar = IConsoleManager::Get().FindConsoleVariable(FBufferVisualizationData::GetVisualizationTargetConsoleCommandName());
if ( ICVar )
{
if ( ViewportClient->GetEngineShowFlags() )
{
ViewportClient->GetEngineShowFlags()->SetVisualizeBuffer(false);
ViewportClient->GetEngineShowFlags()->SetTonemapper(true);
ICVar->Set(TEXT(""));
}
}
}
GEngine->GameViewport->OnScreenshotCaptured().RemoveAll(this);
FAutomationTestFramework::Get().NotifyScreenshotTakenAndCompared();
}
void GrabScreenShot(int32 InSizeX, int32 InSizeY, const TArray<FColor>& InImageData)
{
check(IsInGameThread());
FAutomationScreenshotData Data = AutomationCommon::BuildScreenshotData(GWorld->GetName(), Name, InSizeX, InSizeY);
// Copy the relevant data into the metadata for the screenshot.
Data.bHasComparisonRules = true;
Data.ToleranceRed = Options.ToleranceAmount.Red;
Data.ToleranceGreen = Options.ToleranceAmount.Green;
Data.ToleranceBlue = Options.ToleranceAmount.Blue;
Data.ToleranceAlpha = Options.ToleranceAmount.Alpha;
Data.ToleranceMinBrightness = Options.ToleranceAmount.MinBrightness;
Data.ToleranceMaxBrightness = Options.ToleranceAmount.MaxBrightness;
Data.bIgnoreAntiAliasing = Options.bIgnoreAntiAliasing;
Data.bIgnoreColors = Options.bIgnoreColors;
Data.MaximumLocalError = Options.MaximumLocalError;
Data.MaximumGlobalError = Options.MaximumGlobalError;
FAutomationTestFramework::Get().OnScreenshotCaptured().ExecuteIfBound(InImageData, Data);
UE_LOG(AutomationFunctionLibrary, Log, TEXT("Screenshot captured as %s"), *Data.Path);
if ( GIsAutomationTesting )
{
FAutomationTestFramework::Get().OnScreenshotCompared.AddRaw(this, &FAutomationScreenshotTaker::OnComparisonComplete);
}
else
{
delete this;
}
}
void OnComparisonComplete(bool bWasNew, bool bWasSimilar, double MaxLocalDifference, double GlobalDifference, FString ErrorMessage)
{
FAutomationTestFramework::Get().OnScreenshotCompared.RemoveAll(this);
if ( bWasNew )
{
UE_LOG(AutomationFunctionLibrary, Warning, TEXT("New Screenshot '%s' was discovered! Please add a ground truth version of it."), *Name);
}
else
{
if ( bWasSimilar )
{
UE_LOG(AutomationFunctionLibrary, Display, TEXT("Screenshot '%s' was similar! Global Difference = %f, Max Local Difference = %f"), *Name, GlobalDifference, MaxLocalDifference);
}
else
{
if ( ErrorMessage.IsEmpty() )
{
UE_LOG(AutomationFunctionLibrary, Error, TEXT("Screenshot '%s' test failed, Screnshots were different! Global Difference = %f, Max Local Difference = %f"), *Name, GlobalDifference, MaxLocalDifference);
}
else
{
UE_LOG(AutomationFunctionLibrary, Error, TEXT("Screenshot '%s' test failed; Error = %s"), *Name, *ErrorMessage);
}
}
}
delete this;
}
private:
TWeakObjectPtr<UWorld> World;
FString Name;
FAutomationScreenshotOptions Options;
FConsoleVariableSwapper DefaultFeature_AntiAliasing;
FConsoleVariableSwapper DefaultFeature_AutoExposure;
FConsoleVariableSwapper DefaultFeature_MotionBlur;
FConsoleVariableSwapper PostProcessAAQuality;
FConsoleVariableSwapper MotionBlurQuality;
FConsoleVariableSwapper ScreenSpaceReflectionQuality;
FConsoleVariableSwapper EyeAdaptationQuality;
FConsoleVariableSwapper ContactShadows;
};
#endif
UAutomationBlueprintFunctionLibrary::UAutomationBlueprintFunctionLibrary(const class FObjectInitializer& Initializer)
: Super(Initializer)
{
}
bool UAutomationBlueprintFunctionLibrary::TakeAutomationScreenshotInternal(UObject* WorldContextObject, const FString& Name, FAutomationScreenshotOptions Options)
{
FinishLoadingBeforeScreenshot();
// Fallback resolution if all else fails for screenshots.
uint32 ResolutionX = 1280;
uint32 ResolutionY = 720;
// First get the default set for the project.
UAutomationTestSettings const* AutomationTestSettings = GetDefault<UAutomationTestSettings>();
if ( AutomationTestSettings->DefaultScreenshotResolution.GetMin() > 0 )
{
ResolutionX = (uint32)AutomationTestSettings->DefaultScreenshotResolution.X;
ResolutionY = (uint32)AutomationTestSettings->DefaultScreenshotResolution.Y;
}
// If there's an override resolution, use that instead.
if ( Options.Resolution.GetMin() > 0 )
{
ResolutionX = (uint32)Options.Resolution.X;
ResolutionY = (uint32)Options.Resolution.Y;
}
else
{
// Failing to find an override, look for a platform override that may have been provided through the
// device profiles setup, to configure the CVars for controlling the automation screenshot size.
int32 OverrideWidth = CVarAutomationScreenshotResolutionWidth.GetValueOnGameThread();
int32 OverrideHeight = CVarAutomationScreenshotResolutionHeight.GetValueOnGameThread();
if ( OverrideWidth > 0 )
{
ResolutionX = (uint32)OverrideWidth;
}
if ( OverrideHeight > 0 )
{
ResolutionY = (uint32)OverrideHeight;
}
}
#if (WITH_DEV_AUTOMATION_TESTS || WITH_PERF_AUTOMATION_TESTS)
FAutomationScreenshotTaker* TempObject = new FAutomationScreenshotTaker(WorldContextObject ? WorldContextObject->GetWorld() : nullptr, Name, Options);
#endif
//static IConsoleVariable* HighResScreenshotDelay = IConsoleManager::Get().FindConsoleVariable(TEXT("r.HighResScreenshotDelay"));
//check(HighResScreenshotDelay);
//HighResScreenshotDelay->Set(10);
if ( FPlatformProperties::HasFixedResolution() )
{
FScreenshotRequest::RequestScreenshot(false);
return true;
}
else
{
FHighResScreenshotConfig& Config = GetHighResScreenshotConfig();
if ( Config.SetResolution(ResolutionX, ResolutionY, 1.0f) )
{
if ( !GEngine->GameViewport->GetGameViewport()->TakeHighResScreenShot() )
{
// If we failed to take the screenshot, we're going to need to cleanup the automation screenshot taker.
#if (WITH_DEV_AUTOMATION_TESTS || WITH_PERF_AUTOMATION_TESTS)
delete TempObject;
#endif
return false;
}
return true;
}
}
return false;
}
void UAutomationBlueprintFunctionLibrary::TakeAutomationScreenshot(UObject* WorldContextObject, FLatentActionInfo LatentInfo, const FString& Name, const FAutomationScreenshotOptions& Options)
{
if ( GIsAutomationTesting )
{
if ( UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject) )
{
FLatentActionManager& LatentActionManager = World->GetLatentActionManager();
if ( LatentActionManager.FindExistingAction<FTakeScreenshotAfterTimeLatentAction>(LatentInfo.CallbackTarget, LatentInfo.UUID) == nullptr )
{
LatentActionManager.AddNewAction(LatentInfo.CallbackTarget, LatentInfo.UUID, new FTakeScreenshotAfterTimeLatentAction(LatentInfo, Name, Options));
}
}
}
else
{
UE_LOG(AutomationFunctionLibrary, Log, TEXT("Screenshot not captured - screenshots are only taken during automation tests"));
}
}
void UAutomationBlueprintFunctionLibrary::TakeAutomationScreenshotAtCamera(UObject* WorldContextObject, FLatentActionInfo LatentInfo, ACameraActor* Camera, const FString& NameOverride, const FAutomationScreenshotOptions& Options)
{
if ( Camera == nullptr )
{
FMessageLog("PIE").Error(LOCTEXT("CameraRequired", "A camera is required to TakeAutomationScreenshotAtCamera"));
return;
}
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(WorldContextObject, 0);
if ( PlayerController == nullptr )
{
FMessageLog("PIE").Error(LOCTEXT("PlayerRequired", "A player controller is required to TakeAutomationScreenshotAtCamera"));
return;
}
// Move the player, then queue up a screenshot.
// We need to delay before the screenshot so that the motion blur has time to stop.
PlayerController->SetViewTarget(Camera, FViewTargetTransitionParams());
FString ScreenshotName = Camera->GetName();
if ( !NameOverride.IsEmpty() )
{
ScreenshotName = NameOverride;
}
if ( UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject) )
{
ScreenshotName = FString::Printf(TEXT("%s_%s"), *World->GetName(), *ScreenshotName);
FLatentActionManager& LatentActionManager = World->GetLatentActionManager();
if ( LatentActionManager.FindExistingAction<FTakeScreenshotAfterTimeLatentAction>(LatentInfo.CallbackTarget, LatentInfo.UUID) == nullptr )
{
LatentActionManager.AddNewAction(LatentInfo.CallbackTarget, LatentInfo.UUID, new FTakeScreenshotAfterTimeLatentAction(LatentInfo, ScreenshotName, Options));
}
}
}
void UAutomationBlueprintFunctionLibrary::TakeAutomationScreenshotOfUI(UObject* WorldContextObject, FLatentActionInfo LatentInfo, const FString& Name, const FAutomationScreenshotOptions& Options)
{
FinishLoadingBeforeScreenshot();
if ( UWorld* World = WorldContextObject->GetWorld() )
{
if ( UGameViewportClient* GameViewport = WorldContextObject->GetWorld()->GetGameViewport() )
{
TSharedPtr<SViewport> Viewport = GameViewport->GetGameViewportWidget();
if ( Viewport.IsValid() )
{
TArray<FColor> OutColorData;
FIntVector OutSize;
if ( FSlateApplication::Get().TakeScreenshot(Viewport.ToSharedRef(), OutColorData, OutSize) )
{
#if (WITH_DEV_AUTOMATION_TESTS || WITH_PERF_AUTOMATION_TESTS)
FAutomationScreenshotTaker* TempObject = new FAutomationScreenshotTaker(GEngine->GetWorldFromContextObject(WorldContextObject), Name, Options);
FAutomationScreenshotData Data = AutomationCommon::BuildScreenshotData(GWorld->GetName(), Name, OutSize.X, OutSize.Y);
// Copy the relevant data into the metadata for the screenshot.
Data.bHasComparisonRules = true;
Data.ToleranceRed = Options.ToleranceAmount.Red;
Data.ToleranceGreen = Options.ToleranceAmount.Green;
Data.ToleranceBlue = Options.ToleranceAmount.Blue;
Data.ToleranceAlpha = Options.ToleranceAmount.Alpha;
Data.ToleranceMinBrightness = Options.ToleranceAmount.MinBrightness;
Data.ToleranceMaxBrightness = Options.ToleranceAmount.MaxBrightness;
Data.bIgnoreAntiAliasing = Options.bIgnoreAntiAliasing;
Data.bIgnoreColors = Options.bIgnoreColors;
Data.MaximumLocalError = Options.MaximumLocalError;
Data.MaximumGlobalError = Options.MaximumGlobalError;
GEngine->GameViewport->OnScreenshotCaptured().Broadcast(OutSize.X, OutSize.Y, OutColorData);
#endif
}
FLatentActionManager& LatentActionManager = World->GetLatentActionManager();
if ( LatentActionManager.FindExistingAction<FTakeScreenshotAfterTimeLatentAction>(LatentInfo.CallbackTarget, LatentInfo.UUID) == nullptr )
{
LatentActionManager.AddNewAction(LatentInfo.CallbackTarget, LatentInfo.UUID, new FWaitForScreenshotComparisonLatentAction(LatentInfo));
}
}
}
}
}
//void UAutomationBlueprintFunctionLibrary::BeginPerformanceCapture()
//{
// //::BeginPerformanceCapture();
//}
//
//void UAutomationBlueprintFunctionLibrary::EndPerformanceCapture()
//{
// //::EndPerformanceCapture();
//}
bool UAutomationBlueprintFunctionLibrary::AreAutomatedTestsRunning()
{
return GIsAutomationTesting;
}
FAutomationScreenshotOptions UAutomationBlueprintFunctionLibrary::GetDefaultScreenshotOptionsForGameplay(EComparisonTolerance Tolerance)
{
FAutomationScreenshotOptions Options;
Options.Tolerance = Tolerance;
Options.bDisableNoisyRenderingFeatures = true;
Options.bIgnoreAntiAliasing = true;
Options.SetToleranceAmounts(Tolerance);
return Options;
}
FAutomationScreenshotOptions UAutomationBlueprintFunctionLibrary::GetDefaultScreenshotOptionsForRendering(EComparisonTolerance Tolerance)
{
FAutomationScreenshotOptions Options;
Options.Tolerance = Tolerance;
Options.bDisableNoisyRenderingFeatures = true;
Options.bIgnoreAntiAliasing = true;
Options.SetToleranceAmounts(Tolerance);
return Options;
}
#undef LOCTEXT_NAMESPACE