Using AddSP to bind onto a multicast delegate that's removed in a class's destructor is dangerous because the weak pointer used to compare against the 'this' pointer passed to .RemoveAll() will be invalid by the time it is compared. This causes "HasSameObject" to fail as the object cannot be pinned. I've have changed these to be raw bindings so that the ownership is explicit and thus force the call to RemoveAll to succeed correctly without leaving behind a null delegate instance. Previously, with a null delegate instance still in the list when the module is reloaded, that memory becomes invalid causing a crash when the event attempts to purge invalid delegate instances from its invocation list.
Also fixed one place where OnTakeHighResScreenShots was being bound but never removed (this looked like a copy paste error)
This addresses TTP#337596 - CRASH: EDITOR: Reload after Recompile causes crash
#codereview Max.Preussner
[CL 2108007 by Andrew Rodham in Main branch]
#ttp 336555 - CRASH: Minimizing/maximizing two viewports at the same time crashes the editor
#branch UE4
#proj Editor.LevelEditor
#add Added a FCanExecuteAction to ToggleMaximize, and hid the toggle maximize icon during a transition, so it's no longer possible to set off a new maximize animation while one is already occurring.
#reviewedby Chris.Wood
[CL 2106630 by Richard TalbotWatkin in Main branch]
World Browser: LOD maps generator now correctly handles maps under SC
ProxyMesh utilitiy now produces assets in a separate packages or in one single package
ProxyMesh and MergeActors utilities now use more consistent names for a produced assets (demolet naming conventions)
[CL 2104291 by Dmitriy Dyomin in Main branch]
#ttp 337318 EDITOR: CRASH: Changing viewport layout to one pane and entering immersive mode causes a crash
reviewer Thomas.Sarkanen
[CL 2096929 by Andrew Copland in Main branch]
TTP# 337136 - SETTINGS: Target Platform settings polish
TTP# 337652 - EDITOR: Limit Project supported Android icons down to 1
TTP# 337650 - EDITOR: There is only 1 icon for Apple for Project Supported Platforms
DesktopPlatform now contains a static array of FPlatformInfo. This can be used to query UE4 about its available platforms, even when they're not available as a target platform.
FPlatformInfo contains the information required by the editor (such as a localized display name and icon), as well as whether a platform is a variation ("flavor") of another, and if so, whether the flavor affects the build output (eg, Win32 or Win64), or the cook output (eg, Android_XYZ). This lets the editor build up nested menus for the "Package Project" and "Cook Project" options, rather than just showing everything as a flat list.
ReviewedBy Thomas.Sarkanen, Max.Preussner
[CL 2095796 by Jamie Dale in Main branch]
- FeatureLevelPreview menu option now instructs world to switch feature level. This triggers our WIP switching code which works a bit...
- Converted a few more GRHIFeatureLevel references over to point at the nearest convenient scene/sceneview
- Made GetRHIFeatureLevel a non-inlined function (breakpoints wouldn't stop on the inlined version) and #define'd GRHIFeatureLevel to point at the GMaxRHIFeatureLevel (i.e. back to old behaviour)
- Changes to FSystemTextures so that the global object gets initialized in a stack-y kind of way. You initialize at a feature level and it creates all textures needed up to that point. Subsequent initializes at a higher feature level will allocate the new ones needed but not the existing ones. Only behaviour change from this is that there was a single 1x1 texture created only for ES2 that I just let get created for every feature level to keep the "feature level stack" nature of things.
[CL 2089519 by Graeme Thornton in Main branch]
#TTP 331416 - UE4: Would like to be able to set a hotkey to open the Reference viewer similar to "find in content browser"
#branch UE4
#proj Editor.UnrealEd
#proj Editor.LevelEditor
#add Added new global UICommand ViewReferences, bound to Alt + Shift + R.
#add Implemented the new UICommand in the AssetEditorToolkit and the LevelEditorr. This means that most of the editor is covered by this hotkey. Hitting it in an asset editor brings it up for the current asset, hitting it in the level editor brings it up for the selected asset.
#Further work: Further work is required to modify the content browsers uses of view references, for now it is deemed to be too much work for this task.
#reviewedby Chris.Wood
[CL 2088247 by Barnabas McManners in Main branch]
TTP# 332489 - TOOLS FEATURE: Editor: Allow user to designate which platforms a project is designed for; warn user when deploying to platforms that will result in a bad time
There is now a "Target Platforms" tab in the project settings which allows you to choose which platforms your project will target. This information is stored inside the .uproject file.
If you try and launch, cook, or package for a project that isn't on the supported list, then you'll see a suppressible warning notifying you that the project may not run as expected. This is also conveyed to you via a warning icon next to platforms which aren't set as a target.
Additionally the target platform icons are shown in the tooltip on the "Open Project" dialog, as well as in the tab area of the level editor.
ReviewedBy Thomas.Sarkanen, Max.Preussner
[CL 2088161 by Jamie Dale in Main branch]
#ttp 334902 - EDITOR: Level Browser: Allowed to add bsp geometry brushes to locked levels
#branch UE4
#proj Editor.LevelEditor, Editor.UnrealEd
#add Added checks for whether the current level is locked in SLevelViewport::OnDrop (creating a Slate notification if so, instead of placing the object). Doing this here also eliminates the multiple identical notifications which otherwise occur when dragging Actors into a locked level.
#add Had to make a special case of FBrushBuilderDragDropOp::OnDrop which is responsible for adding a dragged brush. The notification will already have occurred from the change above. This just inhibits the actual creation of the brush.
#reviewedby Chris.Wood
[CL 2079297 by Richard TalbotWatkin in Main branch]
I also added code to retain backwards compatibility. Existing settings from EditorUserSettings.ini will be migrated to EditorLayout.ini
#CodeReview: nick.atamas, matt.kuhlenschmidt
[CL 2074798 by Max Preussner in Main branch]
#ttp 335187 - CRITICAL: EDITOR: CRASH: Recompiling level editor
#branch UE4
#proj Editor.LevelEditor
#add Added calls in FLevelEditorModule::ShutdownModule to unregister the FEditorViewportCommands and FLevelViewportCommands so that they are re-registered correctly upon ModuleStart again.
#reviewedby Chris.Wood
[CL 2072984 by Richard TalbotWatkin in Main branch]