#ttp 342056: CRITICAL: Regression: UE4: EDITOR: Game code fails to recompile in edtior due to header changes
#codereview robert.manuszewski,ben.marsh
[CL 2239969 by Steve Robb in Main branch]
* For several preview components (cascade + a couple of animation previews), don't create a separate FXSystem for the preview world. Just use the one created internally by the world
* Several bug fixes and improvements to dynamic feature level switch
* Continued conversion of code that references to global feature level.
#codereview Nick.Penwarden
[CL 2229679 by Graeme Thornton in Main branch]
#ttp 323078 - Actor drag preview does not respect actor factory spawn position offset
#ttp 309631 - TOOLS FEATURE: Asset placement: Align placed assets with surface placed on
#ttp 335001 - UE4: EDITOR:"Paste here" works inconsistently
#ttp 334066 - EDITOR: PAPER2D: Dragging a mesh into an ortho viewport does not provide a preview
There is a lot of work here:
* I have moved and unified all the prop preview and drag alignment code that attempted to align objects to surfaces in the world to a new class, FActorPositioning. This fixes inconsistent behaviour between the drop previews, actual placement, and drag alignment.
* I have tidied up the methods by which surface alignment is performed in UActorFactory. There is now a virtual method for factories to define *how* an actor should be aligned to the surface. This allows us to specify different alignment routines for things like static meshes, decals and lights.
* Actor factories now create actors with an FTransform rather than specifying pointers to location and rotation vectors. This makes creation simpler and parameter passing less error prone. As far as I can see, the rotation was only used for surface snapping which is now handled by the factory anyway.
* Surface snapping can be controlled by the editor viewport toggle button, or via a keyboard command set in the editor preferences
* It is possible to override the default placement offset when aligning actors to surfaces. SnapOffsetExtent can be found in the editor viewport preferences.
* Finding a valid snap position no longer uses a hitproxy as this was prone to error and does not work correctly when dragging actors that render their own hit proxies.
* ClickLocation and ClickPlane are now more consistently set and managed. I have tried to remove excess assignment to these variables to clarify their use and purpose.
[CL 2223237 by Andrew Rodham in Main branch]
- Material editor preview nodes now work when the editor is in es2 mode
- Make editor primitives work in ES2 mode
- Fix slate font rendering in ES2 mode
- Remove ES2 shader de-gamma when in the editor
- Add a new linear sampler type for linear textures
- Various fixes for dynamic feature level switching
- When in an emulated feature level mode, display some text in the level editor viewport saying what feature level we're running
- Removed feature level parameter from USkeletalMesh::GetResourceForRendering. Not used for anything
- ParticleVertexFactoryPool is now creates feature level specific vertex factories.
[CL 2187558 by Graeme Thornton in Main branch]
There is now a consistent set of methods for module loading, unloading and lookup that all behave in the same expected way.
- renamed GetModuleInterface to GetModule and made it not assert
- removed GetModuleInterfaceRef
- namespace enums to enum classes, NULL to nullptr
- moved important public methods to the top, so they're easier to discover
- added missing & improved existing documentation
- cleaned up existing use cases
[CL 2109936 by Max Preussner in Main branch]
Breaking changes include:
* Rename of GEditorModeTools -> GLevelEditorModeTools to signify that it applies only to the level editor modes
* Addition of FEditorModeRegistry, responsible for managing and creating new editor modes. Modes are no longer registered with an instance of the mode, instead with a mode factory that is able to create a new mode of that type.
* Editor modes now operate on FEditorViewportClients rather than FLevelEditorViewportClients
* Added ability to specify an FEditorModeTools when creating an FEditorViewport
Moved component vizualiser manager handling outside of individual editor modes, and into FLevelEditorViewportClient. This should make it easier to transplant in future.
This work addresses TTP#334640 - EDITOR: Investigate making editor modes a per-'editor' concept
Reviewed by Michael Noland, Matt Kuhlenschmidt
[CL 2109245 by Andrew Rodham 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]
- 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 331829 - Mobile Preview in Editor
#proj Engine
#branch UE4
#summary First pass of changes to remove GRHIFeatureLevel, allowing for multiple scenes with different feature levels to exist. First step towards dynamic mobile preview in the editor.
#change Added GMaxRHIFeature level which contains the highest supported feature level on this machine
#change Added a cvar "r.FeatureLevelPreview" which, when set to 1, enables a feature level selection in the quick settings menu. Not wired up to anything at the minute
#change Added a feature level variable to FScene, which is currently initialized to whatever GRHIFeatureLevel is. Accessed with GetFeatureLevel()
#change Added a helper accessor GetFeatureLevel() to FSceneView which gets the feature level from the relevant scene. Purely to reduce the amount of typing needed to get to a feature level
#change Many changes across the renderer to try and read the current feature level from the view or scene. Not everything is done yet, but this is almost all of the "easy" stuff. As there is still just a global feature level in the engine, nothing should change.
[CL 2066905 by Graeme Thornton in Main branch]
#proj core
#branch UE4
#summary Rename Trunc, Round, Floor, Ceil to TruncToInt, RoundToInt, FloorToInt, CeilToInt. Added *ToFloat versions. Repeated for FGenericPlatformMath and all derived classes for all platforms wherever applicable. Corrected comment in Fractional and added Frac() which does HLSL-style fractional (x - floor(x)). Checked for compilation on all projects (with cooking levels wherever applicable). Didn't change Fractional to Frac, this will be done in second commit.
#codereview robert.manuszewski
[CL 2064306 by Mikolaj Sieluzycki in Main branch]