Files
UnrealEngineUWP/Engine/Source/Editor/IntroTutorials/Private/IntroTutorials.cpp
Matt Kuhlenschmidt d162beedcc Copying //UE4/Dev-Editor to //UE4/Dev-Main (Source: //UE4/Dev-Editor @ 3431234)
#lockdown Nick.Penwarden

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

Change 3323393 on 2017/02/27 by Ben.Cosh

	This fixes an issue with actor details component selection causing actor selection to get out of sync across undo operations
	#Jira UE-40753 - [CrashReport] UE4Editor_LevelEditor!FLevelEditorActionCallbacks::Paste_CanExecute() [leveleditoractions.cpp:1602]
	#Proj Engine


Change 3379355 on 2017/04/04 by Lauren.Ridge

	Adding sort priorities to Material Parameters and Parameter Groups. If sort priorities are equal, fallback to alphabetical sort. Default sort priority is 0, can be set on the parameter in the base material. Parameters are still sorted within groups.Group sort priority is set on the main material preferences.

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

	Core - Removing several old macros that were referring to EMIT_DEPRECATED_WARNING_MESSAGE, which is no longer defined in the engine, so these macros are double deprecated.

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

	Automation - Adding more logging to the automation controller when generating reports.

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

	UMG - Making the WidgetComponent make more things caneditconst in the editor depending on what the settings are to make it more obvious what works in certain contexts.

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

	UMG - Deprecating OPTIONA_BINDING, moving to PROPERTY_BINDING in place and you'll need to define a PROPERTY_BINDING_IMPLEMENTATION.  Will make bindings safer to call from blueprints.

Change 3379576 on 2017/04/04 by Lauren.Ridge

	Parameter group dropdown now sorts alphabetically

Change 3379592 on 2017/04/04 by JeanMichel.Dignard

	Fbx Morph Targets import optimisation
	- Only reimport the points for each morphs and compute the tangents for the wedges affected by those points.
	- Removed the full skeletal mesh rebuild on each morph target import.
	- Allow MeshUtilities::ComputeTangents_MikkTSpace to only recompute the tangents that are zero.

	Gains around 7.30 mins for 785 morph targets in mikkt space and 1.30 mins using built-in normals, with provided test file.

	#jira UE-34125

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

	UMG - Fixing some OPTIONAL_BINDINGS that needed to be converted.

Change 3380551 on 2017/04/05 by Andrew.Rodham

	Sequencer: Fixed ImplIndex sometimes not relating to the source data index when compiling at the track level

	#jira UE-43446

Change 3380555 on 2017/04/05 by Andrew.Rodham

	Sequencer: Automated unit tests for the segment and track compilers

Change 3380647 on 2017/04/05 by Nick.Darnell

	UMG - Tweaking some stuff on the experimental rich textblock.

Change 3380719 on 2017/04/05 by Yannick.Lange

	Fix  'Compile FortniteClient Mac' and 'Compile Ocean iOS' Failed with Material.cpp errors. Wrapping WITH_EDITOR around ParameterGroupData.

	#jira UE-43667

Change 3380765 on 2017/04/05 by Nick.Darnell

	UMG - Fixing a few more instances of OPTIONAL_BINDING.

Change 3380786 on 2017/04/05 by Yannick.Lange

	Wrap SortPriority in GetParameterSortPriority with  WITH_EDITOR.

Change 3380872 on 2017/04/05 by Matt.Kuhlenschmidt

	PR #3453: UE-43004: YesNo MessageDialog instead of YesNoCancel (Contributed by projectgheist)


Change 3381635 on 2017/04/05 by Matt.Kuhlenschmidt

	Expose static mesh material accessors to blueprints

	#jira UE-43631

Change 3381643 on 2017/04/05 by Matt.Kuhlenschmidt

	Added a way to enable or disable the component transform units display independently from unit display anywhere else.  This is off by default

Change 3381705 on 2017/04/05 by Yannick.Lange

	- Slate application multiple input pre-processors.
	- Remove ViewportWorldInteractionManager, let ViewportWorldInteraction handle it's own input pre-processor.

Change 3381959 on 2017/04/05 by Yannick.Lange

	Back out changelist 3381705. Old changelist.

Change 3382049 on 2017/04/05 by Yannick.Lange

	- Slate application multiple input pre-processors in a wrapper class.
	- Remove ViewportWorldInteractionManager, let ViewportWorldInteraction handle it's own input pre-processor.
	- Deprecated SetInputPreProcessor, but made it work with RegisterInputPreProcessor and UnregisterInputPreProcessor.

Change 3382450 on 2017/04/06 by Andrew.Rodham

	Sequencer: Fixed 'ambiguous' overloaded constructor for UT linux server builds

Change 3382468 on 2017/04/06 by Yannick.Lange

	Rename AllowWorldMovement parameter to bAllow.

Change 3382474 on 2017/04/06 by Yannick.Lange

	Make GetInteractors constant because we dont want it to be possible to change this arrray.

Change 3382492 on 2017/04/06 by Yannick.Lange

	VR Editor: Floating UI's are stored in a map with FNames as key.

Change 3382502 on 2017/04/06 by Yannick.Lange

	VR Editor: Use asset container for auto scaler sound.

Change 3382589 on 2017/04/06 by Nick.Darnell

	Slate - Upgrading usages of SetInputPreprocessor.  Also adjusting the API for the new preprocessor functions to have an option to remove all, which was what several usages expected.  Also updated the deprecated version of SetInputPreprocessor to removeall if null is provided for the remove, mimicing the old functionality.

Change 3382594 on 2017/04/06 by Nick.Darnell

	UMG - Deprecating GetMousePositionScaledByDPI, this function has too many issues, and I don't want to break buggy backwards compatability, so just going to deprecate it instead.  For replacement, you can now access an FGeometry representing the viewport (after DPI scale has been added to the transform stack), and also the FGeometry for a Player's Screen widget host, which might be constrained for splitscreen, or camera aspect.

Change 3382672 on 2017/04/06 by Nick.Darnell

	Build - Fixing incremental build.

Change 3382674 on 2017/04/06 by Nick.Darnell

	Removing a hack added by launcher.

Change 3382697 on 2017/04/06 by Matt.Kuhlenschmidt

	Fixed plugin browser auto-resizing when scrolling.  Gave it a proper splitter

Change 3382875 on 2017/04/06 by Michael.Trepka

	Modified FMacApplication::OnCursorLock() to avoid a thread safety problem with using TSharedPtr/Ref<FMacWindow> of the same window on main and game threads simultaneously.

	#jira FORT-34952

Change 3383303 on 2017/04/06 by Lauren.Ridge

	Adding sort priority to texture parameter code

Change 3383561 on 2017/04/06 by Jamie.Dale

	Fixed MaximumIntegralDigits incorrectly including group separators in its count

Change 3383570 on 2017/04/06 by Jamie.Dale

	Added regression tests for formatting a number with MaximumIntegralDigits and group separators enabled

Change 3384507 on 2017/04/07 by Lauren.Ridge

	Mesh painting no longer paints on invisible components. Toggling visiblity refreshes the selected set.

	#jira UE-21172

Change 3384804 on 2017/04/07 by Joe.Graf

	Fixed a clang error on Linux due to missing virtual destructor when deleting through the interface pointer

	#CodeReview: marc.audy
	#rb: n/a

Change 3385011 on 2017/04/07 by Matt.Kuhlenschmidt

	Fix dirtying levels just by copying actors if the level contains a foliage actor.  The foliage system makes lazy asset pointers

	#jira UE-43750

Change 3385127 on 2017/04/07 by Lauren.Ridge

	Adding WITHEDITOR to OnDragDropCheckOverride

Change 3385241 on 2017/04/07 by Jamie.Dale

	Removing warning if asking for a null or empty localization provider

Change 3385442 on 2017/04/07 by Arciel.Rekman

	Fix a number of problems with Linux splash.

	- Thread safety (UE-40354).
	- Inconsistent font (UE-35000).
	- Change by Cengiz Terzibas.

Change 3385708 on 2017/04/08 by Lauren.Ridge

	Resaving VREditor asset container with engine version

Change 3385711 on 2017/04/08 by Arciel.Rekman

	Speculative fix for a non-unity Linux build.

Change 3386120 on 2017/04/10 by Matt.Kuhlenschmidt

	Fix stats not being enabled when in simulate

Change 3386289 on 2017/04/10 by Matt.Kuhlenschmidt

	PR #3466: Git plugin: add option to autoconfigure Git LFS (Contributed by SRombauts)


Change 3386301 on 2017/04/10 by Matt.Kuhlenschmidt

	PR #3470: Git Plugin: disable "Keep Files Checked Out" checkbox on Submit to Source Control Window (Contributed by SRombauts)


Change 3386381 on 2017/04/10 by Michael.Trepka

	PR #3461: Mac doesn't return the correct exit code (Contributed by projectgheist)


Change 3388223 on 2017/04/11 by matt.kuhlenschmidt

	Deleted collection: MattKTest

Change 3388808 on 2017/04/11 by Lauren.Ridge

	Reset arrows now only display for non-default values in the Material Instance editor. Reset to default arrows now are placed in the correct location for SObjectPropertyEntryBox and SPropertyEditorAsset. SResetToDefaultPropertyEditor now takes a property handle in the constructor, instead of an FPropertyEditor.

	#jira UE-20882

Change 3388843 on 2017/04/11 by Lauren.Ridge

	Forward declaring custom reset override. Fix for incremental build error

Change 3388950 on 2017/04/11 by Nick.Darnell

	PR #3450: UMG "Lock" Feature (Contributed by GBX-ABair).

	Epic Edit: Made some changes to make it work with named slots, added an option not to always recursively itterate the children, also removed the dependency on SWidget changes.


Change 3388996 on 2017/04/11 by Matt.Kuhlenschmidt

	Removed crashtracker

Change 3389004 on 2017/04/11 by Lauren.Ridge

	Fix for automated test error - additional safety check for if the reset button has been successfully created.

Change 3389056 on 2017/04/11 by Matt.Kuhlenschmidt

	Removed editor live streaming

Change 3389077 on 2017/04/11 by Jamie.Dale

	Removing QAGame config change

Change 3389078 on 2017/04/11 by Nick.Darnell

	Fortnite - Fixing an input preprocessor warning.

Change 3389136 on 2017/04/11 by Nick.Darnell

	Slate - Removing deprecated 'aspect ratio' locking box cells, never really worked, deprecated a long time ago.

Change 3389147 on 2017/04/11 by Nick.Darnell

	UMG - Fixing a critical error with the alignment of the lock icon.

	#jira UE-43881

Change 3389401 on 2017/04/11 by Nick.Darnell

	UMG - Adds a designer option to control respecting the locked mode.

Change 3389638 on 2017/04/11 by Nick.Darnell

	UMG - Adding the Widget Reflector button to the widget designer.

Change 3389639 on 2017/04/11 by Nick.Darnell

	UMG - Tweaking the respect lock icon.

Change 3390032 on 2017/04/12 by JeanMichel.Dignard

	Fixed project generation when using subfolders in Target.SolutionDirectory (ie: SolutionDirectory = "Programs\MyProgram")

Change 3390033 on 2017/04/12 by Matt.Kuhlenschmidt

	PR #3472: Exposed Distributions to Game Projects and Plugins (Contributed by StormtideGames)


Change 3390041 on 2017/04/12 by Matt.Kuhlenschmidt

	PR #3446: Add missing TryLock to PThreadCriticalSection and add RAII helper for try locking. (Contributed by Laurie-Hedge)


Change 3390196 on 2017/04/12 by Lauren.Ridge

	Fix for crash on opening assets without reset to default button enable

Change 3390414 on 2017/04/12 by Matt.Kuhlenschmidt

	PR #3300: UE-5528: Added check for empty startup tutorial path (Contributed by projectgheist)


	#jira UE-5528

Change 3390427 on 2017/04/12 by Jamie.Dale

	Fixed not being able to set pure whitespace values on FText properties

	#jira UE-42007

Change 3390712 on 2017/04/12 by Jamie.Dale

	Content Browser search now takes the display names of properties into account

	#jira UE-39564

Change 3390897 on 2017/04/12 by Nick.Darnell

	Slate - Changing the order that the tabs draw in so that the draw front to back, instead of back to front.

Change 3390900 on 2017/04/12 by Nick.Darnell

	Making a Cast CastChecked in UScaleBox.

Change 3390907 on 2017/04/12 by Nick.Darnell

	UMG - Adding GetMousePositionOnPlatform and GetMousePositionOnViewport as other replacements that people can use rather than GetMousePositionScaledByDPI.

Change 3390934 on 2017/04/12 by Cody.Albert

	Fix to set correct draw layer in FSlateElementBatcher::AddElements

Change 3390966 on 2017/04/12 by Nick.Darnell

	Input - Force inline some core input functions.

Change 3391207 on 2017/04/12 by Jamie.Dale

	Fixed moving a folder containing a level not moving the level

	Also removed some redundant usage of ContentBrowserUtils::GetUnloadedAssets

	#jira UE-42091

Change 3391327 on 2017/04/12 by Mike.Fricker

	Removed Twitch support and GameLiveStreaming

Change 3391405 on 2017/04/12 by Mike.Fricker

	Removed Twitch support and GameLiveStreaming (part 2)

Change 3391407 on 2017/04/12 by Mike.Fricker

	Removed some remaining EditorLiveStreaming and CrashTracker code

Change 3392296 on 2017/04/13 by Yannick.Lange

	VR Editor: New assets in asset containers for gizmo rotation.

Change 3392332 on 2017/04/13 by Nick.Darnell

	Slate - Removing delegate hooks from the safezone and scalebox widget when the widgets are cleaned up.

Change 3392349 on 2017/04/13 by Cody.Albert

	Corrected typo

Change 3392688 on 2017/04/13 by Yannick.Lange

	VR Editor: Resaved asset containers

Change 3392905 on 2017/04/13 by Jamie.Dale

	Fixed FPaths::ChangeExtension and FPaths::SetExtension stomping over the path part of a filename if the name part of the had no extension but the path contained a dot, eg) C:/First.Last/file

Change 3393514 on 2017/04/13 by Yannick.Lange

	VR Editor: Temp direct interaction pointer.

Change 3393930 on 2017/04/14 by Yannick.Lange

	VR Editor: Remove unused transform gizmo

Change 3394084 on 2017/04/14 by Max.Chen

	Audio Capture: No longer beta

Change 3394499 on 2017/04/14 by Cody.Albert

	Updated UMovieSceneSpawnTrack::PostLoad to call ConditionalPostLoad on bool track before converting it to a spawn track

	#rnx

Change 3395703 on 2017/04/17 by Yannick.Lange

	Duplicate from Release-4.16 CL 3394172
	Viewport Interaction: Fix disable animation when aiming for gizmo stretch handles.

	#jira UE-43964

Change 3395794 on 2017/04/17 by Mike.Fricker

	#rn Fixed FastXML not loading XML files with attributes delimited by single quote characters

Change 3395945 on 2017/04/17 by Yannick.Lange

	VR Editor: Swap end and start of laser, because they start of laser was using end mesh.

Change 3396253 on 2017/04/17 by Michael.Dupuis

	#jiraUE-43693:
	While moving foliage instance between levels, UI count was'nt updating properly
	Moved MoveSelectedFoliageToLevel to EdModeFoliage as we required more treatment than was done in LevelCollectionModel
	Ask to save foliage type as asset while moving between level foliage instances containing local foliage type

Change 3396291 on 2017/04/17 by Michael.Dupuis

	#jira UE-35029:
	Added a cache for mesh bounds so if the bounds changed we can rebuild the occlusion tree
	Added possibility to register on bounds changed of a static mesh in editor mode
	Rebuild the occlusion tree if the mesh bounds changed
	Rebuild the occlusion tree if we change the mesh associated with a foliage type
	Optimize some operation to not Rebuild the occlusion tree for every instance added/remove instead it's done at the end of the operation

Change 3396293 on 2017/04/17 by Michael.Dupuis

	#jira UE-40685:
	Improve Collision With World algo, to support painting pitch rotated instance or not on a flat terrain or slope respecting the specified ground angles

Change 3397660 on 2017/04/18 by Matt.Kuhlenschmidt

	PR #3480: Git plugin: improve/cleanup init and settings (Contributed by SRombauts)


Change 3397675 on 2017/04/18 by Alex.Delesky

	#jira UE-42383 - Adds a delegate to the placement mode module to allow users to register custom categories and listen to when they should be refreshed.

Change 3397818 on 2017/04/18 by Yannick.Lange

	ViewportInteraction and VR Editor: - Replace GENERATED_UCLASS_BODY with GENERATED_BODY.
	- Remove destructors for uobjects.

Change 3397832 on 2017/04/18 by Yannick.Lange

	VR Editor: Remove unused vreditorbuttoon

Change 3397884 on 2017/04/18 by Yannick.Lange

	VREditor: Addition to 3397832, remove unused vreditorbuttoon.

Change 3397985 on 2017/04/18 by Michael.Trepka

	Another attempt to solve the issue with dsymutil failing with an error saying the input file did not exist. We now check for the input file's existence in a loop 30 times (once a second) before trying to call dsymutil. Also, added a FixDylibDependencies as a prerequisite for dSYM generation.

	#jira UE-43900

Change 3398030 on 2017/04/18 by Jamie.Dale

	Fixed outline changes not automatically updating the text layout used by a text block

	#jira UE-42116

Change 3398039 on 2017/04/18 by Jamie.Dale

	Unified asset drag-and-drop

	FAssetDragDropOp now handles both assets and asset paths, and FAssetPathDragDropOp has been removed. This allows assets and folders to be drag-dropped at the same time in the Content Browser.

	#jira UE-39208

Change 3398074 on 2017/04/18 by Michael.Dupuis

	Fixed crash in cooking fortnite

Change 3398351 on 2017/04/18 by Alex.Delesky

	Fixing PlacementMode module build error

Change 3398513 on 2017/04/18 by Yannick.Lange

	VR Editor: - Remove unused previousvreditor member.
	- Removing extensions when exiting vr mode without having to find the extensions.

Change 3398540 on 2017/04/18 by Alex.Delesky

	Removing a private PlacementMode header that was included in a public one.

Change 3399434 on 2017/04/19 by Matt.Kuhlenschmidt

	Remove uncessary files from p4

Change 3400657 on 2017/04/19 by Jamie.Dale

	Fixed potential underflow when using negative digit ranges with FastDecimalFormat

Change 3400722 on 2017/04/19 by Jamie.Dale

	Removed some check's that could trip with malformed data

Change 3401811 on 2017/04/20 by Jamie.Dale

	Improved the display of asset tags in the Content Browser

	 - Numeric tags are now displayed pretty printed.
	 - Numeric tags can now be displayed as a memory value (the numeric value should be in bytes).
	 - Dimensional tags are now split and each part pretty printed.
	 - Date/Time tags are now stored as a timestamp (which has the side effect of sorting correctly) and displayed as a localized date/time.
	 - The column view now shows the same display values as the tooltips do.
	 - The tooltip now uses the tag meta-data display name (if set).
	 - The tag meta-data display name can now be used as an alias in the Content Browser search.

	#jira UE-34090

Change 3401868 on 2017/04/20 by Cody.Albert

	Add screenshot save directory parameter to editor and project settings

	#rn Added options to the settings menu to specify screenshot save directory

Change 3402107 on 2017/04/20 by Jamie.Dale

	Cleaned up the "View Options" menu in the Content Browser

	Re-organized some of the settings into better groups, and fixed some places where items would still be shown in the asset view when some of these content filter options were disabled (either via a setting, or via the UI).

Change 3402283 on 2017/04/20 by Jamie.Dale

	Creating a folder in the Content Browser now creates the folder on disk, and cancelling a folder naming now removes the temporary folder

	#jira UE-8892

Change 3402572 on 2017/04/20 by Alex.Delesky

	#jira UE-42421

	PR #3311: Improved log messages (Contributed by projectgheist)


Change 3403226 on 2017/04/21 by Yannick.Lange

	VR Editor: - Removed previous quick menu floating UI panel.

	- Added the concept of a info display floating UI panel.

	- Used info display for showing sequencer timer.

Change 3403277 on 2017/04/21 by Yannick.Lange

	VR Editor: - Set window mesh for info display panel.
	- Add option to null out widget when hidden.

Change 3403289 on 2017/04/21 by Yannick.Lange

	VR Editor: Don't load VREditorAssetContainer asset when starting editor.

Change 3403353 on 2017/04/21 by Yannick.Lange

	VR Editor: Fix variable 'RelativeOffset' is uninitialized when used within its own initialization.

Change 3404183 on 2017/04/21 by Matt.Kuhlenschmidt

	Fix typo

Change 3405378 on 2017/04/24 by Alex.Delesky

	#jira UE-42550 - Audio thumbnails should never rerender now, even with real-time thumbnails enabled

Change 3405382 on 2017/04/24 by Alex.Delesky

	#jira UE-42097 - The Main Frame window will no longer steadily grow if it's closed while not maximized

Change 3405384 on 2017/04/24 by Alex.Delesky

	#jira UE-43985 - Duplicating Force Feedback, Sound Wave, or Sound Cue assets from the context menu after right-clicking on the playback controls will now correctly select the newly created asset for rename.

Change 3405386 on 2017/04/24 by Alex.Delesky

	#jire UE-42239 - Blueprints that have been duplicated from another blueprint will now render their thumbnails correctly instead of displaying a flat black thumbnail.

Change 3405388 on 2017/04/24 by Alex.Delesky

	#jira UE-43241 - Blueprint classes that derive from notplaceable classes (such as SpectatorPawn and GameMode) can no longer be placed within the level editor via the right-click Add/Replace menus

Change 3405394 on 2017/04/24 by Alex.Delesky

	#jira UE-42137 - Users can no longer access the widget object of a Widget Component from within actor construction scripts

Change 3405429 on 2017/04/24 by Alex.Delesky

	Fixing a naming issue for CL 3405378

Change 3405579 on 2017/04/24 by Cody.Albert

	Fixed bad include from CL#1401868

	#jira UE-44238

Change 3406716 on 2017/04/24 by Max.Chen

	Sequencer: Add attach/detach rules for attach section.

	#jira UE-40970

Change 3406718 on 2017/04/24 by Max.Chen

	Sequencer: Set component velocity for attached objects

	#jira UE-36337

Change 3406721 on 2017/04/24 by Max.Chen

	Sequencer: Re-evaluate on stop. This fixes a situation where if you set the playback position to the end of a sequence while it's playing, the sequence will stop playing but won't re-evaluate to the end of the sequence.

	#jira UE-43966

Change 3406726 on 2017/04/24 by Max.Chen

	Sequencer: Added StopAndGoToEnd() function to player

	#jira UE-43967

Change 3406727 on 2017/04/24 by Max.Chen

	Sequencer: Add cinematic options to level sequence player

	#jira UE-39388

Change 3407097 on 2017/04/25 by Yannick.Lange

	VR Editor: Temp asset for free rotation handle gizmo.

Change 3407123 on 2017/04/25 by Michael.Dupuis

	#jira UE-44329: Only display the message in attended mode and editor (so user can actually perform the save)

Change 3407135 on 2017/04/25 by Max.Chen

	Sequencer: Load level sequence asynchronously.

	#jira UE-43807

Change 3407137 on 2017/04/25 by Shaun.Kime

	Fixing comments to refer to correct function name.

Change 3407138 on 2017/04/25 by Max.Chen

	Sequencer: Mark actor that the spawnable duplicates as a transient so that the level isn't dirtied. Then clear the transient flag on the object template.

	#jira UE-30007

Change 3407139 on 2017/04/25 by Max.Chen

	Sequencer: Fix active marker in sub, cinematic, control rig sections.

	#jira UE-44235

Change 3407229 on 2017/04/25 by Max.Chen

	Sequencer: Prioritize buttons over label.

	#jira UE-26813

Change 3407343 on 2017/04/25 by Matt.Kuhlenschmidt

	Added a world accessor to blutilties so they can operate on the editor world (spawn,destroy actors etc)

Change 3407401 on 2017/04/25 by Nick.Darnell

	Slate - Adding a Round function to SlateRect.  Also adding a way to convert a Transform2D to a full matrix.

Change 3407842 on 2017/04/25 by Matt.Kuhlenschmidt

	Made AssetTools a uobject interface so it could be access from script.

	A few methods were deprecated and renamed to enforce a consistent UI.  Now all asset tools methods that expose a dialog have "WithDialog" in their name to  differentiate them from methods that do not open dialogs and could be used by scripts for automation.  C++ users may still access IAssetTools but should not ever need to use the UAssetTools  interface class

Change 3407890 on 2017/04/25 by Matt.Kuhlenschmidt

	Removed temp method

Change 3408084 on 2017/04/25 by Matt.Kuhlenschmidt

	Exposed source control helpers to script

Change 3408163 on 2017/04/25 by Matt.Kuhlenschmidt

	Deprecated actor grouping methods on UUnrealEdEngine and moved their functionality into their own class( UActorGroupingUtils).  There is a new editor config setting to set which grouping utils class is used and defaults to the base class.  The new utility methods are exposed to script.

Change 3408220 on 2017/04/25 by Alex.Delesky

	#jira UE-43387 - The Levels window will now support the organization of streaming levels using editor-only folders.

Change 3408239 on 2017/04/25 by Matt.Kuhlenschmidt

	Added a file helpers API to script.  This one is a wrapper around FEditorFileUtils for now to work around some issues exposing legacy methods to script but FEditorFileUtils will be deprecated soon

Change 3408314 on 2017/04/25 by Jamie.Dale

	Fixed typo

Change 3408911 on 2017/04/25 by Max.Chen

	Level Editor: Delegate for when viewport tab content changes.

	#jira UE-37805

Change 3408912 on 2017/04/25 by Max.Chen

	Sequencer: Transport controls are added when viewport content changes and only to viewports that support it (ie. cinematic viewport doesn't allow it since it has its own transport controls). This fixes issues where transport controls wouldn't be visible in newly created viewports and also would get disabled when switching from default to cinematic and back to default.

	#jira UE-37805

Change 3409073 on 2017/04/26 by Yannick.Lange

	VR Editor: Fix starting point of lasers.

Change 3409330 on 2017/04/26 by Matt.Kuhlenschmidt

	Fix CIS

Change 3409497 on 2017/04/26 by Alexis.Matte

	Fix crash importing animation with skeleton that do not match the fbx skeleton.
	#jira UE-43865

Change 3409530 on 2017/04/26 by Michael.Dupuis

	#jira UE-44329: Only display the log if we're not running a commandlet

Change 3409559 on 2017/04/26 by Alex.Delesky

	#jira none - Fixing case of header include for CL 3408220

Change 3409577 on 2017/04/26 by Yannick.Lange

	VR Editor: being able to push/pull along the laser using touchpad or analog stick when transforming object towards laser impact.

Change 3409614 on 2017/04/26 by Max.Chen

	Sequencer: Add Scrub() to movie scene player.

Change 3409658 on 2017/04/26 by Jamie.Dale

	Made the handling of null item selection consistent in SComboBox

	If the selection was initially null and the combo was closed, it would previously pass through the null entry to its child SListView, which would then always think the selection was changing when the combo was opened and cause it to immediately close again.

Change 3409659 on 2017/04/26 by Jamie.Dale

	Added preset Unicode block range selection to the font editor UI

	#jira UE-44312

Change 3409755 on 2017/04/26 by Max.Chen

	Sequencer: Back out bIsUISound for scrubbing.

Change 3410015 on 2017/04/26 by Max.Chen

	Sequencer: Fix crash on asynchronous level sequence player load.

	#jira UE-43807

Change 3410094 on 2017/04/26 by Max.Chen

	Slate: Enter edit mode and return handled if not read only.

Change 3410151 on 2017/04/26 by Michael.Trepka

	Fix for building EngineTest project on Mac

Change 3410930 on 2017/04/27 by Matt.Kuhlenschmidt

	Expose editor visibility methods on Actor to blueprint/script

Change 3411164 on 2017/04/27 by Matt.Kuhlenschmidt

	Fix crash when repeatedly spaming ctrl+s and ctrl+shift+s to save.

	PR #3511: UE-44098: Replace check with if-statement (Contributed by projectgheist)


Change 3411187 on 2017/04/27 by Jamie.Dale

	No longer attempt to use the game culture override in the editor

Change 3411443 on 2017/04/27 by Alex.Delesky

	#jira UE-43730, UE-43703 - Material Instances will now correctly use their preview meshes when being edited, or will use their parent's preview mesh if their preview mesh has not been set and the parent's is valid.

Change 3411809 on 2017/04/27 by Max.Chen

	Sequencer: Prioritize buttons over label.

	#jira UE-26813

Change 3411810 on 2017/04/27 by Cody.Albert

	Scrollbox now properly calls Invalidate while scrolling

Change 3411892 on 2017/04/27 by Alex.Delesky

	#jira UE-40031

	PR #3065: Ignore .vs folder when initializing git projects (Contributed by mattiascibien)


Change 3412002 on 2017/04/27 by Jamie.Dale

	Fixed crash when using an invalid regex pattern

	#jira UE-44340

Change 3412009 on 2017/04/27 by Cody.Albert

	Fixed Invalidation Panel to apply scale only to volatile elements, correcting an issue with Cache Relative Positions

Change 3412631 on 2017/04/27 by Jamie.Dale

	Implemented support for hiding empty folders in the Content Browser

	"Empty" in this case is defined as folders that recursively don't contain assets or classes. Folders that have been created by the user or have at any point contained content during the current editing session are always shown.

	This also fixes some places where the content filters would miss certain folders (usually due to missing checks when processing AssetRegistry events), and allows asset and path views to be synced to folder selections (as well as asset selections), which improves the experience when renaming folders, and navigating the Content Browser history.

	#jira UE-40038

Change 3413023 on 2017/04/27 by Max.Chen

	Sequencer: Fix filtering so that it includes parent nodes only and doesn't recurse through to add their children.

Change 3413309 on 2017/04/28 by Jamie.Dale

	Fixed shadow warning

Change 3413327 on 2017/04/28 by Jamie.Dale

	Added code to sanitize some known strings before passing them to ICU

Change 3413486 on 2017/04/28 by Matt.Kuhlenschmidt

	Allow AssetRenameData to be exposed to blueprints/script

Change 3413630 on 2017/04/28 by Jamie.Dale

	Moved FUnicodeBlockRange into Slate so that it can be used for C++ defined fonts as well as those defined in the font editor

Change 3414164 on 2017/04/28 by Jamie.Dale

	Removing some type-unsafe placement new array additions

Change 3414497 on 2017/04/28 by Yannick.Lange

	ViewportInteraction: - Add arcball sphere asset.
	- Add opacity parameter to translucent gizmo material.

Change 3415021 on 2017/04/28 by Max.Chen

	Sequencer: Remove spacer nodes at the top and bottom of the node tree.

	This fixes the artifact of having spaces at the top and bottom which get selected when you click on the space and when you press Home and End to go to the top or bottom of the tree.

	#jira UE-28931

Change 3415786 on 2017/05/01 by Matt.Kuhlenschmidt

	#rn PR #3518: Allow PaintedVertices to be sized down (Contributed by jasoncalvert)

Change 3415836 on 2017/05/01 by Alex.Delesky

	#jira UE-39203 - You can now summon the reference viewer from the content browser using the keyboard shortcut.

Change 3415837 on 2017/05/01 by Alex.Delesky

	#jira UE-34947 - When the user attempts to download an IDE from within the editor (due to needing one to add a C++ class), the window that hosts the widget will now close if it's a modal window.

Change 3415839 on 2017/05/01 by Alex.Delesky

	#jira UE-42049

	PR #3266: Profiler: added Thread filter (Contributed by StefanoProsperi)


Change 3415842 on 2017/05/01 by Michael.Dupuis

	#jira UE-44514 : Removed the warning as it's causing more issue than it fixes.

Change 3416511 on 2017/05/01 by Matt.Kuhlenschmidt

	Make UHT generate WITH_EDITOR guards around UFunctions generated in a WITH_EDITOR C++ block.  This prevents these functions from being generated in non-editor builds

Change 3416520 on 2017/05/01 by Yannick.Lange

	Viewport Interaction: - Toggle ViewportWorldInteraction with command for desktop testing without having to use VREditor.
	- Add helper function to add a unique extension by subclass.

Change 3416956 on 2017/05/01 by Matt.Kuhlenschmidt

	Exposed EditorLevelUtils to script.  This allows creation of streaming levels, setting the current level and moving actors between levels

Change 3416964 on 2017/05/01 by Matt.Kuhlenschmidt

	Prevent foliage from marking actors dirty as HISM components are added and removed from the scene.

Change 3416988 on 2017/05/01 by Lauren.Ridge

	PR #3122: UE-40262: Color tabs according to asset type (Contributed by projectgheist)

	Changed the highlight style to be around the icon and match the content browser color and style.

	#jira UE-40437


Change 3418014 on 2017/05/02 by Yannick.Lange

	Viewport Interaction: Remove material members from base transform gizmo  and use asset container to get materials.

Change 3418087 on 2017/05/02 by Lauren.Ridge

	Adding minor tab icon surrounds

Change 3418602 on 2017/05/02 by Jamie.Dale

	Fixed a crash that could occur due to bad data in the asset registry

	It was possible for FAssetRegistry::PrioritizeSearchPath to re-order the BackgroundAssetResults in response to callback from FAssetRegistry::AssetSearchDataGathered, which caused integrity issues with the array, and would lead to results being missed, or an existing result being processed twice (which due to certain assumptions would result in it being deleted, and bad data being left in the asset registry).

	These results lists now use a custom type that prevents the mutation of items that have already been processed but not yet trimmed.

Change 3418702 on 2017/05/02 by Matt.Kuhlenschmidt

	Fix USD files that reference other USD files not finding the referenced files by relative path.  Requires USD third party changes only

Change 3419071 on 2017/05/02 by Arciel.Rekman

	UBT: optimize FixDeps step on Linux.

	- Removes the need to re-link unrelated engine libraries when recompiling a code project.
	- Makes builds faster on machines with multiple cores.
	- The module that has circularly referenced dependencies is considered cross-referenced itself.
	- Tested compilation on Linux (native & cross) and Mac (native).

Change 3419240 on 2017/05/02 by Cody.Albert

	Bound widgets in animation tracks can no longer be swapped with widgets from a different widget blueprint, which would lead to a crash

Change 3420011 on 2017/05/02 by Max.Chen

	Sequencer: Fix scrubber hit testing so that the time scrubber is really favored over the playback ranges.

	#jira UE-44569

Change 3420507 on 2017/05/03 by Lauren.Ridge

	Selecting a camera or other preview actor in VR Mode now creates a floating in-world viewport. Also deselect all Actors when moving into and out of VR Mode

Change 3420643 on 2017/05/03 by andrew.porter

	QAGame - Adding test content to QA-Sequencer for using spawnables with override bindings

Change 3420678 on 2017/05/03 by andrew.porter

	QAGame: Updating override binding sequence

Change 3420961 on 2017/05/03 by Jamie.Dale

	Exposed some missing Internationalization functions to BPs

Change 3422767 on 2017/05/04 by Yannick.Lange

	ViewportInteraction: Extensibility for dragging on gizmo handles
	Removed ETransformGizmoInteractionType completely and replaced it with UViewportDragOperation. Using the ETransformGizmoInteractionType enum made external extensibility impossible. Now every gizmo handle group has a component called UViewportDragOperationComponent which holds a  UViewportDragOperation of a certain type. This UViewportDragOperation can be inherited to create a custom method to calculate a new transform for the objects when dragging the gizmo handle.

Change 3422789 on 2017/05/04 by Yannick.Lange

	ViewportInteraction: Fix duplicate console variable.

Change 3422817 on 2017/05/04 by Andrew.Rodham

	Sequencer: Changed level sequence object references to always use a package and object path based lookup

	  - Newly created binding references now consist of a package name and an inner object path for actors, and just an inner object path for components. The package name is fixed up dynamically for PIE, which means it can work correctly for multiplayer PIE, and when levels are streamed in during PIE (functionality previously unavailable to lazy object ptrs)
	  - Added a way of rebinding all possessable objects in the current sequence (Rebind Possessable References)
	  - Level sequence binding references no longer use native serialization now that TMap serialization is fully supported.
	  - Multiple bindings are now supported in the API layer of level sequence references, although this is not yet exposed to the sequencer UI.

	#jira UE-44490

Change 3422826 on 2017/05/04 by Andrew.Rodham

	Removed erroneous braces

Change 3422874 on 2017/05/04 by James.Golding

	Adding MaterialEditingLibrary to allow manipulation of materials within the editor.
	- Refactored code out of MaterialEditor where possible
	Marked some material types as BP-accessible, to allow to editor-Blueprint access.
	Remove unused 'bSkipPrim' property from Set/CheckMaterialUsage

Change 3422942 on 2017/05/04 by Lauren.Ridge

	Tab padding adjustment to allow tabs with icons to be the same height as tabs without

Change 3423090 on 2017/05/04 by Jamie.Dale

	Added a way to get the source package path for a localized package path

	Added tests for the localized package path checks.

Change 3423133 on 2017/05/04 by Jamie.Dale

	Fixed a bug where a trailing quote without a newline at the end of a CSV file would be added to the parsed text rather than converted to a terminator

Change 3423301 on 2017/05/04 by Max.Chen

	Sequencer: Add JumpToPosition which updates to a position in a scrubbing state.

Change 3423344 on 2017/05/04 by Jamie.Dale

	Updated localized asset group caching so that it works in non-cooked builds

Change 3423486 on 2017/05/04 by Lauren.Ridge

	Fixing deselection code in VWI

Change 3423502 on 2017/05/04 by Jamie.Dale

	Adding automated localization tests

Change 3424219 on 2017/05/04 by Yannick.Lange

	- Hide FWidget when ViewportWorldInteraction starts.

	- Added option to EditorViewportClient to not render FWidget without using FWidget::SetDefaultVisibility.

Change 3425116 on 2017/05/05 by Matt.Kuhlenschmidt

	PR #3527: Modified comments (Contributed by projectgheist)



Change 3425239 on 2017/05/05 by Matt.Kuhlenschmidt

	Fix shutdown crash in projects that unregister asset tools in UObjects being destroyed at shutdown.

Change 3425241 on 2017/05/05 by Max.Chen

	Sequencer: Components aren't deselected from the sequencer tree view when they get deselected in the viewport/outliner.

	#jira UE-44559

Change 3425286 on 2017/05/05 by Jamie.Dale

	Text duplicated as part of a widget archetype now maintains its existing key

	#jira UE-44715

Change 3425477 on 2017/05/05 by Andrew.Rodham

	Sequencer: Do not deprecate legacy object references since they still need to be serialized on save
	  - Also re-add identical via equality operator so that serialization works again

Change 3425681 on 2017/05/05 by Jamie.Dale

	Fixed fallback font height/baseline measuring

Change 3426137 on 2017/05/05 by Jamie.Dale

	Removing PPF_Localized

	It's an old UE3-ism that's no longer tested anywhere

Change 3427434 on 2017/05/07 by Yannick.Lange

	ViewportInteraction: Null check for viewport.

Change 3427905 on 2017/05/08 by Matt.Kuhlenschmidt

	Removed the concept of a global selection annotation.  This poses a major problem when more than one selection set is clearing it.  If more than one selection set is in a transaction the last one to be serialized will clear and rebuild the annotation thus causing out of sync issues with component and actor selection sets.  This change introduces the concept of a per-selection set annotation to avoid being out of sync.  Actor and ActorComponent now override IsSelected (editor only) to make use of these selections.

	#jira UE-44655

Change 3428738 on 2017/05/08 by Matt.Kuhlenschmidt

	Fix other usage of USelection not having a selection annotation

	#jira UE-44786

Change 3429562 on 2017/05/08 by Matt.Kuhlenschmidt

	Fix crash on platforms without a cursor

	#jira UE-44815

Change 3429862 on 2017/05/08 by tim.gautier

	QAGame: Enable Include CrashReporter in Project Settings

Change 3430385 on 2017/05/09 by Lauren.Ridge

	Resetting user focus to game viewport after movie finishes playback

	#jira UE-44785

Change 3430695 on 2017/05/09 by Lauren.Ridge

	Fix for crash on leaving in the middle of a loading movie

	#jira UE-44834

Change 3431234 on 2017/05/09 by Matt.Kuhlenschmidt

	Fixed movie player setting all users to focus which breaks VR controllers

[CL 3432852 by Matt Kuhlenschmidt in Main branch]
2017-05-10 11:49:32 -04:00

531 lines
19 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "IntroTutorials.h"
#include "Templates/SubclassOf.h"
#include "Curves/CurveFloat.h"
#include "Misc/CommandLine.h"
#include "Framework/Application/SlateApplication.h"
#include "Framework/MultiBox/MultiBoxBuilder.h"
#include "Framework/Docking/TabManager.h"
#include "EditorStyleSet.h"
#include "Engine/Blueprint.h"
#include "PropertyEditorModule.h"
#include "Interfaces/IMainFrameModule.h"
#include "LevelEditor.h"
#include "BlueprintEditorModule.h"
#include "Editor/GameProjectGeneration/Public/GameProjectGenerationModule.h"
#include "SourceCodeNavigation.h"
#include "EditorTutorial.h"
#include "EditorTutorialSettings.h"
#include "TutorialStateSettings.h"
#include "TutorialSettings.h"
#include "ISettingsModule.h"
#include "STutorialsBrowser.h"
#include "TutorialStructCustomization.h"
#include "EditorTutorialDetailsCustomization.h"
#include "STutorialRoot.h"
#include "STutorialLoading.h"
#include "STutorialButton.h"
#include "Toolkits/ToolkitManager.h"
#include "BlueprintEditor.h"
#include "Misc/EngineBuildSettings.h"
#include "Widgets/SToolTip.h"
#include "IDocumentation.h"
#include "Widgets/Docking/SDockTab.h"
#include "IAssetTools.h"
#include "AssetToolsModule.h"
#include "IClassTypeActions.h"
#include "ClassTypeActions_EditorTutorial.h"
#define LOCTEXT_NAMESPACE "IntroTutorials"
IMPLEMENT_MODULE(FIntroTutorials, IntroTutorials)
FIntroTutorials::FIntroTutorials()
: CurrentObjectClass(nullptr)
, ContentIntroCurve(nullptr)
{
bDisableTutorials = false;
bDesireResettingTutorialSeenFlagOnLoad = FParse::Param(FCommandLine::Get(), TEXT("ResetTutorials"));
}
FString FIntroTutorials::AnalyticsEventNameFromTutorial(UEditorTutorial* Tutorial)
{
FString TutorialPath = Tutorial->GetOutermost()->GetFName().ToString();
// strip off everything but the asset name
FString RightStr;
TutorialPath.Split( TEXT("/"), NULL, &RightStr, ESearchCase::IgnoreCase, ESearchDir::FromEnd );
return RightStr;
}
TSharedRef<FExtender> FIntroTutorials::AddSummonBlueprintTutorialsMenuExtender(const TSharedRef<FUICommandList> CommandList, const TArray<UObject*> EditingObjects) const
{
UObject* PrimaryObject = nullptr;
if(EditingObjects.Num() > 0)
{
PrimaryObject = EditingObjects[0];
}
TSharedRef<FExtender> Extender(new FExtender());
Extender->AddMenuExtension(
"HelpBrowse",
EExtensionHook::After,
CommandList,
FMenuExtensionDelegate::CreateRaw(this, &FIntroTutorials::AddSummonBlueprintTutorialsMenuExtension, PrimaryObject));
return Extender;
}
void FIntroTutorials::StartupModule()
{
// This code can run with content commandlets. Slate is not initialized with commandlets and the below code will fail.
if (!bDisableTutorials && !IsRunningCommandlet())
{
// Add tutorial for main frame opening
IMainFrameModule& MainFrameModule = FModuleManager::LoadModuleChecked<IMainFrameModule>(TEXT("MainFrame"));
MainFrameModule.OnMainFrameCreationFinished().AddRaw(this, &FIntroTutorials::MainFrameLoad);
MainFrameModule.OnMainFrameSDKNotInstalled().AddRaw(this, &FIntroTutorials::HandleSDKNotInstalled);
// Add menu option for level editor tutorial
MainMenuExtender = MakeShareable(new FExtender);
MainMenuExtender->AddMenuExtension("HelpBrowse", EExtensionHook::After, NULL, FMenuExtensionDelegate::CreateRaw(this, &FIntroTutorials::AddSummonTutorialsMenuExtension));
FLevelEditorModule& LevelEditorModule = FModuleManager::LoadModuleChecked<FLevelEditorModule>( "LevelEditor" );
LevelEditorModule.GetMenuExtensibilityManager()->AddExtender(MainMenuExtender);
// Add menu option to blueprint editor as well
FBlueprintEditorModule& BPEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>( "Kismet" );
BPEditorModule.GetMenuExtensibilityManager()->GetExtenderDelegates().Add(FAssetEditorExtender::CreateRaw(this, &FIntroTutorials::AddSummonBlueprintTutorialsMenuExtender));
// Add hook for when AddToCodeProject dialog window is opened
FGameProjectGenerationModule::Get().OnAddCodeToProjectDialogOpened().AddRaw(this, &FIntroTutorials::OnAddCodeToProjectDialogOpened);
// Add hook for New Project dialog window is opened
//FGameProjectGenerationModule::Get().OnNewProjectProjectDialogOpened().AddRaw(this, &FIntroTutorials::OnNewProjectDialogOpened);
FSourceCodeNavigation::AccessOnCompilerNotFound().AddRaw( this, &FIntroTutorials::HandleCompilerNotFound );
// maybe reset all the "have I seen this once" flags
if (bDesireResettingTutorialSeenFlagOnLoad)
{
GetMutableDefault<UTutorialStateSettings>()->ClearProgress();
}
// register our class actions to show the "Play" button on editor tutorial Blueprint assets
{
IAssetTools& AssetTools = FModuleManager::LoadModuleChecked<FAssetToolsModule>("AssetTools").Get();
TSharedRef<IClassTypeActions> EditorTutorialClassActions = MakeShareable(new FClassTypeActions_EditorTutorial());
RegisteredClassTypeActions.Add(EditorTutorialClassActions);
AssetTools.RegisterClassTypeActions(EditorTutorialClassActions);
}
}
// Register to display our settings
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
SettingsModule->RegisterSettings("Editor", "General", "Tutorials",
LOCTEXT("EditorTutorialSettingsName", "Tutorials"),
LOCTEXT("EditorTutorialSettingsDescription", "Control what tutorials are available in the Editor."),
GetMutableDefault<UEditorTutorialSettings>()
);
SettingsModule->RegisterSettings("Project", "Engine", "Tutorials",
LOCTEXT("TutorialSettingsName", "Tutorials"),
LOCTEXT("TutorialSettingsDescription", "Control what tutorials are available in this project."),
GetMutableDefault<UTutorialSettings>()
);
}
// register details customizations
FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyEditorModule.RegisterCustomPropertyTypeLayout("TutorialContent", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FTutorialContentCustomization::MakeInstance));
PropertyEditorModule.RegisterCustomPropertyTypeLayout("TutorialContentAnchor", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FTutorialContentAnchorCustomization::MakeInstance));
PropertyEditorModule.RegisterCustomClassLayout("EditorTutorial", FOnGetDetailCustomizationInstance::CreateStatic(&FEditorTutorialDetailsCustomization::MakeInstance));
UCurveFloat* ContentIntroCurveAsset = LoadObject<UCurveFloat>(nullptr, TEXT("/Engine/Tutorial/ContentIntroCurve.ContentIntroCurve"));
if(ContentIntroCurveAsset)
{
ContentIntroCurveAsset->AddToRoot();
ContentIntroCurve = ContentIntroCurveAsset;
}
FGlobalTabmanager::Get()->RegisterNomadTabSpawner(TEXT("TutorialsBrowser"), FOnSpawnTab::CreateRaw(this, &FIntroTutorials::SpawnTutorialsBrowserTab))
.SetMenuType(ETabSpawnerMenuType::Hidden);
}
void FIntroTutorials::ShutdownModule()
{
if (!bDisableTutorials && !IsRunningCommandlet())
{
FSourceCodeNavigation::AccessOnCompilerNotFound().RemoveAll( this );
FAssetToolsModule* AssetToolsModule = FModuleManager::GetModulePtr<FAssetToolsModule>("AssetTools");
if (AssetToolsModule)
{
IAssetTools& AssetTools = AssetToolsModule->Get();
for(const auto& RegisteredClassTypeAction : RegisteredClassTypeActions)
{
AssetTools.UnregisterClassTypeActions(RegisteredClassTypeAction);
}
}
}
if (BlueprintEditorExtender.IsValid() && FModuleManager::Get().IsModuleLoaded("Kismet"))
{
FBlueprintEditorModule& BPEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>("Kismet");
BPEditorModule.GetMenuExtensibilityManager()->RemoveExtender(BlueprintEditorExtender);
}
if (MainMenuExtender.IsValid() && FModuleManager::Get().IsModuleLoaded("LevelEditor"))
{
FLevelEditorModule& LevelEditorModule = FModuleManager::LoadModuleChecked<FLevelEditorModule>( "LevelEditor" );
LevelEditorModule.GetMenuExtensibilityManager()->RemoveExtender(MainMenuExtender);
}
if (FModuleManager::Get().IsModuleLoaded("MainFrame"))
{
IMainFrameModule& MainFrameModule = FModuleManager::LoadModuleChecked<IMainFrameModule>(TEXT("MainFrame"));
MainFrameModule.OnMainFrameCreationFinished().RemoveAll(this);
}
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
SettingsModule->UnregisterSettings("Editor", "General", "Tutorials");
SettingsModule->UnregisterSettings("Project", "Engine", "Tutorials");
}
if(FModuleManager::Get().IsModuleLoaded("PropertyEditor"))
{
FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyEditorModule.UnregisterCustomPropertyTypeLayout("TutorialContent");
PropertyEditorModule.UnregisterCustomPropertyTypeLayout("TutorialWidgetReference");
PropertyEditorModule.UnregisterCustomClassLayout("EditorTutorial");
}
if(ContentIntroCurve.IsValid())
{
ContentIntroCurve.Get()->RemoveFromRoot();
ContentIntroCurve = nullptr;
}
FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(TEXT("TutorialsBrowser"));
}
void FIntroTutorials::AddSummonTutorialsMenuExtension(FMenuBuilder& MenuBuilder)
{
MenuBuilder.BeginSection("Tutorials", LOCTEXT("TutorialsLabel", "Tutorials"));
MenuBuilder.AddMenuEntry(
LOCTEXT("TutorialsMenuEntryTitle", "Tutorials"),
LOCTEXT("TutorialsMenuEntryToolTip", "Opens up introductory tutorials covering the basics of using the Unreal Engine 4 Editor."),
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tutorials"),
FUIAction(FExecuteAction::CreateRaw(this, &FIntroTutorials::SummonTutorialHome)));
MenuBuilder.EndSection();
}
void FIntroTutorials::AddSummonBlueprintTutorialsMenuExtension(FMenuBuilder& MenuBuilder, UObject* PrimaryObject)
{
MenuBuilder.BeginSection("Tutorials", LOCTEXT("TutorialsLabel", "Tutorials"));
MenuBuilder.AddMenuEntry(
LOCTEXT("BlueprintMenuEntryTitle", "Blueprint Overview"),
LOCTEXT("BlueprintMenuEntryToolTip", "Opens up an introductory overview of Blueprints."),
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tutorials"),
FUIAction(FExecuteAction::CreateRaw(this, &FIntroTutorials::SummonBlueprintTutorialHome, PrimaryObject, true)));
if(PrimaryObject != nullptr)
{
UBlueprint* BP = Cast<UBlueprint>(PrimaryObject);
if(BP != nullptr)
{
UEnum* Enum = FindObject<UEnum>(ANY_PACKAGE, TEXT("EBlueprintType"), true);
check(Enum);
MenuBuilder.AddMenuEntry(
FText::Format(LOCTEXT("BlueprintTutorialsMenuEntryTitle", "{0} Tutorial"), Enum->GetDisplayNameTextByValue(BP->BlueprintType)),
LOCTEXT("BlueprintTutorialsMenuEntryToolTip", "Opens up an introductory tutorial covering this particular part of the Blueprint editor."),
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tutorials"),
FUIAction(FExecuteAction::CreateRaw(this, &FIntroTutorials::SummonBlueprintTutorialHome, PrimaryObject, false)));
}
}
MenuBuilder.EndSection();
}
void FIntroTutorials::MainFrameLoad(TSharedPtr<SWindow> InRootWindow, bool bIsNewProjectWindow)
{
if (!bIsNewProjectWindow)
{
// install a root widget for the tutorial overlays to hang off
if(InRootWindow.IsValid() && !TutorialRoot.IsValid())
{
InRootWindow->AddOverlaySlot()
[
SAssignNew(TutorialRoot, STutorialRoot)
];
}
// See if we should show 'welcome' screen
MaybeOpenWelcomeTutorial();
}
}
void FIntroTutorials::SummonTutorialHome()
{
SummonTutorialBrowser();
}
void FIntroTutorials::SummonBlueprintTutorialHome(UObject* Asset, bool bForceWelcome)
{
UBlueprint* BP = CastChecked<UBlueprint>(Asset);
FName Context("BlueprintOverview");
if(!bForceWelcome)
{
Context = FBlueprintEditor::GetContextFromBlueprintType(BP->BlueprintType);
}
UEditorTutorial* AttractTutorial = nullptr;
UEditorTutorial* LaunchTutorial = nullptr;
FString BrowserFilter;
GetDefault<UEditorTutorialSettings>()->FindTutorialInfoForContext(Context, AttractTutorial, LaunchTutorial, BrowserFilter);
FIntroTutorials& IntroTutorials = FModuleManager::GetModuleChecked<FIntroTutorials>(TEXT("IntroTutorials"));
if (LaunchTutorial != nullptr)
{
TSharedPtr<SWindow> ContextWindow;
TSharedPtr< IToolkit > Toolkit = FToolkitManager::Get().FindEditorForAsset(Asset);
if(ensure(Toolkit.IsValid()))
{
ContextWindow = FSlateApplication::Get().FindWidgetWindow(Toolkit->GetToolkitHost()->GetParentWidget());
check(ContextWindow.IsValid());
}
IntroTutorials.LaunchTutorial(LaunchTutorial, IIntroTutorials::ETutorialStartType::TST_RESTART, ContextWindow);
}
}
bool FIntroTutorials::MaybeOpenWelcomeTutorial()
{
if(FParse::Param(FCommandLine::Get(), TEXT("TestTutorialAlerts")) || !FEngineBuildSettings::IsInternalBuild())
{
// try editor startup tutorial
TSubclassOf<UEditorTutorial> EditorStartupTutorialClass = LoadClass<UEditorTutorial>(NULL, *GetDefault<UEditorTutorialSettings>()->StartupTutorial.ToString(), NULL, LOAD_None, NULL);
if(EditorStartupTutorialClass != nullptr)
{
UEditorTutorial* Tutorial = EditorStartupTutorialClass->GetDefaultObject<UEditorTutorial>();
if (!GetDefault<UTutorialStateSettings>()->HaveSeenTutorial(Tutorial))
{
LaunchTutorial(Tutorial);
return true;
}
}
// Try project startup tutorial
const FString ProjectStartupTutorialPathStr = GetDefault<UTutorialSettings>()->StartupTutorial.ToString();
if (!ProjectStartupTutorialPathStr.IsEmpty())
{
TSubclassOf<UEditorTutorial> ProjectStartupTutorialClass = LoadClass<UEditorTutorial>(NULL, *ProjectStartupTutorialPathStr, NULL, LOAD_None, NULL);
if (ProjectStartupTutorialClass != nullptr)
{
UEditorTutorial* Tutorial = ProjectStartupTutorialClass->GetDefaultObject<UEditorTutorial>();
if (!GetDefault<UTutorialStateSettings>()->HaveSeenTutorial(Tutorial))
{
LaunchTutorial(Tutorial);
return true;
}
}
}
}
return false;
}
void FIntroTutorials::OnAddCodeToProjectDialogOpened()
{
// @todo: add code to project dialog tutorial here?
// MaybeOpenWelcomeTutorial(AddCodeToProjectWelcomeTutorial);
}
void FIntroTutorials::OnNewProjectDialogOpened()
{
// @todo: new project dialog tutorial here?
// MaybeOpenWelcomeTutorial(TemplateOverview);
}
void FIntroTutorials::HandleCompilerNotFound()
{
#if PLATFORM_WINDOWS
LaunchTutorialByName( TEXT( "Engine/Tutorial/Installation/InstallingVisualStudioTutorial.InstallingVisualStudioTutorial" ) );
#elif PLATFORM_MAC
LaunchTutorialByName( TEXT( "Engine/Tutorial/Installation/InstallingXCodeTutorial.InstallingXCodeTutorial" ) );
#else
STUBBED("FIntroTutorials::HandleCompilerNotFound");
#endif
}
void FIntroTutorials::HandleSDKNotInstalled(const FString& PlatformName, const FString& InTutorialAsset)
{
UBlueprint* Blueprint = LoadObject<UBlueprint>(nullptr, *InTutorialAsset);
if(Blueprint)
{
LaunchTutorialByName( InTutorialAsset );
}
else
{
IDocumentation::Get()->Open( InTutorialAsset );
}
}
EVisibility FIntroTutorials::GetHomeButtonVisibility() const
{
if(CurrentObjectClass != nullptr)
{
return CurrentObjectClass->IsChildOf(UBlueprint::StaticClass()) ? EVisibility::Hidden : EVisibility::Visible;
}
return EVisibility::Visible;
}
FOnIsPicking& FIntroTutorials::OnIsPicking()
{
return OnIsPickingDelegate;
}
FOnValidatePickingCandidate& FIntroTutorials::OnValidatePickingCandidate()
{
return OnValidatePickingCandidateDelegate;
}
void FIntroTutorials::SummonTutorialBrowser()
{
if(TutorialRoot.IsValid())
{
FLevelEditorModule& LevelEditorModule = FModuleManager::GetModuleChecked<FLevelEditorModule>( TEXT("LevelEditor") );
TutorialBrowserDockTab = LevelEditorModule.GetLevelEditorTabManager()->InvokeTab(FTabId("TutorialsBrowser"));
}
}
void FIntroTutorials::DismissTutorialBrowser()
{
if (TutorialBrowserDockTab.IsValid() && TutorialBrowserDockTab.Pin().IsValid())
{
TutorialBrowserDockTab.Pin()->RequestCloseTab();
TutorialBrowserDockTab = nullptr;
}
}
void FIntroTutorials::AttachWidget(TSharedPtr<SWidget> Widget)
{
if (TutorialRoot.IsValid())
{
TutorialRoot->AttachWidget(Widget);
}
}
void FIntroTutorials::DetachWidget()
{
if (TutorialRoot.IsValid())
{
TutorialRoot->DetachWidget();
}
}
void FIntroTutorials::LaunchTutorial(const FString& TutorialAssetName)
{
LaunchTutorialByName(TutorialAssetName);
}
void FIntroTutorials::LaunchTutorialByName(const FString& InAssetPath, bool bInRestart, TWeakPtr<SWindow> InNavigationWindow, FSimpleDelegate OnTutorialClosed, FSimpleDelegate OnTutorialExited)
{
UBlueprint* Blueprint = LoadObject<UBlueprint>(nullptr, *InAssetPath);
if (Blueprint && Blueprint->GeneratedClass)
{
LaunchTutorial(Blueprint->GeneratedClass->GetDefaultObject<UEditorTutorial>(), bInRestart ? IIntroTutorials::ETutorialStartType::TST_RESTART : IIntroTutorials::ETutorialStartType::TST_CONTINUE, InNavigationWindow, OnTutorialClosed, OnTutorialExited);
}
}
void FIntroTutorials::LaunchTutorial(UEditorTutorial* InTutorial, ETutorialStartType InStartType, TWeakPtr<SWindow> InNavigationWindow, FSimpleDelegate OnTutorialClosed, FSimpleDelegate OnTutorialExited)
{
if(TutorialRoot.IsValid())
{
if(!InNavigationWindow.IsValid())
{
IMainFrameModule& MainFrameModule = FModuleManager::LoadModuleChecked<IMainFrameModule>(TEXT("MainFrame"));
InNavigationWindow = MainFrameModule.GetParentWindow();
}
TutorialRoot->LaunchTutorial(InTutorial, InStartType, InNavigationWindow, OnTutorialClosed, OnTutorialExited);
}
}
void FIntroTutorials::CloseAllTutorialContent()
{
if (TutorialRoot.IsValid())
{
TutorialRoot->CloseAllTutorialContent();
}
}
void FIntroTutorials::GoToPreviousStage()
{
if (TutorialRoot.IsValid())
{
TutorialRoot->GoToPreviousStage();
}
}
void FIntroTutorials::GoToNextStage(TWeakPtr<SWindow> InNavigationWindow)
{
if (TutorialRoot.IsValid())
{
TutorialRoot->GoToNextStage(InNavigationWindow);
}
}
TSharedRef<SWidget> FIntroTutorials::CreateTutorialsWidget(FName InContext, TWeakPtr<SWindow> InContextWindow) const
{
return SNew(STutorialButton)
.Context(InContext)
.ContextWindow(InContextWindow);
}
TSharedPtr<SWidget> FIntroTutorials::CreateTutorialsLoadingWidget(TWeakPtr<SWindow> InContextWindow) const
{
return SNew(STutorialLoading)
.ContextWindow(InContextWindow);
}
float FIntroTutorials::GetIntroCurveValue(float InTime)
{
if(ContentIntroCurve.IsValid())
{
return ContentIntroCurve.Get()->GetFloatValue(InTime);
}
return 1.0f;
}
TSharedRef<SDockTab> FIntroTutorials::SpawnTutorialsBrowserTab(const FSpawnTabArgs& SpawnTabArgs)
{
TAttribute<FText> Label = LOCTEXT("TutorialsBrowserTabLabel", "Tutorials");
TSharedRef<SDockTab> NewTab = SNew(SDockTab)
.TabRole(ETabRole::NomadTab)
.Label(Label)
.ToolTip(IDocumentation::Get()->CreateToolTip(Label, nullptr, "Shared/TutorialsBrowser", "Tab"));
TSharedRef<STutorialsBrowser> TutorialsBrowser = SNew(STutorialsBrowser)
.OnLaunchTutorial(FOnLaunchTutorial::CreateRaw(this, &FIntroTutorials::LaunchTutorial));
NewTab->SetContent(TutorialsBrowser);
return NewTab;
}
#undef LOCTEXT_NAMESPACE