- This merge contains various changes to ViewportInteraction and VR Editor to make things more extensible
- Some changes are from Yannick's recent shelved refactoring work, that I've modified and improved upon
- EditorWorldManager is gone and replaced by EditorWorldExtensionManager
- EditorWorldExtensions are sort of like a more modern version of 'FEdMode', but still a work in progress
- Cleaned up access to VREditorMode from other modules, forcing systems to go through EditorWorldExtensions
- Overhauled how transforming objects works with world interaction
- Viewport interactors can now be used to move objects other than actors around (by implementing an UViewportTransformer, and a FViewportTransformable)
- Undo/Redo now works better with inertial transformation! The transaction only ends when objects finally come to rest.
- Some initial support for 'grabber sphere' interactor methods has been implemented (not used yet)
- Viewport interaction input events now receive the viewport being interacted through
- Viewport interaction hover events no longer get a viewport client (because they must be designed to work any number of viewports.)
NOTE: This introduces UBT warnings about cyclic module dependencies. We'll have to address this in a different changelist.
Other changes:
- The active Viewport Interaction 'gizmo mode' is now tied directly to the editor's normal gizmo mode. They share the same state.
- New console variable 'VI.UseTransientActors' can be turned off to force editor actors to be created non-transient to make it easier to debug
- New console variable 'VI.DragTranslationVelocityStopEpsilon' sets the speed at which transformables will stop have inertia applied to them
- Fixed cyclic dependencies with ViewportInteraction and VREditor modules not being tagged properly for UBT
- Fixed some issues with transform gizmos not getting release events
- Various methods that should have been const were made const
- Eliminated duplicate implementation of SpawnTransientSceneActor and DestroyTransientActor; made it static
- UnrealEd no longer directly depends on VREditor and ViewportInteraction modules
- Engine: AActor::SetIsTemporarilyHiddenInEditor no longer does any work if the object's hidden state didn't change
- Slate: Input preprocessor (if bound) now also gets a chance at mouse button down and up events
#codereview yannick.lange,lauren.ridge
#rb various
[CL 3245240 by Mike Fricker in Dev-VREditor branch]
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
- Added a new 'mouse cursor' interactor that can be enabled (when not in VR)
- We now automatically create a "mouse cursor" interactor when running in 'forced VR mode', so you can click on objects and gizmos!
- Currently it only supports 'SelectAndMove' (LMB), 'SelectAndMove_LightlyPressed' (MMB) and 'WorldMovement' (RMB)
- Interacting with UI using the mouse cursor is not supported yet.
Other fixes:
- ViewportInteraction: Fixed assertions when an interactor had no 'pair' and certain actions were triggered
- ViewportInteractor: Now creates a default transform for the interactor if no overridden implementation was provided
- VREditorInteractor: Fixed bad memory references to expired stack addresses
- VREditor: Fixed mouse buttons events not being routed through to HandleInputKey() (preprocessor did not support those.)
- VREditor: External modules can now activate VR Editor in 'forced VR mode', using new optional parameter to EnableVREditor()
- VREditor: Tutorial no longer shows up in 'forced VR mode'. You can't click on UI anyway, and it was just in the way
#rb yannick.lange
[CL 3026577 by Mike Fricker in Dev-VREditor branch]