Files
UnrealEngineUWP/Engine/Source/Editor/ViewportInteraction/ViewportWorldInteraction.cpp

3825 lines
147 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
#include "ViewportWorldInteraction.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #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]
2016-11-23 15:48:37 -05:00
#include "Materials/MaterialInterface.h"
#include "Components/PrimitiveComponent.h"
#include "Components/StaticMeshComponent.h"
#include "Settings/LevelEditorViewportSettings.h"
#include "Editor/UnrealEdEngine.h"
#include "EngineGlobals.h"
#include "Engine/StaticMesh.h"
#include "Materials/MaterialInstanceDynamic.h"
#include "GameFramework/WorldSettings.h"
#include "Engine/Selection.h"
#include "DrawDebugHelpers.h"
#include "EditorModeManager.h"
#include "UnrealEdGlobals.h"
#include "MouseCursorInteractor.h"
#include "ViewportInteractableInterface.h"
#include "ViewportDragOperation.h"
#include "VIGizmoHandle.h"
#include "Gizmo/VIPivotTransformGizmo.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #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]
2016-11-23 15:48:37 -05:00
#include "IViewportInteractionModule.h"
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
#include "ViewportTransformer.h"
#include "ActorTransformer.h"
#include "SnappingUtils.h"
#include "ScopedTransaction.h"
#include "DrawDebugHelpers.h"
#include "LevelEditorActions.h"
#include "Framework/Application/SlateApplication.h"
//Sound
#include "Kismet/GameplayStatics.h"
#include "ViewportInteractionStyle.h"
#include "ViewportInteractionAssetContainer.h"
// For actor placement
#include "IHeadMountedDisplay.h"
#include "IXRTrackingSystem.h"
#include "EngineUtils.h"
#include "ActorViewportTransformable.h"
// Preprocessor input
#include "ViewportInteractionInputProcessor.h"
#include "Framework/Application/SlateApplication.h"
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4279600) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4073383 by Patrick.Boutot [AJA] Set base timecode for AJA TimecodeProvider Change 4075631 by Patrick.Boutot Change icon for TimecodeSynchronizer. Update TimecodeSynchronizer with the new AJA delayed open sources. Add TimecodeProvider to TimecodeSynchronizer. Can now sync with TimecodeProvider or a master. Make sure the source are ready before viewing them. Remove PreRoll command. Change 4077328 by JeanMichel.Dignard Fixed SoftObjectPtr/Paths becoming invalid when saving a new world since it's being moved from /Temp/Untitled to its own package. #jira UEENT-1423 Change 4077338 by Rex.Hill USD plugin updated to v8.4 with python support Change 4079063 by Rex.Hill USD sdk recompiled as vs2015 targeting older version of CRT, also dependency added for PythonScriptPlugin Change 4079911 by Rex.Hill USD pyd files recompiled Change 4080058 by Rex.Hill Fix usd plugin loading, added missing libtrace.dll Change 4080376 by Matt.Hoffman Improvements to Sequence Recorder's public API to expose more functionality for third parties. Change 4084984 by Matt.Hoffman Sequence Recorder can now set a global time dilation when recording starts, optionally ignoring the dilation when recording keys. This is useful for recording objects in your scene that move too fast to track with a camera but still ending up with the same length recording in the end. #jira UESP-670 Change 4086688 by Matt.Hoffman Exposes getting and setting keys from sequencer sections via the scripting layer. Examples for how to work with Python and key data can be found in /Plugins/MovieScene/SequencerScripting/Content/Python in the form of "sequencer_examples.py" and "sequencer_key_examples.py". Documentation on how to use these examples is included in the python file. #jira UESP-547 Change 4088904 by Max.Chen Sequence Recorder: Set actor tags as unique Change 4089176 by Max.Chen Sequence Recorder: Add option to record to the target level sequence playback range length. Change 4089180 by Max.Chen Sequence Recorder: Add protection agains null movie scene sections Change 4089205 by Max.Chen Sequence Recorder: Save recorded audio files if auto save is on. #jira UESP-660 Change 4089206 by Max.Chen Sequencer: When importing fbx, if a camera is created, force mapping to be by name matching only so that other nodes in the fbx file do not get mapped onto the newly created camera. #jira UE-59347 Change 4089214 by Max.Chen Sequence Recorder: Add support for looping/rolling takes #jira UESP-658 Change 4089280 by Max.Chen Sequence Recorder: Added support to specify properties from actor classes (camera rig rail - current position on rail) Change 4093824 by Andrew.Rodham Editor: Added option to class pickers to force use of class Display Names Change 4093826 by Andrew.Rodham Removed implicit gamma to linear conversion from EXR writer - This was only implemented for exr data that was supplied as 8 bits per channel (ie. uint8), but there is no way of communicating with the Image Writer API to tell it whether you want it to do that conversion. This code is too low level to be making assumptions about what color-space the data is in. - This ensures that R8G8B8A8 render targets exported as EXR are exported as-is without any modification #jira UESP-545 Change 4093830 by Andrew.Rodham Fixed shutdown crash when destroying a media player that was still playing Change 4093831 by Andrew.Rodham Fixed exception handling in png image wrapper Change 4093833 by Andrew.Rodham Slate: Fixed not being able to set a hyperlink on notifications with unbound attributes that had explicit values set Change 4093841 by Andrew.Rodham Added a utility struct for dealing with editor actor layers from within Blueprints Change 4093867 by Andrew.Rodham Sequencer: Added the ability to implement custom capture protocols for movie scene captures - Converted capture protocol settings and instances to be single UObjects. This unifies the two concepts, and allows for Blueprint implementations. - Removed capture protocol registry since it is no longer required. - Removed FCaptureProtocolID in favor of class discovery at runtime. - Added new module "ImageWriteQueue", responsible for asynchronously managing a queue of image file write operations. - Added new capture protocol for capturing final pixels to EXR (including burn-ins) - Added a new BP function, ExportToDisk, accessible on all UTexture properties for writing texture and render target data to image files - New global BP nodes for querying movie capture status: IsCaptureInProgress, FindCaptureProtocol - Removed Flush On Draw functionality from viewports and frame grabber since it is unnecessary. #jira UESP-545 Change 4094239 by Rex.Hill Export sequence to usd #jira UESP-563 Change 4094393 by Andrew.Rodham Renamed references of 'BufferName' to 'StreamName' for user defined capture protocols Change 4094622 by Patrick.Boutot Add MediaFrameworkUtilitites plugin. Add MediaBundle. An asset that create a MediaPlayer, MediaSource, MediaTexture and MaterialInstance. Add MediaBundleActor. Can auto play a MediaBundle when click & drag in the viewport. Add the Media category in placement mode. Add flag on the MediaPlayer that prevent it from closing when PIE is started or closed. Change 4094673 by Anousack.Kitisa Created widget to display metadata as list view of tags/values. #jira UEENT-1296 Change 4094795 by Simon.Therriault MediaFrameworkUtilities - Adding default media texture for default media bundle material - Changed default material to unlit Change 4094867 by Rex.Hill Usd sequence exporter camera rotation corrected Change 4096426 by JeanLuc.Corenthin - Fixed logic of FLayoutUV::FindCharts to properly extract the list of triangles based on a mesh description. - Fixed logic in FMeshDescriptionOperations::ConverToRawMesh & FMeshDescriptionOperations::ConvertHardEdgesToSmoothGroup to take in account the fact that the arrays are sparse arrays - Fixed logic in FQuadricSimplifierMeshReduction::ReduceMeshDescription which wrongly assumed that number of vertex instances equals three times the number of triangles. - Added early-out in UMeshDescription::ComputePolygonTriangulation when perimeter has 3 vertex indices - Changed version of static mesh and mesh description - Fixed issue with mismatching attribute set when generating LOD meshes #jira UEENT-887, UE-59474, UE-59471 Change 4097101 by Patrick.Boutot Remove warning in PropertyEditorClass when trying to load the "None" class. Change 4097443 by Rex.Hill USD export bake keys Change 4097468 by Patrick.Boutot Edit and initialize the timecode provider of the editor. Change 4097479 by Anousack.Kitisa Added support for commandlet and unattended script modes to Plugin Warden. #jira UE-57333 Change 4097578 by Rex.Hill USD export tweaks Change 4098257 by Simon.Therriault GarbageMatteCaptureComponent - Adding spawned actor tracking to be able to use GarbageMatteActor spawned in editor. Change 4100072 by Jamie.Dale Updated wrapped enums to be more consistent with native Python enums - Wrapped enums now generate values that are instances of the enum type itself, containing a name and value field (like native Python enums). - Wrapped enums are now strongly typed and do not allow implicit conversion from numbers (explicit casting is available, but throws if the value is unknown). - Wrapped enum entries may be compared against numbers (even numbers that don't have valid values) via the == and != operators (like IntEnum in Python). - Wrapped enums may now be iterated (like native Python enums). - Wrapped enums now return a length based on their number of entries (like native Python enums). - ScriptName meta-data can now be used with enum entries. Change 4100255 by Patrick.Boutot [MediaBundle] Modify the base shader to support "failed texture" Change 4103838 by Simon.Therriault MR Garbage Matte Component - Adding FocalDriver interface to be able to poll focal information from outside (cinecamera). Could be updated to be event driven. Change 4115616 by Rex.Hill USD Exporter now exposed to UI Change 4116333 by Simon.Therriault MediaBundle - Updated default media bundle to include lens distortion and chromakeying - Added possibility to spawn material editor for MediaBundle inner material - Fix for inner objects flags preventing asset deletion - Fix for CloseMedia not being called when changing map Lens Distortion - Fix for not being able to generate a Identity lens displacement map Change 4117952 by Rex.Hill Expose OpenEditorForAssets to python Change 4118498 by Rex.Hill Sequencer USD export can now export properties of actors in levels Change 4118515 by Rex.Hill Update sequencer export task comment Change 4118706 by Rex.Hill Sequencer USD updates Change 4118968 by Rex.Hill Sequencer USD export now supports visibility Change 4119702 by Simon.Therriault MediaBundle - Fix crash when changing MediaBundle on Actor multiple times. - Fix crash when Undoing after placing a MediaBundle and pressing Stop then Undo. - Fixed bad reference count in MediaBundle when undo/redo of MediaBundle setting changed on MediaBundleActor - Added PostEditChange after setting MaterialProperty to fix potential propagation. Change 4120060 by Patrick.Boutot Fix typo for TimecodeProviderClassName. Add "Config required restart" Add a button to reapply the CustomTimeStep or TimecodeProvider Change 4122062 by Krzysztof.Narkowicz Fixed movie burnout fixed timestep. Engine didn't use a fixed time step due to a following bug: 1. UAutomatedLevelSequenceCapture::Initialize calls UMovieSceneCapture::Initialize. 2. UMovieSceneCapture::Initialize creates FRealTimeCaptureStrategy and calls CaptureStrategy->OnInitialize(). 3. UAutomatedLevelSequenceCapture::Initialize changes CaptureStrategy to FFixedTimeStepCaptureStrategy, but no one calls CaptureStrategy->OnInitialize(); after that and this function is required to set the fixed time step. 4. Result: movies are burned out with variable time step, causing different inconsistencies between frames, settings and HW configurations. #jira none Change 4122236 by Anousack.Kitisa Made the "Import Into Level..." File menu action follow the EditorImport flag of a SceneImportFactory. #jira UE-57612 #jira UEENT-762 Change 4122588 by Rex.Hill Sequencer Export USD lights now supported Change 4122822 by JeanMichel.Dignard Fix for UV packing FlipX. Don't flip the empty columns at the end since they are always expected to be on the right side. The same was already done for FlipY. #jira UE-56664 Change 4123009 by JeanMichel.Dignard Copied fixes from MeshUtilities LayoutUV to MeshDescription LayoutUV Change 4123517 by JeanLuc.Corenthin Fixed crash when running cooked game crash with asset imported from datasmith #jira UE-60173 Change 4124569 by Patrick.Boutot [AJA] When the CustomTimeStep & TimecodeProvider signal is lost in the editor (not in PIE), try to re-synchronize every second. Change 4126421 by Max.Chen Sequencer: Add the ability to switch the takes of all the selected shots/subsections. #jira UESP-761 Change 4133010 by Simon.Therriault MediaBundle - Made assets in the bundle visible in the content browser (different package per asset) and updated to support duplication correctly - Quick fix for MaterialDynamicInstance garbage matte parameter not going back to default value when cleared. - Added looping option on the bundle Keyer and lens materials - Renamed some parameter groups to Keyer_XX Change 4135728 by Rex.Hill MovieSceneCapture crash fix when iteration on classes defined in python Change 4135732 by Rex.Hill Sequencer scripting: expose get playback range, sub sequence get sequence Change 4135734 by Rex.Hill USD python code refactored Change 4136017 by Matt.Hoffman Fixes FrameNumber nodes tripping an ensure when using them via Blueprints and fixes FrameNumbers & friends not being properly breakable in BP. #jira UE-60188 Change 4147959 by Patrick.Boutot Media Output Architecture. Support 8bits & 10bits color. Capture the buffer as is with the correct pixel format and the corredt target size. Change 4147962 by Patrick.Boutot Remove AjaMediaViewportOutput && AjaMediaViewportOutputImpl. Refactor AjaMediaOutput to extend MediaOutput. Refactor AjaMediaGrameGrabberProtocol to use AjaMediaCapture. Create AjaMediaCapture. Change 4148395 by Rex.Hill USD python code cleanup Change 4152901 by Rex.Hill Fix crash when recompiling blueprint or script class that serializes an object reference manually Change 4152906 by Rex.Hill USD level import/export exposed to UI Change 4152956 by Rex.Hill Rename unreal_usd to usd_unreal to avoid future module name conflicts Change 4153331 by Rex.Hill Simplify USD attribute definitions Change 4155472 by Rex.Hill USD level import now handles cameras and lights Change 4155832 by Patrick.Boutot Fix Packaging for MediaFrameworkUtilities Fix MediaPlayer that crash on close when the engine is closing. Change 4156020 by Mike.Zyracki LIVE LINK Sequencer Recording and Playback #jira UESP-714 #jira UESP-715 Support for Live Link Recording/Playback with Sequencer. Basically if we see a MotionController controlled by a LiveLink Subject or a LiveLink Component on a Actor we create a LiveLinkTrack for it that will record raw sequencer data into. We currently do that at the end of recording but will investigate saving it as we record. For Playback we create a Live Link Subject per recorded track and push up interpolated data per Engine Tick on Evaluate. We need to see if we need to send out raw data but that's complicated due to the fact that sequencer time may not be sequential but random, Moved FLiveLinkTimeFrame to LiveLinkTypes so we can grab raw data. Added functions to LiveLinkClient/Subject to get raw data so we dont' need to do expensive searches. Also changed that code so that we can only save the LiveLinkData when specified. We decided to have the sequencer own saving of the live link data so we explicilty turn on saving when we start to record and then turn if off at the end. Without this it's possible to easily run out of memory while LiveLink records. In order to record LiveLinkComponents under Actors we had to change ActorRecording to record ActorComponents and not jus SceneComponents. Not sure of any drawbacks with this but it seems to work well. Had to make sure we stll keeped attach/parent/child logic when recording. Change 4158488 by Rex.Hill USD scene import/export now uses UsdLux lights Change 4158742 by Rex.Hill USD: Add test for level export and import Change 4161645 by Patrick.Boutot Update MediaRecorder to use the ImageWriteQueue. Add flag in IImageWriteQueue.Enqueue to prevent block if the queue is full. Change 4161651 by Patrick.Boutot Modify MediaCompositing to use an existing MediaPlayer Change 4161657 by Patrick.Boutot Extend the SequenceRecorder to support additional object to record from other plugins. Add SequenceRecorder for MediaPlayer. Will record every frame to disk that the MediaPlayer produce. Change 4162699 by Rex.Hill USD export sequence updates Change 4163138 by Rex.Hill USD sequence export test added Change 4163426 by Mike.Zyracki Fix for Curve Names being kept and AutoSetting Tangents on Live Link Recording Change 4165714 by Patrick.Boutot [MediaCapture] Remove color box that tell the status of the MediaCapture. Add MediaCapture's name and use an image to represent the status. Use a ScrollBox around the "preview" output. Can select any actors. Only show the selectable camera grid when there is more than one camera. Change 4166652 by Rex.Hill Expose SetMobility to scripting Change 4167292 by Mike.Zyracki Make sure we call Finalize Evaluation when closing or deleting the Sequencer. This will make sure TearDown is called on sections which fixes issues with LiveLink Sources not getting deleted and probably also issues with MovieScenePlayers not getting released correctly. Also includes addition to show the SubjectName next to the Sequencer Source in the LiveLinkClient UI. Change 4170578 by Rex.Hill PackageTools exposed to scripting Change 4170619 by Rex.Hill Fix ReversePolygonFacing crash Change 4170621 by Rex.Hill USD mesh import can now be given list of individual meshes Change 4172495 by Matt.Hoffman Fixes some flipped logic in Sequencer Media Track that was preventing it from working as expected. Slightly simplifies the logic on setting up movie data, and ensures that the external movie player has a callback registered so that SeekTo calls will work. Makes it so that you can specify your own sound component with an external media player as a media player can have multiple sound components listening to it. Adds support for flagging the media player to loop to help cue some media sources like EXR to handle loop points better. #jira None Change 4173387 by Jon.Nabozny Bookmark usability and extensibility improvements Change 4173755 by Rex.Hill PackageTools namespace deprecation Change 4181799 by Patrick.Boutot Fix precesion error when importing a camera switcher in sequencer #jira UE-61212 Change 4184435 by Patrick.Boutot Only show the MediaCapture tab spawner in the level editor. Make sure the Material used to draw the render target is GCed. Change 4195803 by Patrick.Boutot Warn user if the AJA CustomTimeStep is used with VSync enabled. Change 4195866 by Patrick.Boutot Remove mention of CharBGR10A2 in AJA. The feature is not yet ready. Change 4196059 by Rex.Hill Fix linux compile due to a .cpp including BookMarkBase.h instead of BookmarkBase.h Change 4196380 by Patrick.Boutot MediaCapture capture the backbuffer when the Viewport don't use an internal texture. #jira UE-61601 Change 4199378 by Patrick.Boutot For MediaFramework, add support for 10bits RGB texture Change 4199380 by Patrick.Boutot [AJA] Add support for 10bits RGB texture in input Fix interlaced format that wasn't using the proper Stride value. Change 4200359 by Jamie.Dale Renamed some "K2_" prefixed functions for Python Change 4203016 by Max.Chen Sequencer: Add movie scene locking/read only. Fixed a few bugs with locked sections - shouldn't be able to create or move keys on locked sections #jira UESP-867 Change 4203018 by Max.Chen Sequencer: Test for movie scene read only before calling modify/transactions. #jira UESP-867 Change 4203622 by Simon.Therriault Bringing Aja MediaOutput MediaMode fix from Release 4.20 Change 4204895 by Rex.Hill Expose several file path functions to scripting Change 4206747 by Rex.Hill USD level import and export updates Change 4206783 by Rex.Hill USD updates Change 4207021 by Rex.Hill USD, fix rotation on level import when there is non-uniform scale Change 4207414 by Rex.Hill USD import static mesh material improvements Change 4209733 by Patrick.Boutot Change the log time to use the current frame Timecode #jira UEENT-1107 Change 4209738 by Patrick.Boutot Option to automatically try to reopen the MediaSource again if an error is detected Change 4210385 by Max.Chen Sequencer: Fix CurrentShot LocalTime computation by using sequence time in playback resolution to compute the local shot time. Also, fixed the burnin asset so that CurrentShotLocalTime is hooked up to ShotFrame instead of MasterTime. This fixes a bug where the burnin's {ShotFrame} is not reporting the local shot frame number. #jira UE-61728 Change 4219824 by Patrick.Boutot Use the correct EditorCondition for property MaxNumAncillaryFrameBuffe Change 4220706 by Louise.Rasmussen Sequencer: Syncronizes Sections using Source Timecode Relative to the first Selected Section #JIRA UESP-826 Change 4220708 by Louise.Rasmussen Sequencer: Adds SourceTimecode option to the Render Movie Settings Burn In #JIRA UESP-826 Change 4226970 by Patrick.Boutot Add a Timecode widget, TimecodeProvider widget and a TimecodeProvider Tab Change 4227333 by Rex.Hill USD Sequencer export now supports deltas Change 4227455 by Matt.Hoffman Adds support to the Audio Mixer Submix to pause and resume a recording. #jira UESEQ-77 Change 4230963 by Patrick.Boutot Make the namespace an import option Change 4234208 by Jon.Nabozny Fixed crash when 5 or more LiveLink sources were connected at the same time Change 4234273 by Jon.Nabozny Add methods in FApp to get the current Timecode FrameRate. Change 4237170 by Simon.Therriault MediaCapture Fix for MediaCapture panel not working in PIE Change 4243758 by Andrew.Rodham It's now possible to resolve pixel data from a render target whose texture resource is still pending creation Change 4244790 by Matt.Hoffman This adds experimental support to Sequencer's Render to Movie for exporting audio via rendering a second pass. This requires the new audio mixer (launch editor with "-audiomixer") and currently supports exporting to .wav. The second pass disables rendering in the Viewport and disables capturing frames during this pass which removes the overhead caused by rendering the scene. Complex scenes still evaluate the sequence which may impact performance in complex situations (such as the Fortnite Launch Trailer). Current Limitations: Requires the new audio mixer ("-audiomixer") The second pass must acheive real time framerates. The audio engine is only built to handle real time situations (due to the high precision needed, gotten via the platform clock) so any drops in engine framerate during the second pass will cause a desync of the audio (as there will be more samples captured than frames of video). The editor has significant overhead which often prevents achieving consistent real-time rates. Using "Capture in New Process" alleviates this issue, even without closing the Editor. Audio has been enabled for both image capture and audio capture passes, which means stuttery audio now plays back during image capture. Attempts to alleviate this issue ended up conflicting with some editor code that forces the audio multiplier to 1.0 each Tick(), so audio has to play on both image and audio passes. Forces background audio (otherwise your output audio wav will be blank!) when app is not in focus, though users should leave the app in focus for best performance. #jira UESEQ-77, UESP-669 Change 4246443 by Simon.Tourangeau Remove Beta flag from nDisplay plugin #jira UEENT-1716 Change 4246480 by Simon.Tourangeau Fix nDisplay plugin icon #jira UEENT-1715 Change 4246571 by Simon.Tourangeau Merging Lauren's VR Editor fixes 4085915 Gamma correction fixes for VR Mode Content Browser icons and camera previews 4087955 Adding a third looping option to the Sequencer Radial Menu. Selecting the Looping option now cycles through No Looping > Loop All > Loop Range 4089914 Adding set start/end range buttons to radial menu 4090502 Fixing sequencer looping not being set correctly 4092824 Cameras are now visible in VR Mode - interim implementation until Game Mode works entirely 4095161 Fix for opening a sequence blocking level editor tab drag and drop 4096999 Making a VR Edit show flags mode that is similar to Game Mode but without the Game flag set to true, does hide billboards. Camera hide/show behavior is now correct. 4097286 Placing cameras now only summons the preview panel once you release 4100941 New spawn location for camera preview window (in front and to the side, on whichever side matches your UI hand) 4102732 Hiding VR editor elements from camera preview 4103378 Added camera burnin text on preview windows as well. 4103466 Fixes for camera text 4103779 Fix for the actor previews not unpinning when entering VR mode. 4105722 Adding support for multiple viewport previews in VR mode, and not creating a new viewport interaction if one already exists when getting it. 4106982 Any dockable window can now be placed in the world. 4107298 Fix for crash when closing multiple camera previews 4107426 Fix for crash when connecting node with no texture set 4136343 UI windows docked "to the world" no longer scale with you and stay the size they are docked at. 4136345 Settings for tweaking VR mode movement 4147473 Fix for controllers not showing up 4147734 Sequencer scrubbing will now pause when removing your thumb from a Vive touchpad 4171489 Added external UI panel support to VREditor module. Created an example camera-adjusting UI 4186392 Second fix for sequencer scrubbing on the radial menu Change 4247984 by Jamie.Dale Fixed potential memory corruption caused by Python glue code generation #jira UE-62397 Change 4255471 by Anousack.Kitisa Added functionalities to add/insert/remove UV channel from a StaticMesh accessible through the StaticMeshEditor and scripting. #jira UEENT-1592 #jira UEENT-1597 #jira UEENT-1660 Change 4256323 by Anousack.Kitisa Added Polygon Selection Mode by smoothing group in the MeshEditor. #jira UEENT-1594 Change 4258012 by Homam.Bahnassi Extending UVEdit material function to support mirroring. #jira UE-57306 Change 4258231 by Jamie.Dale Fixed GetHostName failing to convert UTF-8 data correctly Change 4258579 by Jamie.Dale Ensure that packages re-created after deleting their only asset are marked as fully loaded Change 4258652 by Jamie.Dale Added script exposed method to convert an Unreal relative path to absolute Change 4259124 by Patrick.Boutot For MediaBundle, show or hide the failed texture on console. #jira UE-61672 Change 4259264 by Jamie.Dale Show an error if trying to use ExecutePythonScript without Python enabled #jira UE-62318 Change 4259451 by Jamie.Dale No longer use stale subtitles in dialogue waves #jira UE-61500 Change 4259511 by Jamie.Dale Fix crash when passing None as the class for find/load_asset #jira UE-62130 Change 4259542 by Patrick.Boutot Can select the TimecodeSynchronizer from the Toolbar menu. Add option to show it in the toolbar. Can be defaulted by user/machine. Change 4259582 by Patrick.Boutot Hide Edit & Paste from PropertyMenuAssetPicker Change 4260760 by Max.Chen Sequencer: Fix dereferencing null pointer - CameraNode Change 4260895 by Jamie.Dale Changing localization target settings now updates the gather INI files immediately Change 4262166 by Patrick.Boutot Add support for MediaSourceProxy and MediaOutputProxy. Change 4262535 by Andrew.Rodham Sequencer: Added a method for user-defined capture protocols to resolve a buffer and pass it directly to a bound delegate handler Originating source CL#4261391 Change 4262669 by Patrick.Boutot Add MediaProfile. It let the user select their media sources and media outputs by machine by user. Change 4264577 by Patrick.Boutot Change the type of FMediaFrameworkCaptureCameraViewportCameraOutputInfo.LockedCameraActors to LazyObject to enable cross level reference. #jira UE-62438 Include dependence to settings Change 4265750 by JeanLuc.Corenthin Fix array's size issues with MeshDescription utility functions #jira UEENT-1574 Change 4268181 by Patrick.Boutot Mark LockedCameraActors as deprecated. [CL 4279869 by JeanMichel Dignard in Main branch]
2018-08-13 12:29:41 -04:00
#include "VISettings.h"
#define LOCTEXT_NAMESPACE "ViewportWorldInteraction"
namespace VI
{
static FAutoConsoleVariable GizmoScaleInDesktop( TEXT( "VI.GizmoScaleInDesktop" ), 0.35f, TEXT( "How big the transform gizmo should be when used in desktop mode" ) );
static FAutoConsoleVariable AllowVerticalWorldMovement( TEXT( "VI.AllowVerticalWorldMovement" ), 1, TEXT( "Whether you can move your tracking space away from the origin or not" ) );
static FAutoConsoleVariable AllowWorldRotationPitchAndRoll( TEXT( "VI.AllowWorldRotationPitchAndRoll" ), 0, TEXT( "When enabled, you'll not only be able to yaw, but also pitch and roll the world when rotating by gripping with two hands" ) );
static FAutoConsoleVariable WorldScalingDragThreshold( TEXT( "VI.WorldScalingDragThreshold" ), 7.0f, TEXT( "How much you need to perform a scale gesture before world scaling starts to happen." ) );
static FAutoConsoleVariable WorldRotationDragThreshold( TEXT( "VI.WorldRotationDragThreshold" ), 8.0f, TEXT( "How much (degrees) you need to perform a rotation gesture before world rotation starts to happen." ) );
static FAutoConsoleVariable InertiaVelocityBoost( TEXT( "VI.InertiaVelocityBoost" ), 0.5f, TEXT( "How much to scale object velocity when releasing dragged simulating objects in Simulate mode" ) );
static FAutoConsoleVariable SweepPhysicsWhileSimulating( TEXT( "VI.SweepPhysicsWhileSimulating" ), 0, TEXT( "If enabled, simulated objects won't be able to penetrate other objects while being dragged in Simulate mode" ) );
static FAutoConsoleVariable PlacementInterpolationDuration( TEXT( "VI.PlacementInterpolationDuration" ), 0.6f, TEXT( "How long we should interpolate newly-placed objects to their target location." ) );
static FAutoConsoleVariable PlacementOffsetScaleWhileSimulating( TEXT( "VI.PlacementOffsetScaleWhileSimulating" ), 0.25f, TEXT( "How far to additionally offset objects (as a scalar percentage of the gizmo bounds) from the placement impact point while simulate mode is active" ) );
static FAutoConsoleVariable SmoothSnap( TEXT( "VI.SmoothSnap" ), 1, TEXT( "When enabled with grid snap, transformed objects will smoothly blend to their new location (instead of teleporting instantly)" ) );
static FAutoConsoleVariable SmoothSnapSpeed( TEXT( "VI.SmoothSnapSpeed" ), 30.0f, TEXT( "How quickly objects should interpolate to their new position when grid snapping is enabled" ) );
static FAutoConsoleVariable ElasticSnap( TEXT( "VI.ElasticSnap" ), 1, TEXT( "When enabled with grid snap, you can 'pull' objects slightly away from their snapped position" ) );
static FAutoConsoleVariable ElasticSnapStrength( TEXT( "VI.ElasticSnapStrength" ), 0.3f, TEXT( "How much objects should 'reach' toward their unsnapped position when elastic snapping is enabled with grid snap" ) );
static FAutoConsoleVariable ScaleMax( TEXT( "VI.ScaleMax" ), 6000.0f, TEXT( "Maximum world scale in centimeters" ) );
static FAutoConsoleVariable ScaleMin( TEXT( "VI.ScaleMin" ), 10.0f, TEXT( "Minimum world scale in centimeters" ) );
static FAutoConsoleVariable DragAtLaserImpactInterpolationDuration( TEXT( "VI.DragAtLaserImpactInterpolationDuration" ), 0.1f, TEXT( "How long we should interpolate objects between positions when dragging under the laser's impact point" ) );
static FAutoConsoleVariable DragAtLaserImpactInterpolationThreshold( TEXT( "VI.DragAtLaserImpactInterpolationThreshold" ), 5.0f, TEXT( "Minimum distance jumped between frames before we'll force interpolation mode to activated" ) );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
static FAutoConsoleVariable ForceGizmoPivotToCenterOfObjectsBounds( TEXT( "VI.ForceGizmoPivotToCenterOfObjectsBounds" ), 0, TEXT( "When enabled, the gizmo's pivot will always be centered on the selected objects. Otherwise, we use the pivot of the last selected object." ) );
static FAutoConsoleVariable GizmoHandleHoverScale( TEXT( "VI.GizmoHandleHoverScale" ), 1.5f, TEXT( "How much to scale up transform gizmo handles when hovered over" ) );
static FAutoConsoleVariable GizmoHandleHoverAnimationDuration( TEXT( "VI.GizmoHandleHoverAnimationDuration" ), 0.1f, TEXT( "How quickly to animate gizmo handle hover state" ) );
static FAutoConsoleVariable ShowTransformGizmo( TEXT( "VI.ShowTransformGizmo" ), 1, TEXT( "Whether the transform gizmo should be shown for selected objects" ) );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
static FAutoConsoleVariable DragTranslationVelocityStopEpsilon( TEXT( "VI.DragTranslationVelocityStopEpsilon" ), KINDA_SMALL_NUMBER, TEXT( "When dragging inertia falls below this value (cm/frame), we'll stop inertia and finalize the drag" ) );
static FAutoConsoleVariable SnapGridSize( TEXT( "VI.SnapGridSize" ), 3.0f, TEXT( "How big the snap grid should be. At 1.0, this will be the maximum of the gizmo's bounding box and a multiple of the current grid snap size" ) );
static FAutoConsoleVariable SnapGridLineWidth( TEXT( "VI.SnapGridLineWidth" ), 3.0f, TEXT( "Width of the grid lines on the snap grid" ) );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
static FAutoConsoleVariable MinVelocityForInertia( TEXT( "VI.MinVelocityForInertia" ), 1.0f, TEXT( "Minimum velocity (in cm/frame in unscaled room space) before inertia will kick in when releasing objects (or the world)" ) );
static FAutoConsoleVariable GridHapticFeedbackStrength( TEXT( "VI.GridHapticFeedbackStrength" ), 0.4f, TEXT( "Default strength for haptic feedback when moving across grid points" ) );
static FAutoConsoleVariable ActorSnap(TEXT("VI.ActorSnap"), 0, TEXT("Whether or not to snap to Actors in the scene. Off by default, set to 1 to enable."));
static FAutoConsoleVariable AlignCandidateDistance(TEXT("VI.AlignCandidateDistance"), 2.0f, TEXT("The distance candidate actors can be from our transformable (in multiples of our transformable's size"));
static FAutoConsoleVariable ForceSnapDistance(TEXT("VI.ForceSnapDistance"), 25.0f, TEXT("The distance (in % of transformable size) where guide lines indicate that actors are aligned"));
static FAutoConsoleVariable AllowCarryingCertainObjects(TEXT("VI.AllowCarryingCertainObjects"), 1, TEXT("When enabled, allows the user to freely move and rotate certain selected objects with a one-hand drag."));
static FAutoConsoleVariable CarrySmoothingLerpAlpha(TEXT("VI.CarrySmoothingLerpAlpha"), 1.0f, TEXT("How much to smooth out movement of the object you're carrying."));
static FAutoConsoleVariable ForceShowCursor(TEXT("VI.ForceShowCursor"), 0, TEXT("Whether or not the mirror window's cursor should be enabled. Off by default, set to 1 to enable."));
static FAutoConsoleVariable SFXMultiplier(TEXT("VI.SFXMultiplier"), 1.5f, TEXT("Default Sound Effect Volume Multiplier"));
static FAutoConsoleVariable NavigationMode(TEXT("VI.NavigationMode"), 0, TEXT("VR NavigationMode"));
static FAutoConsoleVariable MaxFlightSpeed(TEXT("VI.MaxFlightSpeed"), 11.0f, TEXT("Maximum Superman speed"));
static FAutoConsoleVariable DragScale(TEXT("VI.DragScale"), 1.0f, TEXT("Scales the translation when dragging yourself through the world"));
static FAutoConsoleVariable LowSpeedInertiaDamping(TEXT("VI.LowSpeedInertiaDamping"), 0.94f, TEXT("Low Speed Inertia Damping multiplier"));
static FAutoConsoleVariable HighSpeedInertiaDamping(TEXT("VI.HighSpeedInertiaDamping"), 0.99f, TEXT("Hight Speed Inertia Damping multiplier"));
}
const TCHAR* UViewportWorldInteraction::AssetContainerPath = TEXT("/Engine/VREditor/ViewportInteractionAssetContainerData");
struct FGuideData
{
const AActor* AlignedActor;
FVector LocalOffset;
FVector SnapPoint;
FVector GuideStart;
FVector GuideEnd;
FColor GuideColor;
float DrawAlpha;
float GuideLength;
};
// @todo vreditor: Hacky inline implementation of a double vector. Move elsewhere and polish or get rid.
struct DVector
{
double X;
double Y;
double Z;
DVector()
{
}
DVector( const DVector& V )
: X( V.X ), Y( V.Y ), Z( V.Z )
{
}
DVector( const FVector& V )
: X( V.X ), Y( V.Y ), Z( V.Z )
{
}
DVector( double InX, double InY, double InZ )
: X( InX ), Y( InY ), Z( InZ )
{
}
DVector operator+( const DVector& V ) const
{
return DVector( X + V.X, Y + V.Y, Z + V.Z );
}
DVector operator-( const DVector& V ) const
{
return DVector( X - V.X, Y - V.Y, Z - V.Z );
}
DVector operator*( double Scale ) const
{
return DVector( X * Scale, Y * Scale, Z * Scale );
}
double operator|( const DVector& V ) const
{
return X*V.X + Y*V.Y + Z*V.Z;
}
FVector ToFVector() const
{
return FVector( ( float ) X, ( float ) Y, ( float ) Z );
}
};
// @todo vreditor: Move elsewhere or get rid
static void SegmentDistToSegmentDouble( DVector A1, DVector B1, DVector A2, DVector B2, DVector& OutP1, DVector& OutP2 )
{
const double Epsilon = 1.e-10;
// Segments
const DVector S1 = B1 - A1;
const DVector S2 = B2 - A2;
const DVector S3 = A1 - A2;
const double Dot11 = S1 | S1; // always >= 0
const double Dot22 = S2 | S2; // always >= 0
const double Dot12 = S1 | S2;
const double Dot13 = S1 | S3;
const double Dot23 = S2 | S3;
// Numerator
double N1, N2;
// Denominator
const double D = Dot11*Dot22 - Dot12*Dot12; // always >= 0
double D1 = D; // T1 = N1 / D1, default D1 = D >= 0
double D2 = D; // T2 = N2 / D2, default D2 = D >= 0
// compute the line parameters of the two closest points
if ( D < Epsilon )
{
// the lines are almost parallel
N1 = 0.0; // force using point A on segment S1
D1 = 1.0; // to prevent possible division by 0 later
N2 = Dot23;
D2 = Dot22;
}
else
{
// get the closest points on the infinite lines
N1 = ( Dot12*Dot23 - Dot22*Dot13 );
N2 = ( Dot11*Dot23 - Dot12*Dot13 );
if ( N1 < 0.0 )
{
// t1 < 0.0 => the s==0 edge is visible
N1 = 0.0;
N2 = Dot23;
D2 = Dot22;
}
else if ( N1 > D1 )
{
// t1 > 1 => the t1==1 edge is visible
N1 = D1;
N2 = Dot23 + Dot12;
D2 = Dot22;
}
}
if ( N2 < 0.0 )
{
// t2 < 0 => the t2==0 edge is visible
N2 = 0.0;
// recompute t1 for this edge
if ( -Dot13 < 0.0 )
{
N1 = 0.0;
}
else if ( -Dot13 > Dot11 )
{
N1 = D1;
}
else
{
N1 = -Dot13;
D1 = Dot11;
}
}
else if ( N2 > D2 )
{
// t2 > 1 => the t2=1 edge is visible
N2 = D2;
// recompute t1 for this edge
if ( ( -Dot13 + Dot12 ) < 0.0 )
{
N1 = 0.0;
}
else if ( ( -Dot13 + Dot12 ) > Dot11 )
{
N1 = D1;
}
else
{
N1 = ( -Dot13 + Dot12 );
D1 = Dot11;
}
}
// finally do the division to get the points' location
const double T1 = ( FMath::Abs( N1 ) < Epsilon ? 0.0 : N1 / D1 );
const double T2 = ( FMath::Abs( N2 ) < Epsilon ? 0.0 : N2 / D2 );
// return the closest points
OutP1 = A1 + S1 * T1;
OutP2 = A2 + S2 * T2;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
UViewportWorldInteraction::UViewportWorldInteraction():
Super(),
bDraggedSinceLastSelection( false ),
LastDragGizmoStartTransform( FTransform::Identity ),
TrackingTransaction( FTrackingTransaction() ),
AppTimeEntered( FTimespan::Zero() ),
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
DefaultOptionalViewportClient( nullptr ),
LastFrameNumberInputWasPolled( 0 ),
MotionControllerID( 0 ), // @todo ViewportInteraction: We only support a single controller, and we assume the first controller are the motion controls
LastWorldToMetersScale( 100.0f ),
bSkipInteractiveWorldMovementThisFrame( false ),
RoomTransformToSetOnFrame(),
LowSpeedInertiaDamping( VI::LowSpeedInertiaDamping->GetFloat() ),
HighSpeedInertiaDamping( VI::HighSpeedInertiaDamping->GetFloat() ),
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bAreTransformablesMoving( false ),
bIsInterpolatingTransformablesFromSnapshotTransform( false ),
bFreezePlacementWhileInterpolatingTransformables( false ),
TransformablesInterpolationStartTime( FTimespan::Zero() ),
TransformablesInterpolationDuration( 1.0f ),
TransformGizmoActor( nullptr ),
TransformGizmoClass( APivotTransformGizmo::StaticClass() ),
Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 3293188) #rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3203880 on 2016/11/18 by Ori.Cohen Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3207429 on 2016/11/22 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3207285 Change 3252627 on 2017/01/10 by Lukasz.Furman removed duplicated entries from visual logger shape rendering #ue4 Change 3252675 on 2017/01/10 by Ori.Cohen Add support for tagged memory regions (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252686 on 2017/01/10 by Ori.Cohen Refactor BodySetup to make it easier to reuse shape creation (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252833 on 2017/01/10 by Ori.Cohen Refactor constraint so that it can be used for external solvers. (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252887 on 2017/01/10 by Dan.Reynolds Increased modes to include: Harmonic minor Melodic minor (going up) Pentatonic (Major) Pentatonic (minor) Whole Tone Diminished (WH) and Blues Change 3252895 on 2017/01/10 by Aaron.McLeran update to music utilities. Change 3253060 on 2017/01/10 by Aaron.McLeran Updates to synthesis plugin and some new features to DSP objects Change 3253061 on 2017/01/10 by Aaron.McLeran Updates to music maps Change 3253078 on 2017/01/10 by Aaron.McLeran Removing pragma optimization code accidentally checked in Change 3253110 on 2017/01/10 by Ori.Cohen First iteration of immediate mode ragdoll node (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3253315 on 2017/01/10 by Aaron.McLeran Fixing a few bugs in DSP objects - Added a new types file EpicSynth1 and EpicSynth1 component can share enums Change 3253577 on 2017/01/11 by Aaron.McLeran Checking in updates to assets for music -- celestial manager for rotating objects like planets, new ambient map Change 3254052 on 2017/01/11 by Ori.Cohen Fix build. Change 3254059 on 2017/01/11 by Ori.Cohen Turn off html5 trying to build apex. Change 3254095 on 2017/01/11 by Ori.Cohen Fix build Change 3254200 on 2017/01/11 by Jon.Nabozny Make vectorized FTransform Accumulate (with blend) and AccumulateWithAdditive (with blend) consistent with the non-vectorized version and comments. #JIRA UE-40469 Change 3254334 on 2017/01/11 by Marc.Audy Put in missing virtual Change 3254397 on 2017/01/11 by dan.reynolds Updates to OtonOkeMap Change 3254410 on 2017/01/11 by Marc.Audy Cleanup autos Change 3254420 on 2017/01/11 by Marc.Audy PR #3110: Add missing IsInAudioThread check (Contributed by projectgheist) Modified somewhat, but based on what PR indicated as a problem. #jira UE-40369 Change 3254423 on 2017/01/11 by Marc.Audy Optimize GetDefaultSubobjectByName and GetDefaultSubobjects Remove autos Change 3254826 on 2017/01/11 by Aaron.McLeran Bringing optimizations to dev-framework Change 3254831 on 2017/01/11 by dan.reynolds Modified MidiSynthTestBP to use Program Change events to pull a Preset from a Preset Bank--added a Data Blueprint Object ES1Bank_Default (containing Preset arrays) with children classes for different classifications of Presets. Change 3254833 on 2017/01/11 by dan.reynolds Updating MidiSynthTestBP's default SynthPreset pan value. Change 3254851 on 2017/01/11 by dan.reynolds Updating ES1Bank_Bass Updating OtonOkeMap Change 3254854 on 2017/01/11 by Aaron.McLeran Some fixups for pan modulation Change 3255682 on 2017/01/12 by aaron.mcleran Turning the bass down a bit on OtonOkeMap Change 3255721 on 2017/01/12 by Marc.Audy Fix spelling error Change 3255790 on 2017/01/12 by Marc.Audy Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3256263 on 2017/01/12 by Ori.Cohen Refactor immediate mode api to take PxD6Joint and PxRigidActor instead. Change 3256288 on 2017/01/12 by Ori.Cohen Undo constraint refactor as we found a way around it and it made the code much harder to read/debug Change 3256360 on 2017/01/12 by Ori.Cohen Make sure physx actors passed into immediate mode are done so with proper locks (can probably improve this in the case where the actor is not even in the scene) Change 3256846 on 2017/01/13 by Marc.Audy Deprecate FBox/FBox2D int32 constructor because it makes no sense if you pass in a non 0 value. Use ForceInit instead. Change 3256954 on 2017/01/13 by Marc.Audy Fix missed fixup of deprecated constructor use Change 3257167 on 2017/01/13 by Jon.Nabozny Fix check in FBodyInstance::SetCollisionEnabled. Create convenience methods for HasPhysics and HasQuery. #jira UE-39633 Change 3257181 on 2017/01/13 by Zak.Parrish Adding input map and some testing content to Xenakis Change 3257183 on 2017/01/13 by Mieszko.Zielinski Implemented an improved navigation projection BP function that retrieves both projected locaiton as well as a boolean indicating if the projection succeeded #UE4 Also, did similar changes to GetRandomReachablePointInRadius and GetRandomPointInNavigableRadius #jira UE-40368 Change 3257211 on 2017/01/13 by Jon.Nabozny Fix CIS issue caused by 3257167. Change 3257220 on 2017/01/13 by Marc.Audy Additional FBox constructor deprecation fixups Change 3257236 on 2017/01/13 by zak.parrish Fixed error on Xenakis input pawn Change 3257242 on 2017/01/13 by zak.parrish Update to InputListener Change 3257273 on 2017/01/13 by Marc.Audy No reason to pass simple types by reference Change 3257418 on 2017/01/13 by Ori.Cohen Attempt to turn android physx libs back to static libs. Change 3257445 on 2017/01/13 by Ori.Cohen Turn android libs back to OBJ and removed unreal side linking as it seems we are now just merging into a single physx lib Change 3257903 on 2017/01/14 by Aaron.McLeran Additions to synth module and updates to dsp objects - Adding ability to create arbitrary modular patches from modulating sources to modulation destinations - DSP objects define their default depths but patches can override - Creating new SynthesisEditor module for synthesis plugin so we can create synthesis preset assets - Adding a preset bank type so we can store a bank of presets (aka factory presets) Change 3258179 on 2017/01/15 by Seth.Weedin Duplicating input test map for some FX work Change 3258181 on 2017/01/15 by Seth.Weedin Modify skybox in test map to be dark and spooky Change 3258183 on 2017/01/15 by aaron.johnson substituted classes, changed wind speed and adjusted level lighting Change 3258190 on 2017/01/15 by aaron.johnson substituted triplet pawn and motion controller classes, enabled grabbing animations Change 3258191 on 2017/01/15 by Aaron.McLeran Getting source effects working for GDC demo - Added new synthesis editor module to create instances of user-created source effects - Added code to do source effects - Modified old design to a newer, more simpler design for calling into client code to set parameters. No longer using the complex struct reflection design and instead just pass in the uobject preset the user created. They'll then cast it to the type that has the actual settings. - Tweaks and fixes to existing dsp objects to get source effects working - Modified existing engine code to allow for playing out source effect tails - Only supporting mono and stereo assets for source effect processing. Multi-channel effect processing is overly complex for this feature though we may extend the capabilities in the future. - Fixed issue of pitching with stereo delay effect on setting first interpolated param - Moving synth/dsp stuff in synthesis plugins into appropriate public/private folders in plugin/module - Deleting some cruft files no longer needed Change 3258201 on 2017/01/15 by Seth.Weedin C++ and BP classes for managing grid cells. Initial grid mapping tests. #rb none Change 3258206 on 2017/01/15 by aaron.johnson map push, triplets interface created, debug widget placed in level Change 3258222 on 2017/01/15 by Aaron.McLeran Fixing crash when there's a null entry in the source effect chain Fixed some zippering introduced by applying volume twice. Change 3258225 on 2017/01/15 by aaron.johnson Interface changes, pawn output values wip Change 3258228 on 2017/01/15 by aaron.johnson Pawn should be outputting all correct values for Tripletsinterface Change 3258242 on 2017/01/15 by Stanley.Hayes Edge lights and Spherical Density Materials Change 3258251 on 2017/01/16 by Seth.Weedin More progress on grid FX. Add curve strength modifiers, begin hooking up interaction. #rb none Change 3258284 on 2017/01/16 by Aaron.McLeran Fixing CIS build error Surprised that MSVC allows that... Change 3258525 on 2017/01/16 by Mieszko.Zielinski Made UGameplayTask::ResourceOverlapPolicy configurable via ini files #UE4 Change 3258537 on 2017/01/16 by Lukasz.Furman fixed duplicated & undo operations not updating navigation area in nav link proxy and nav link component #ue4 Change 3258595 on 2017/01/16 by Marc.Audy Fix static analysis warning Change 3259364 on 2017/01/16 by Mieszko.Zielinski BTTask_RotateToFaceBBEntry comment spelling fix #UE4 #jira UE-40669 Change 3259683 on 2017/01/16 by dan.reynolds Updated Preset Bank System implemented in MidiSynthTestBP and 4 Preset Banks have been started Change 3260244 on 2017/01/17 by Lina.Halper #anim - optimize layer blend node to not create mask weights in run-time but in compile time. #code review: Martin.Wilson Change 3260617 on 2017/01/17 by Ori.Cohen Immediate mode spawns its own actors. Change 3260701 on 2017/01/17 by Ori.Cohen Don't bother blending physics with animation when physics is QueryOnly Change 3260796 on 2017/01/17 by Ori.Cohen EndPhysics tick will no longer be scheduled if QueryOnly is used on a ragdoll. Change 3261207 on 2017/01/17 by Ori.Cohen First iteration of contact enabling/disabling for immediate mode. Change 3262010 on 2017/01/18 by Marc.Audy Remove some autos Change 3262525 on 2017/01/18 by Lina.Halper Fix crash with required bones index not using property indexing #jira: UE-40786 Change 3263658 on 2017/01/19 by Martin.Wilson Add AnimTechDemo to dev-framework (base third person + feng mao) Change 3263684 on 2017/01/19 by Lina.Halper #anim : layer node - fix allocation change I made by mistake Change 3264523 on 2017/01/19 by Ori.Cohen Immediate mode can now add static geometry it finds in the world. Also improve contact gen by caching iteration order Change 3264701 on 2017/01/19 by Ori.Cohen Make it so that immediate mode ragdolls collide with the ground in persona.This is a bit of an editor only hack which allows immediate mode to find non-static actors Change 3264980 on 2017/01/19 by Ori.Cohen Make sure physics asset collision disabled works in immediate mode. Change 3265011 on 2017/01/19 by Ori.Cohen Added the ability to override physics asset for immediate mode Change 3265030 on 2017/01/19 by Ori.Cohen Added override gravity for immediate mode. Change 3265650 on 2017/01/20 by Benn.Gallagher NvCloth Source Change 3265652 on 2017/01/20 by Benn.Gallagher NvCloth Lib #rnx Change 3265653 on 2017/01/20 by Benn.Gallagher NvCloth Bin #rnx Change 3266195 on 2017/01/20 by Danny.Bouimad Initial ClothTest Assets for NCloth Before and after comparison TM-MultiClothTest (Under Maps>Framework>Cloth) Change 3266377 on 2017/01/20 by Marc.Audy Ensure that OrphanedDataOnly and TrashClass blueprint generated classes are correctly considered a blueprint class for disregard for GC purposes. Change 3267873 on 2017/01/23 by Jon.Nabozny Fix SceneProxy shadowing in UGeometryCacheComponent. Change 3268025 on 2017/01/23 by Benn.Gallagher IWYU change, platform PCH generation seemed to hide this one. Change 3268026 on 2017/01/23 by Benn.Gallagher Fixed LOCTEXT_NAMESPACE being inconsistently scoped in an #if block #rnx Change 3268630 on 2017/01/23 by Zak.Parrish Updating to add MIGS shooter content, as well as audio interaction Blueprints Change 3268663 on 2017/01/23 by Ori.Cohen Ragdoll animnode uses raw physics asset pointer to ensure it makes a hard reference. Change 3268811 on 2017/01/23 by Ori.Cohen Added component space sim for immediate mode Change 3269369 on 2017/01/24 by Benn.Gallagher Copying //Tasks/UE4/Dev-UEFW-11-NewClothingPipeline to Dev-Framework (//UE4/Dev-Framework) Replaced clothing with new simulation framework Change 3269417 on 2017/01/24 by danny.bouimad Minor Update to cloth map for test Change 3269420 on 2017/01/24 by Benn.Gallagher Removed APEX simulation from clothing framework (used in testing, not fully complete) Change 3269421 on 2017/01/24 by danny.bouimad Small tweaks Change 3269515 on 2017/01/24 by Lukasz.Furman enabled gameplay debugger's OnSelectionChanged event support for both PIE and SIE modes fixed GameplayAbility debugger's category not using IAbilitySystemInterface #ue4 Change 3269595 on 2017/01/24 by mason.seay Break apart physics asset for crash bug Change 3269819 on 2017/01/24 by Ori.Cohen Make the possibly kinematic actor the first actor in the immediate mode joint. This is consistent with physx vanilla solver. Change 3270364 on 2017/01/24 by Josh.Stoddard upgrade to the latest version of v-HACD: https://github.com/kmammou/v-hacd/tree/master/src/VHACD_Lib commit: 7a09f9d NOTE: only updated windows binaries mac and linux still using old binaries until they can be tested #jira UE-40124 #rb josh.stoddard Change 3271188 on 2017/01/25 by Jurre.deBaare Post-import script support #jira UEFW-80 Change 3271249 on 2017/01/25 by Thomas.Sarkanen Move soundwave-internal curve tables to advanced display Exposing it was confusing to audio people Change 3271586 on 2017/01/25 by Marc.Audy Don't rerun construction scripts twice on a level that has been hidden and reshown #jira UE-40306 Change 3272048 on 2017/01/25 by Ori.Cohen Fix for immediate mode sim when root body is the same as the root bone. Change 3272083 on 2017/01/25 by Ori.Cohen Make sure to warn when component space sim and collision are used together. Also handle it gracefully. Change 3272300 on 2017/01/25 by Ori.Cohen Fix incorrect collision generation when a shape's local pose is not identity. Change 3273195 on 2017/01/26 by Jurre.deBaare Fix for Anim import script crash in GetBonePosesForTime Change 3273204 on 2017/01/26 by Ben.Marsh Ignore PRAGMA_DISABLE_SHADOW_VARIABLE_WARNINGS and PRAGMA_ENABLE_SHADOW_VARIABLE_WARNINGS macros between include directives. Fixes CIS warning with IncludeTool. Change 3273378 on 2017/01/26 by James.Golding In AnimBP editor, call CopyNodeDataToPreviewNode when properties are edited, not just pin defaults changed Change 3273381 on 2017/01/26 by James.Golding Big refactor to PoseDriver - RBF logic now moved into its own class/file - Allow editing of transform and radial scaling per-target - Add support for different falloff functions (not just Gaussian) - Allow driving curves directly, rather than always poses - Add details customization for pose driver node - Edits to PoseDriver settings now take immediate effect, don't need to recompile Change 3273826 on 2017/01/26 by Josh.Stoddard modify VHACD to improve quality of hulls generated by convex decomposition NOTE: mac libs not included - mac editor will use legacy libs for now Change 3273902 on 2017/01/26 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3273433 Change 3274018 on 2017/01/26 by Ori.Cohen Added immediate physics preview in phat. Change 3274165 on 2017/01/26 by Ori.Cohen PhAT now depends on immediate mode plugin. Fix build #JIRA UE-41179 Change 3275001 on 2017/01/27 by Jurre.deBaare Fix for crash in Persona with Anim Modifiers Change 3275297 on 2017/01/27 by Ori.Cohen Big refactor to iterate over shapes instead of bodies (allows multiple shape per body collision) Change 3275340 on 2017/01/27 by Benn.Gallagher Fixed Paragon clothing crashes during clothing upgrade step, fixed bone mapping not getting updated on reimport with different hierarchy #jira UE-41025 #jira UE-41039 Change 3275383 on 2017/01/27 by Benn.Gallagher Blacklisted double promotion warning on ps4 NvCloth build #rnx Change 3275426 on 2017/01/27 by Benn.Gallagher Removed CUDA dependencies from NvCloth cmake files Change 3275670 on 2017/01/27 by Ori.Cohen Fix phat ragdoll in immediate mode updating sketal mesh component transform Change 3275673 on 2017/01/27 by Ori.Cohen Add position/velocity iteration to immediate mode Change 3276001 on 2017/01/27 by Alan.Noon Migrated Immediate Mode Minion Ragdoll Content to GDC AnimTech Project. Updated DefaultInput.ini none Change 3276596 on 2017/01/28 by Aaron.McLeran Removing unused #ifdef Change 3276597 on 2017/01/28 by Aaron.McLeran Getting rid of static analysis warning Change 3277354 on 2017/01/30 by Lukasz.Furman fixed custom navlink Id collisions #ue4 Change 3277356 on 2017/01/30 by Lukasz.Furman fixed comments in GameplayDebugger.h #jira UE-41103 Change 3277371 on 2017/01/30 by mason.seay Test map for spawn sound/force feedback bug. Change 3277445 on 2017/01/30 by Lukasz.Furman fixed compilation warning #ue4 Change 3277560 on 2017/01/30 by Danny.Bouimad Made checkin to Fix Crash that occured due to bad content. Change 3277567 on 2017/01/30 by Ori.Cohen Fix immediate mode crashing when joint is empty. #JIRA UE-41026 Change 3277928 on 2017/01/30 by Ori.Cohen Turn on immediate mode plugin by default Change 3278433 on 2017/01/30 by Ori.Cohen Immediate mode supports heightfield collision. Change 3278449 on 2017/01/30 by Ori.Cohen Fix immediate mode cache not being initialized properly. Change 3278787 on 2017/01/31 by James.Golding Fix CIS error in ImmediatePhysicsSimulation.cpp Change 3279303 on 2017/01/31 by mason.seay Assets for RigidBody node bug Change 3279352 on 2017/01/31 by Benn.Gallagher Fixed inertia blends on self collision cloth assets as we now only have local space simulation and these values weren't used before Change 3279377 on 2017/01/31 by Alan.Noon GDC AnimTech Demo: adjusted minion physics assets none Change 3279425 on 2017/01/31 by james.cobbett Updating QA-Physics map. Made one of the simulated physics objects more user-friendly, able to enable/disable physics on key-press now. Change 3279436 on 2017/01/31 by Benn.Gallagher Fixed inertia scales on Owen mesh Change 3279480 on 2017/01/31 by Benn.Gallagher Fixes for clothing behavior changes #jira UE-41092 Change 3279495 on 2017/01/31 by Ori.Cohen Remove unneeded cache clearing when contact pairs are not skipped, but there is no collision. Change 3279579 on 2017/01/31 by james.cobbett Added new scenario to QA-Physics map. Moving platforms (up/down, left/right) with physics objects on them. Change 3279695 on 2017/01/31 by mason.seay RigidBody node test asset Change 3280105 on 2017/01/31 by Ori.Cohen Prevent query only ragdolls from simulating if their bodysetup is marked as simulated. Also remove slow check in term body for owning components. This is not true for destructibles or immediate mode Change 3280148 on 2017/01/31 by mason.seay First round of assets for force feedback testing Change 3280860 on 2017/02/01 by James.Golding Merge CL 3280853 to Dev-Framework Fix crash with null CurrentSkeleton on AnimInstance when using Re-import button in SkelMesh Editor Change 3281172 on 2017/02/01 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3281156 Change 3281210 on 2017/02/01 by james.cobbett Updated QA-Physics map Added cube that starts off with physics enabled, then disables. Made physics toggleable on that and another cube. Change 3281211 on 2017/02/01 by James.Golding Details customization for editing PoseDriver targets list Change 3281332 on 2017/02/01 by Marc.Audy Fix bad merge Fix file types Change 3281388 on 2017/02/01 by mason.seay Updated Force Feedback asset Change 3281396 on 2017/02/01 by mason.seay moving asset Change 3281987 on 2017/02/01 by Benn.Gallagher Fixed project generation failing after main merge Change 3282047 on 2017/02/01 by Marc.Audy Fix up Target and build cs files after changes from Dev-Build Change 3282214 on 2017/02/01 by Ori.Cohen Expose radial forces to immediate mode Change 3282221 on 2017/02/01 by Alan.Noon Immediate Mode GDC demo content: development on minion anim B, refined Orbital Laser Pawn controls, tweaked laser parameters none Change 3282273 on 2017/02/01 by Ori.Cohen Fix crash when recompiling animbp of immediate mode due to null pointer. Change 3282368 on 2017/02/01 by Ori.Cohen Quick iteration on minion demo Change 3282824 on 2017/02/02 by James.Golding Fix for CIS in RBFSolver.h Change 3282829 on 2017/02/02 by James.Golding Fix CIS in PoseDriverDetails.cpp Fix list UI not refreshing after copying targets from PoseAsset Change 3282834 on 2017/02/02 by Danny.Bouimad Adding Pose driver additive assets Change 3282863 on 2017/02/02 by James.Golding Add Mambo mesh and Skeleton Change 3282892 on 2017/02/02 by James.Golding Copy Aurora (Ice) and Mambo meshes/materials/some anims from Dev-General to AnimTechDemo project in Dev-Framework Change 3283157 on 2017/02/02 by Mieszko.Zielinski Cook Orion Win64 fix #UE4 Had to change the Extent param of K2_ProjectPointToNavigation. Updated the error causing Orion BP Change 3283159 on 2017/02/02 by Marc.Audy Additional CIS fixes Change 3283179 on 2017/02/02 by Marc.Audy More CIS fixes Change 3283197 on 2017/02/02 by Jurre.deBaare Fix for issues importing Fornite geometry cache assets #fix Use actual import number of frames instead of total number of frames in the Alembic Cache Change 3283201 on 2017/02/02 by Marc.Audy Keep fixing CIS Change 3283270 on 2017/02/02 by James.Golding Merging CL 3276013 to Dev-Framework - fix issue with additive pose preview applying twice Change 3283499 on 2017/02/02 by Marc.Audy More CIS fixes Change 3283543 on 2017/02/02 by Jon.Nabozny Update comment on AActor::GetActorBounds to properly reflect ChildActorComponents aren't included in the calculation. Change 3283663 on 2017/02/02 by Ori.Cohen Fix potential null dereference in ragdoll node Change 3283757 on 2017/02/02 by Marc.Audy May fix remaining CIS issues Change 3283984 on 2017/02/02 by Marc.Audy Fix linux CIS Change 3284039 on 2017/02/02 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3283913 Change 3284067 on 2017/02/02 by Marc.Audy Fixup mistakes in converting redirects Change 3284187 on 2017/02/02 by Ori.Cohen Immediate mode works with radial force (not just radial impulse) Change 3284358 on 2017/02/02 by Ori.Cohen Update arcblade phys asset for immediate mode Change 3284667 on 2017/02/02 by Marc.Audy Arguments is an array not a string now. Fixing commented out code. Change 3284684 on 2017/02/02 by Marc.Audy Move AVIWriter out in to its own module to avoid any possible unity build issues where xwindows.h got indirectly included through the DirectShow third party library and caused FGenericWindow::IsMaximized and IsMinimized to conflict with a macro. Change 3284707 on 2017/02/02 by Marc.Audy Fix AVIWriter module compilation on Mac Change 3285012 on 2017/02/03 by Benn.Gallagher Fixes for Dx NvCloth shader warnings Change 3285016 on 2017/02/03 by Marc.Audy Fix missing include Change 3285048 on 2017/02/03 by Benn.Gallagher Fixed Persona needing a restart when changing number of clothing assets (import/delete) #jira UE-41323 Change 3285325 on 2017/02/03 by Marc.Audy Properly implement AVIWriter module Change 3285538 on 2017/02/03 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3285499 Change 3285735 on 2017/02/03 by Jon.Nabozny Add IsInAir method to UVehicleWheel. #jira UE-38369 Change 3285862 on 2017/02/03 by Aaron.McLeran UE-41435 Fixing PIE audio - Fixing PIE audio. Recent change to editor preferences from Dev-Editor branch (CL 3234495) caused all audio to be muted in PIE. Change 3285914 on 2017/02/03 by danny.bouimad RecomputeTangents Test Assets Change 3286246 on 2017/02/03 by Mieszko.Zielinski Changes to game-specific BPs containing calls to deprecated NavigationSystem functions #UE4 #jira UE-41527 #jira UE-41518 Change 3286308 on 2017/02/03 by Ori.Cohen Make sure physx trimesh scale is never too small. Fix box clamping being ignored. Fixes cook warnings for Odin. #JIRA UE-41529 Change 3286396 on 2017/02/03 by Ori.Cohen Fix CIS Change 3286479 on 2017/02/03 by Ori.Cohen Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3287421 on 2017/02/06 by James.Golding Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3286819 Change 3287427 on 2017/02/06 by James.Golding Fix PoseBlendNode to 'pass through' if no poses are activated Change 3287430 on 2017/02/06 by James.Golding - Add support to PoseDriver for evaluating source bone in the space of a different bone - Fix driven bone adding a scale of 1 - Fix posedriver values 'sticking' (reset all weights to zero each frame) - Move CopyTargetsFromPoseAsset and AutoSetTargetScales from FAnimNode_PoseDriver to UAnimGraphNode_PoseDriver (not required outside editor) - Tranlsation targets now draw larger when selected - 'Copy from pose asset' now also auto-sets radius for you - Remove spammy warnings for missing poses/curves - Add UPoseAsset::GetNumTracks and ::GetFullPose - Remove unused ExtractionContext from UPoseAsset::GetBaseAnimationPose - Remove bIncludeRefPoseAsNeutralPose option (not really useful since we no longer always normalize weights to 1.0) Change 3287496 on 2017/02/06 by Chad.Garyet fixing busted quotes around defaultvalues Change 3287569 on 2017/02/06 by Mieszko.Zielinski Orion BP fixed after deprecating NavigationSystem's BP API #Orion Change 3287595 on 2017/02/06 by Benn.Gallagher BuildPhysX.Automation: Deploying PhysX & NvCloth Win64 Win32 PS4 libs. Built for new NvCloth upgrade Change 3287598 on 2017/02/06 by Benn.Gallagher NvCloth Upgrade to 21604115 Added Linux+Mac support Change 3287710 on 2017/02/06 by Lukasz.Furman added option to disable navlink polys at the end of generated paths #ue4 Change 3287857 on 2017/02/06 by Benn.Gallagher Fixed NvCloth module files to correctly set up linux and mac hopefully Change 3287894 on 2017/02/06 by Benn.Gallagher Another fix to NvCloth build files, didn't get picked up in VS for some reason. Change 3287917 on 2017/02/06 by Lina.Halper Copy from CharacterRigging to Dev-Framework #code review:Thomas.Sarkanen, Martin.Wilson, James.Golding, Andrew.Rodham Change 3287938 on 2017/02/06 by Thomas.Sarkanen Fix crash opening a media sound wave #jira UE-41582 - Editor crashes when running Automation test Change 3287942 on 2017/02/06 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3287682 Change 3288035 on 2017/02/06 by James.Golding Remove C++ GameMode and pawn classes (replace with floating BP instead) Resave anims to remove Orion refs Add simple AnimBP and map for Mambo testing Change 3288036 on 2017/02/06 by Benn.Gallagher Fix to BuildPhysX task to trigger Mac and Linux builds properly Change 3288125 on 2017/02/06 by Ori.Cohen Change PhysXCommon back to dylib Change 3288127 on 2017/02/06 by Benn.Gallagher Fixed project file identification not working for NvCloth under XCode Change 3288156 on 2017/02/06 by Benn.Gallagher Disable "expansion-to-defined" warning in Linux NvCloth builds Change 3288159 on 2017/02/06 by Lina.Halper potential compile fix for Ocean Editor #code review:Thomas.Sarkanen Change 3288190 on 2017/02/06 by Ori.Cohen Link against static PhysXCommon for mac Change 3288200 on 2017/02/06 by Marc.Audy Fix CIS Change 3288270 on 2017/02/06 by Lina.Halper fix compile error #code review:Thomas.Sarkanen, Marc.Audy Change 3288302 on 2017/02/06 by Thomas.Sarkanen Fixed ensure when deselecting bones in anim BP editor #jira UE-41274 - Ensure when clicking in the viewport of an animation blueprint Change 3288348 on 2017/02/06 by Lina.Halper - Enabled control rig - Changed plugin name to be Control Rig Change 3288490 on 2017/02/06 by Benn.Gallagher Fixes for Mac attempting static links against NvCloth and failing to load dynamic libraries. Worked with MasonS to get Mac editor up and running. Change 3288511 on 2017/02/06 by Lina.Halper compile fix Change 3288513 on 2017/02/06 by Lina.Halper Check in content to work with Change 3288615 on 2017/02/06 by Ori.Cohen Fix skeletal mesh not simulating when using an aggregate. #JIRA UE-41593 Change 3288791 on 2017/02/06 by thomas.sarkanen Exposed transforms to cinematics so they can be animated Change 3288795 on 2017/02/06 by Ori.Cohen Fix lock warnings for physx #JIRA UE-41591 Change 3288817 on 2017/02/06 by Charles.Anderson GDC Arcblade setup tests. Change 3288825 on 2017/02/06 by Lina.Halper Fix build issue of shadow variable Change 3289058 on 2017/02/06 by Ori.Cohen Fix crash when immediate mode constraint generates 0 rows. This is a potentially temporary fix until NVIDIA replies with a better solution. #JIRA UE-41026 Change 3289348 on 2017/02/06 by Lina.Halper fix compile issue Change 3289369 on 2017/02/06 by Lina.Halper Renamed leg control to limb control and will be used for arm/feet. - changed vars. - has unused variables that will be used soon but want to check in so that i don't block content change on BaseHuman. #code review:Thomas.Sakanen Change 3289422 on 2017/02/06 by Lina.Halper Fixed IK sinking issue - or moving #code review:Thomas.Sarkanen Change 3289433 on 2017/02/06 by Lina.Halper Fixed real shadow error Change 3289485 on 2017/02/06 by Lina.Halper fixed build issue Change 3289657 on 2017/02/07 by thomas.sarkanen Added rig bone mapping to Ice's skeletal mesh Change 3289658 on 2017/02/07 by thomas.sarkanen Added ControlRig map with Ice setup to pose Change 3289662 on 2017/02/07 by Thomas.Sarkanen Fixed up static analysis warning Change 3289663 on 2017/02/07 by Thomas.Sarkanen Fixed crash when attempting to bind to skeletal mesh with already-set anim BP Anim instance may not have actually been created when binding, so dont dereference it Change 3289717 on 2017/02/07 by Benn.Gallagher Switch Linux NvCloth to static for Linux builds. Adjust lib directory to match actual directory Change 3289718 on 2017/02/07 by Benn.Gallagher BuildPhysX.Automation: Deploying NvCloth Linux_x86_64-unknown-linux-gnu libs. Change 3289744 on 2017/02/07 by Benn.Gallagher Fixed missing masses causing crash initialising clothing actors #jira UE-41599 Change 3289746 on 2017/02/07 by Danny.Bouimad Adding Some Content for JamesG he wanted some nicer looking Pose driver test files. Change 3289756 on 2017/02/07 by danny.bouimad Changing the asset for JamesG. Change 3289785 on 2017/02/07 by James.Golding Replace old PoseDrive test with Danny's new one Change 3289858 on 2017/02/07 by Lina.Halper fixed issue with undo transaction buffer Change 3289860 on 2017/02/07 by Benn.Gallagher Fixed crash after reimporting a clothing asset with the clothing config open and then changing the confg #jira UE-41655 Change 3289912 on 2017/02/07 by Thomas.Sarkanen Merging using Raven_To_Dev-Framework Originally from CLs 3249471, 3258522, 3260271, 3273791: Sequencer: More work supporting array properties more generically + fixes Change 3289962 on 2017/02/07 by James.Golding Add thickness option to DrawWireDiamond Change 3289963 on 2017/02/07 by James.Golding Add spin option to VectorInputBox Change 3289966 on 2017/02/07 by James.Golding Add weight bar chart to PoseDriver details Stop drawing pose weight text in viewport Fix position targets not drawing larger when selected Change 3290094 on 2017/02/07 by Thomas.Sarkanen Fixed typo in filename (fallout from search and replace) Change 3290119 on 2017/02/07 by Thomas.Sarkanen Manipulators can now have their IK/FK space set on them They are not drawn when the space for the chain that they control is not the same as their setting Also fixed a crash with invalid objects when reloading maps. Change 3290145 on 2017/02/07 by Thomas.Sarkanen CIS fix for fallout from Raven changes #jira UE-41670 - Mac editor fails to compile with PropertyTrackEditor errors Change 3290319 on 2017/02/07 by Marc.Audy Make sound player nodes hard reference the assets unless they are in a chain below a quality node. Change 3290484 on 2017/02/07 by Richard.Hinckley Fixing grammar in popup messages. Change 3290533 on 2017/02/07 by Marc.Audy Make GetAIController BlueprintPure #jira UE-41654 Change 3290624 on 2017/02/07 by Marc.Audy Reorder header to avoid include tool warnings Change 3290697 on 2017/02/07 by Lina.Halper - support FK manipulator being in local space - fixed FK key spamming issue for making blend weight to be not keyable - this creates conflicts with enum #code review: Thomas.Sarkanen Change 3290748 on 2017/02/07 by Ori.Cohen Touch immediate mode file to force physx re-link Change 3290807 on 2017/02/07 by Richard.Hinckley #jira UE-39891 Updates to assist in automatic documentation generation. Change 3290946 on 2017/02/07 by Lina.Halper Fix issue of notify looping. #jira: UE-31463 #Code review:Martin.Wilson Change 3291553 on 2017/02/07 by Lina.Halper Rename/move file(s) - modified mesh mapping controller window to be Control Rig Change 3291571 on 2017/02/07 by Lina.Halper added set up spine option #code review:Thomas.Sarkanen Change 3291581 on 2017/02/07 by Ori.Cohen Temporarily turn off phat immediate mode preview which crashes. Change 3291949 on 2017/02/08 by James.Golding Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3291819 Change 3291966 on 2017/02/08 by Lina.Halper Fix issue with notify looping bug #jira: UE-31463 Change 3292247 on 2017/02/08 by Marc.Audy Clean up bad merge caused by Fortnite integration to main Change 3292326 on 2017/02/08 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3292313 Change 3292409 on 2017/02/08 by Marc.Audy Resubmit FortPawn.cpp with proper code even though perforce doesn't think there is a difference since when you sync it, the contents are wrong. Change 3292481 on 2017/02/08 by Ori.Cohen Fix for convex hull cooking (from Josh.S) #JIRA UE-41656 Change 3292492 on 2017/02/08 by Mieszko.Zielinski Redone replacement of deprecated navigation system's BP functions in Fortnite BPs #Fortnite Change 3292778 on 2017/02/08 by Ori.Cohen Touch physx DDC key for new cooking. #JIRA UE-41656 [CL 3293329 by Marc Audy in Main branch]
2017-02-08 17:53:41 -05:00
GizmoLocalBounds( FBox(ForceInit) ),
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bShouldTransformGizmoBeVisible( true ),
TransformGizmoScale( VI::GizmoScaleInDesktop->GetFloat() ),
GizmoType(),
SnapGridActor( nullptr ),
SnapGridMeshComponent( nullptr ),
SnapGridMID( nullptr ),
DraggedInteractable( nullptr ),
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
DefaultMouseCursorInteractor( nullptr ),
DefaultMouseCursorInteractorRefCount( 0 ),
bIsInVR( false ),
bUseInputPreprocessor( false ),
bAllowWorldMovement( true ),
CurrentDeltaTime(0.0f),
bShouldSuppressCursor(false),
CurrentTickNumber(0),
AssetContainer(nullptr),
bPlayNextRefreshTransformGizmoSound(true),
InputProcessor()
{
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
void UViewportWorldInteraction::Init()
{
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
InitColors();
AppTimeEntered = FTimespan::FromSeconds( FApp::GetCurrentTime() );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Setup the asset container.
AssetContainer = LoadAssetContainer();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Start with the default transformer
SetTransformer( nullptr );
//Spawn the transform gizmo at init so we do not hitch when selecting our first object
SpawnTransformGizmoIfNeeded();
const bool bShouldBeVisible = false;
const bool bPropagateToChildren = true;
TransformGizmoActor->GetRootComponent()->SetVisibility( bShouldBeVisible, bPropagateToChildren );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
/** This will make sure this is not ticking after the editor has been closed. */
GEditor->OnEditorClose().AddUObject( this, &UViewportWorldInteraction::Shutdown );
// We need a mouse cursor!
this->AddMouseCursorInteractor();
SetActive(true);
CandidateActors.Reset();
// Create and add the input pre-processor to the slate application.
InputProcessor = MakeShareable(new FViewportInteractionInputProcessor(this));
FSlateApplication::Get().RegisterInputPreProcessor(InputProcessor);
// Pretend that actor selection changed, so that our gizmo refreshes right away based on which objects are selected
GEditor->NoteSelectionChange();
GEditor->SelectNone(true, true, false);
CurrentTickNumber = 0;
}
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
void UViewportWorldInteraction::InitColors()
{
Colors.SetNumZeroed((int32)EColors::TotalCount);
{
Colors[(int32)EColors::DefaultColor] = FLinearColor(0.7f, 0.7f, 0.7f, 1.0f);
Colors[(int32)EColors::Forward] = FLinearColor(0.594f, 0.0197f, 0.0f, 1.0f);
Colors[(int32)EColors::Right] = FLinearColor(0.1349f, 0.3959f, 0.0f, 1.0f);
Colors[(int32)EColors::Up] = FLinearColor(0.0251f, 0.207f, 0.85f, 1.0f);
Colors[(int32)EColors::GizmoHover] = FLinearColor::Yellow;
Colors[(int32)EColors::GizmoDragging] = FLinearColor::Yellow;
}
}
void UViewportWorldInteraction::Shutdown()
{
SetActive(false);
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( DefaultMouseCursorInteractorRefCount == 1 )
{
this->ReleaseMouseCursorInteractor();
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
DestroyActors();
if (DefaultOptionalViewportClient != nullptr)
{
DefaultOptionalViewportClient->ShowWidget(true);
DefaultOptionalViewportClient = nullptr;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
AppTimeEntered = FTimespan::Zero();
for ( UViewportInteractor* Interactor : Interactors )
{
Interactor->Shutdown();
Interactor->MarkAsGarbage();
}
Interactors.Empty();
Transformables.Empty();
Colors.Empty();
Copying //UE4/Release-Staging-4.14 to //UE4/Dev-Main (Source: //UE4/Release-4.14 @ 3195953) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3195953 on 2016/11/12 by Leslie.Nivison Rollback //UE4/Release-4.14/Engine/Plugins/Runtime/Nvidia to changelist 3193712 New GameWorks license from NVIDIA #jira UEPROD-900 Change 3195944 on 2016/11/12 by Leslie.Nivison Removing GameWorks SDK license until we get a new one from NVIDIA #jira UEPROD-900 Change 3195942 on 2016/11/11 by Chris.Gagnon Removing Ansel from 4.14 until revised EULA is handle. #jira UE-none Change 3195431 on 2016/11/11 by Mitchell.Wilson Rebuilt lighting in subway reflections sample #jira UE-38538 Change 3195080 on 2016/11/11 by mason.seay Extended floor to allow more driving space #jira UE-29618 Change 3194886 on 2016/11/11 by Chris.Babcock Correct handling for 6x6 blocksize in ASTC compressor #jira UE-38513 #ue4 #android Change 3193712 on 2016/11/10 by Leslie.Nivison Updating Ansel TPS info per NVIDIA response #jira UEPROD-900 Change 3193691 on 2016/11/10 by Lina.Halper #jira: UE-38488 Change 3193532 on 2016/11/10 by Lauren.Ridge Fix to keep the user in VR editing mode after leaving VR PIE. #jira UE-38317 Change 3193468 on 2016/11/10 by Leslie.Nivison Removing unneeded license #jira UEPROD-900 Change 3193465 on 2016/11/10 by Leslie.Nivison Updating credits for 4.14 #jira UEPROD-902 Change 3193416 on 2016/11/10 by Daniel.Lamb Changed default of exclude editor only content flag. #jira UE-38455 Change 3193399 on 2016/11/10 by Mitchell.Wilson Applied correct material to certain LODs of tree meshes in KiteDemo #jira UE-38472 Change 3193049 on 2016/11/10 by Thomas.Sarkanen Fix disappearing mesh on undo in skeletal mesh editor Also fixes crash on undo in morph target panel #jira UE-38430 - Undo in Skeletal Mesh Editor causes model to disappear #jira UE-38437 - Crash when Undo after editing a weight in Morph Target Previewer Change 3192655 on 2016/11/09 by Ryan.Vance #jira UE-37238 Pulling in 3164679 and 3169467 which didn't make the 4.14 cut. Also changed to a full inverse for InvTranslatedViewProjectionMatrix in FViewMatrices::UpdateViewMatrix. Change 3192613 on 2016/11/09 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3192197 on 2016/11/09 by Daniel.Wright Added SUPPORT_CONTACT_SHADOWS, only standard deferred lighting supports it. Fixes scene depth texture bound in forward shading base pass. #jira UE-38340 Change 3192182 on 2016/11/09 by Rolando.Caloca UE4.14 - Fix recompute tangents not working when skin cache is enabled #jira UE-38398 Change 3191695 on 2016/11/09 by Chris.Wood Editor heartbeat changes for 4.14 [AN-1003] - Make Editor heartbeat 1min [UE-38417] - Editor heartbeat changes (vanilla editor, new interval, debugger attached) Also added IsDebugger, IsVanilla and IntervalSec to Editor.Usage.Heartbeat #jira UE-38417 Change 3191437 on 2016/11/09 by Jack.Porter Fix for LandscapeInfo crash when using Force Delete #jira UE-37172 Change 3191033 on 2016/11/08 by Leslie.Nivison Adding licenses for marketplace plugins #jira UEPROD-901 Change 3191028 on 2016/11/08 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3190632 on 2016/11/08 by mason.seay Updated testmap and assets #jira UE-29618 Change 3190624 on 2016/11/08 by Jamie.Dale Fixed case where FHTML5TargetPlatform::RefreshHTML5Setup could incorrectly add an empty device Changes to UStrProperty::ExportTextItem caused FParse::Value to (correctly) read an empty string for DevicePath which passed the DirectoryExists check (where it would have previously read "))" which would fail that check). #jira UE-38157 Change 3190443 on 2016/11/08 by Josh.Adams - Somehow checking in my tested shelf messed up #jira UE-38304 Change 3190354 on 2016/11/08 by Josh.Adams - Vulkan now always being compiled in, if the SDK exists. Compiling not dependent on project settings #jira UE-38304 Change 3190123 on 2016/11/08 by zachary.wilson Updating testing content for sureface per-pixel improvements #jira UE-29618 Change 3190113 on 2016/11/08 by Alexis.Matte Make sure the default light map channel is 1 and not 0 #jira UE-35627 Change 3190102 on 2016/11/08 by Dmitry.Rekman Linux: default to binned everywhere (UE-38287). - Fixes suspicious crashes happening in uncooked build. Workaround, needs separate investigation. #jira UE-38287 Change 3190000 on 2016/11/08 by Allan.Bentham Removed old protostar loadmap hack. #jira UE-38342 Change 3189914 on 2016/11/08 by Allan.Bentham Fix vulkan crash when rendering sky capture. Fix crash when rendering LDR scene capture on device. #jira UE-38291 Change 3189861 on 2016/11/08 by Thomas.Sarkanen Fix out of bounds access when using hidden bones with master pose components Code was trying to to access the ReferenceToLocal array using a parent index from the master pose component. Now changed to only use indices known to be valid (i.e. this component's) to index the ReferenceToLocal array. Bone visibility is still master-authoratitive. #jira UE-38214 - [CrashReport] UE4Editor_Engine!UpdateRefToLocalMatrices() [skeletalrender.cpp:238] Change 3189370 on 2016/11/07 by Daniel.Wright Only check transform mismatches for static lighting in UStaticMeshComponent::ApplyComponentInstanceData on components that actually can have static lighting #jira UE-38272 Change 3189358 on 2016/11/07 by Mark.Satterthwaite Intel Metal drivers can no longer compile our compute shaders reliably meaning Intel Macs must always use Metal SM4 as otehrwise they will crash. #jira UE-38299 Change 3189273 on 2016/11/07 by Rolando.Caloca UE4.14 - Integrate fix from 3161219 #jira UE-38270 Change 3189084 on 2016/11/07 by Chris.Bunner Fix RemoveAAJitter from projection matrix. #jira UE-37701, UE-38003 Change 3188636 on 2016/11/07 by Allan.Bentham use glVertexAttribIPointer only on ES3.1 enabled projects. #jira UE-38241 Change 3188596 on 2016/11/07 by Yannick.Lange VR Editor: Fix crash when closing window while in VR Editor #jira UE-37995 Change 3188433 on 2016/11/07 by Matthew.Griffin Add starter content .upack files to starter_content tag so that they should still be installed if templates/feature packs option is de-selected in the Launcher Change 3187739 on 2016/11/04 by Mitchell.Wilson Updating DefautlEditor and DefaultEngine ini to correct path to VehicleMenu level. #jira UE-29748 Change 3187536 on 2016/11/04 by Martin.Wilson Fix for "Renaming a montage section via its details panel doesn't update the section correctly" #jira UE-35929 Change 3187499 on 2016/11/04 by zachary.wilson Checking in content fixes for Lighting Scenarios test level #jira UE-29618 Change 3187492 on 2016/11/04 by mason.seay Updated map to improve testing #jira UE-29618 Change 3187438 on 2016/11/04 by Nick.Shin fix html5 port number for cook-on-the-fly option #jira UE-38032 - Quicklaunch HTML5 fails on Chrome. Browser returns "This site can't be reached 127.0.0.1 refused to connect" Change 3187305 on 2016/11/04 by Martin.Wilson Fix log spam from animation sequence thumbnails #jira UE-38224 Change 3187260 on 2016/11/04 by Lauren.Ridge Fix for crash on opening a level in VR Editing mode. When closing VREditorMode for a level load, HMD no longer leaves stereo mode. #jira UE-32541 Change 3187224 on 2016/11/04 by Robert.Manuszewski Proper fix for a crash when launching BP-only project from the Editor with EDL enabled (does not modify UE4Game target binaries) #jira UE-37617 Change 3187136 on 2016/11/04 by Alexis.Matte Fbx importer for static mesh, make sure that we order the materials array to follow the section order. #jira UE-38242 Change 3187065 on 2016/11/04 by Mitchell.Wilson Updated BP_Commentary_Box to resolve warnings with array if the box opens then closes before the text is rendered. #jira UE-38266 Change 3187056 on 2016/11/04 by Mike.Beach Guarding against a rare crash that occurs when compiling a Blueprint after hot-reload. GUnrealEd was null, which is concerning (as it could have resounding effects in other systems), but as I could not repro it more than once (to figure it out more) I simply guarded the use of a null pointer here. #jira UE-38198 Change 3187040 on 2016/11/04 by Matthew.Griffin Corrected path to DotNETCommon folder Exclude all editor plugin pdbs from stripping #jira UE-37072 Change 3186984 on 2016/11/04 by Marc.Audy Fix crash when null component considered #jira UE-36493 Change 3186600 on 2016/11/04 by Max.Chen Sequencer: Fix crash in sequencer editor mode. #jira UE-38205 Change 3186564 on 2016/11/04 by Nick.Shin checking in latest physx libs for html5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186258 on 2016/11/03 by Nick.Shin fix for automation build to handle deleting of windows x86 & x64 libs properly #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186225 on 2016/11/03 by Lauren.Ridge Fix for foliage brush not showing up until after first motion controller click. #jira UE-38002 Change 3186100 on 2016/11/03 by Chris.Babcock Update local notifications to deal with depreciated API #jira UE-38236 #ue4 #android Change 3186074 on 2016/11/03 by Mitchell.Wilson Rebuilt lighting in Content Examples Welcome level #jira UE-38239 Change 3185923 on 2016/11/03 by Lina.Halper Fixed issue with animation not ticking in inactive world causing it to update parent animation #jira: UE-37933 Change 3185764 on 2016/11/03 by Mitchell.Wilson Updating deprecated node in MyCharacter_UMG. #jira UE-38229 Change 3185683 on 2016/11/03 by Nick.Shin non SSE2 version of PhysX for HTML5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3185492 on 2016/11/03 by Ben.Woodhouse Workaround for very high render query memory overhead on D3D12. Add a cvar to limit timestamp queries allocated by the GPU profiler in a given frame. On D3D12 this limit is 1024 - other RHIs remain unbounded. Currently render queries are 64KB each on D3D12, so this prevents high memory overhead on particular frames, e.g when we render a large number of reflection captures. In practice, most frames are under 400 queries, so in practice we shouldn't hit the limit except in extreme cases. #jira UE-38139 Change 3185481 on 2016/11/03 by Dmitry.Rekman Remove version number from Linux README (UE-38059). #jira UE-38059 Change 3185322 on 2016/11/03 by Ryan.Gerleve Allow path names in NetFieldExportGroups to be remapped on the client. #jira UE-37990 Change 3185293 on 2016/11/03 by Matthew.Griffin Exclude UnrealControls and iPhonePackager from Build Tools CS node on non-Windows platforms as they don't compile #jira UE-34016 Change 3185252 on 2016/11/03 by Michael.Trepka Properly revert to OpenGL on Macs that do not support Metal #jira UE-38190 Change 3184835 on 2016/11/03 by Jurre.deBaare Crash when using undo in the preview scene settings of Persona #fix Ensure that the profile index is valid after undo-ing #misc Added transactions for adding/remove of the profiles #jira UE-38142 Change 3184833 on 2016/11/03 by Jack.Porter Fixed crash when ENABLE_VERIFY_GL and r.MobileOnChipMSAA is enabled on Android #jira UE-38186 Change 3184418 on 2016/11/02 by Ryan.Vance #jira UE-38161 Adding ISceneViewExtension::UsePostInitView which will be used to enable/disable the usage of PostRenderViewFamily_RenderThread and PostRenderView_RenderThread which was added earlier. We need to enable this behavior based on the hmd's compositor behavior, so a simple cvar wont work. I missed the PostPresent implementation for steamvr in the earlier check in. Change 3184286 on 2016/11/02 by Dan.Oconnor Fix for IsValidLowLevel check being rotten. More correct fix will go into Dev-BP, but this is a low risk stop-gap #jira UE-38149 Change 3184283 on 2016/11/02 by Arne.Schober DR - UE-38155 replicated MS CL 3183837 - PSO Dangling Pointers: The PSO cache was returning pointers out of a Map which is based on a sparse Array and those pointers could become invalid if other insertions happen. #jira UE-38155 Change 3184244 on 2016/11/02 by Richard.Ugarte #jira UE-37534 Checking in updated UE4_Demo_Head_D on behalf of MikeB Change 3184171 on 2016/11/02 by Michael.Trepka Made Mac CrashReportClient high-DPI aware and fixed high-DPI handling in FMacWindow::IsPointInWindow() #jira UE-37697 Change 3184126 on 2016/11/02 by Lauren.Ridge VR Editor: Fixes for foliage painting only working on one controller, and for full press not painting foliage. #jira UE-38147 #jira UE-38002 Change 3183997 on 2016/11/02 by Mitchell.Wilson Scaled and Rotated 3d Widget to the correct position on example 2.3 in Content Examples UMG. Adjusted collision on example 1.4 in Content Examples Physics. Updated collision on SM_ExampleMesh_Rocket. Realigned some text render actors in Content Examples Post Process. #jira UE-38099 UE-38078 UE-38064 Change 3183945 on 2016/11/02 by Mieszko.Zielinski Fixed changing AreaClass of NavLinkProxy point links not having any effect on navmesh generation #UE4 #jira UE-38137 Change 3183906 on 2016/11/02 by Nick.Shin for OSX (release-4.14 stream): new OSX clang (from emscripten tool chain) configured by jukka from Mozilla see Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/incoming/EPIC_VERSION for details on where did this version come from fixes for OSX -- update existing (bash shell script and UE4 c#) build files to use the new "incoming" emsdk #jira UE-37329 - Step 'Compile UE4Game HTML5' - 300 Warnings Change 3183899 on 2016/11/02 by Mieszko.Zielinski Fixed EQS debugger not drawing item labels #UE4 #jira UE-38122 Change 3183239 on 2016/11/02 by Peter.Sauerbrei fix for mobile provision with UUID only filename being allowed again by copying them to a new file name which allows them to be used. #jira UE-38006 Change 3183149 on 2016/11/02 by Luke.Thatcher [RELEASE] [SHOOTERGAME] [!] Fix "Is Talking" icon on ShooterGame scoreboard, after PS4 OSS refactor. - ShooterGame was comparing FUniqueNetId::ToString() against AShooterPlayerState::GetShortPlayerName(). - This is wrong, since the NetId is not guaranteed to be equal to the player's name. #jira UE-38011 Change 3183005 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [^] Merging (as edit) PS4 OSS fixes from Engine to OrionGame. #jira UE-38017 UE-38020 Original Changelists: 3182765 [RELEASE] [PS4] [~] Additional logging for PS4 OSS "Play Together". 3182766 [RELEASE] [PS4] [!] Fix assert in FUniqueNetIdPS4::FindOrCreate. We were assuming an online-only ID could never become a local ID. This isn't the case in the following scenario: - Two users join a session on two separate PS4s. - One user signs into the other user's PS4 with the same account, with a second controller. PSN logs him out of the first PS4. - That user's Net ID has now migrated from being online-only, to local-with-online. This is a case that was not handled. 3182767 [RELEASE] [PS4] [!] Fix PS4 session invitations. - Was calling old Web API with SceNpOnlineId where SceNpAccountId is needed. - Replaced with NpToolkit2's session invitation API. 3182892 [RELEASE] [PS4] [!] Fix incorrect identity API implementation in PS4 OSS. - System events directly drive the login state of a user. This also removes the blocking call to sceNpGetState(). - GetAuthToken is only called if the engine calls IOnlineIdentity::Login(). 3182951 [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). Change 3182992 on 2016/11/02 by Nick.Darnell UMG Editor - Fixing a regression with the editor, closing the sequencer tab and reopening the editor should no longer cause a crash. #jira UE-38098 Change 3182951 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). #jira UE-38017 [CL 3201696 by Matthew Griffin in Main branch]
2016-11-17 04:29:30 -05:00
OnHoverUpdateEvent.Clear();
OnPreviewInputActionEvent.Clear();
Copying //UE4/Release-Staging-4.14 to //UE4/Dev-Main (Source: //UE4/Release-4.14 @ 3195953) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3195953 on 2016/11/12 by Leslie.Nivison Rollback //UE4/Release-4.14/Engine/Plugins/Runtime/Nvidia to changelist 3193712 New GameWorks license from NVIDIA #jira UEPROD-900 Change 3195944 on 2016/11/12 by Leslie.Nivison Removing GameWorks SDK license until we get a new one from NVIDIA #jira UEPROD-900 Change 3195942 on 2016/11/11 by Chris.Gagnon Removing Ansel from 4.14 until revised EULA is handle. #jira UE-none Change 3195431 on 2016/11/11 by Mitchell.Wilson Rebuilt lighting in subway reflections sample #jira UE-38538 Change 3195080 on 2016/11/11 by mason.seay Extended floor to allow more driving space #jira UE-29618 Change 3194886 on 2016/11/11 by Chris.Babcock Correct handling for 6x6 blocksize in ASTC compressor #jira UE-38513 #ue4 #android Change 3193712 on 2016/11/10 by Leslie.Nivison Updating Ansel TPS info per NVIDIA response #jira UEPROD-900 Change 3193691 on 2016/11/10 by Lina.Halper #jira: UE-38488 Change 3193532 on 2016/11/10 by Lauren.Ridge Fix to keep the user in VR editing mode after leaving VR PIE. #jira UE-38317 Change 3193468 on 2016/11/10 by Leslie.Nivison Removing unneeded license #jira UEPROD-900 Change 3193465 on 2016/11/10 by Leslie.Nivison Updating credits for 4.14 #jira UEPROD-902 Change 3193416 on 2016/11/10 by Daniel.Lamb Changed default of exclude editor only content flag. #jira UE-38455 Change 3193399 on 2016/11/10 by Mitchell.Wilson Applied correct material to certain LODs of tree meshes in KiteDemo #jira UE-38472 Change 3193049 on 2016/11/10 by Thomas.Sarkanen Fix disappearing mesh on undo in skeletal mesh editor Also fixes crash on undo in morph target panel #jira UE-38430 - Undo in Skeletal Mesh Editor causes model to disappear #jira UE-38437 - Crash when Undo after editing a weight in Morph Target Previewer Change 3192655 on 2016/11/09 by Ryan.Vance #jira UE-37238 Pulling in 3164679 and 3169467 which didn't make the 4.14 cut. Also changed to a full inverse for InvTranslatedViewProjectionMatrix in FViewMatrices::UpdateViewMatrix. Change 3192613 on 2016/11/09 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3192197 on 2016/11/09 by Daniel.Wright Added SUPPORT_CONTACT_SHADOWS, only standard deferred lighting supports it. Fixes scene depth texture bound in forward shading base pass. #jira UE-38340 Change 3192182 on 2016/11/09 by Rolando.Caloca UE4.14 - Fix recompute tangents not working when skin cache is enabled #jira UE-38398 Change 3191695 on 2016/11/09 by Chris.Wood Editor heartbeat changes for 4.14 [AN-1003] - Make Editor heartbeat 1min [UE-38417] - Editor heartbeat changes (vanilla editor, new interval, debugger attached) Also added IsDebugger, IsVanilla and IntervalSec to Editor.Usage.Heartbeat #jira UE-38417 Change 3191437 on 2016/11/09 by Jack.Porter Fix for LandscapeInfo crash when using Force Delete #jira UE-37172 Change 3191033 on 2016/11/08 by Leslie.Nivison Adding licenses for marketplace plugins #jira UEPROD-901 Change 3191028 on 2016/11/08 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3190632 on 2016/11/08 by mason.seay Updated testmap and assets #jira UE-29618 Change 3190624 on 2016/11/08 by Jamie.Dale Fixed case where FHTML5TargetPlatform::RefreshHTML5Setup could incorrectly add an empty device Changes to UStrProperty::ExportTextItem caused FParse::Value to (correctly) read an empty string for DevicePath which passed the DirectoryExists check (where it would have previously read "))" which would fail that check). #jira UE-38157 Change 3190443 on 2016/11/08 by Josh.Adams - Somehow checking in my tested shelf messed up #jira UE-38304 Change 3190354 on 2016/11/08 by Josh.Adams - Vulkan now always being compiled in, if the SDK exists. Compiling not dependent on project settings #jira UE-38304 Change 3190123 on 2016/11/08 by zachary.wilson Updating testing content for sureface per-pixel improvements #jira UE-29618 Change 3190113 on 2016/11/08 by Alexis.Matte Make sure the default light map channel is 1 and not 0 #jira UE-35627 Change 3190102 on 2016/11/08 by Dmitry.Rekman Linux: default to binned everywhere (UE-38287). - Fixes suspicious crashes happening in uncooked build. Workaround, needs separate investigation. #jira UE-38287 Change 3190000 on 2016/11/08 by Allan.Bentham Removed old protostar loadmap hack. #jira UE-38342 Change 3189914 on 2016/11/08 by Allan.Bentham Fix vulkan crash when rendering sky capture. Fix crash when rendering LDR scene capture on device. #jira UE-38291 Change 3189861 on 2016/11/08 by Thomas.Sarkanen Fix out of bounds access when using hidden bones with master pose components Code was trying to to access the ReferenceToLocal array using a parent index from the master pose component. Now changed to only use indices known to be valid (i.e. this component's) to index the ReferenceToLocal array. Bone visibility is still master-authoratitive. #jira UE-38214 - [CrashReport] UE4Editor_Engine!UpdateRefToLocalMatrices() [skeletalrender.cpp:238] Change 3189370 on 2016/11/07 by Daniel.Wright Only check transform mismatches for static lighting in UStaticMeshComponent::ApplyComponentInstanceData on components that actually can have static lighting #jira UE-38272 Change 3189358 on 2016/11/07 by Mark.Satterthwaite Intel Metal drivers can no longer compile our compute shaders reliably meaning Intel Macs must always use Metal SM4 as otehrwise they will crash. #jira UE-38299 Change 3189273 on 2016/11/07 by Rolando.Caloca UE4.14 - Integrate fix from 3161219 #jira UE-38270 Change 3189084 on 2016/11/07 by Chris.Bunner Fix RemoveAAJitter from projection matrix. #jira UE-37701, UE-38003 Change 3188636 on 2016/11/07 by Allan.Bentham use glVertexAttribIPointer only on ES3.1 enabled projects. #jira UE-38241 Change 3188596 on 2016/11/07 by Yannick.Lange VR Editor: Fix crash when closing window while in VR Editor #jira UE-37995 Change 3188433 on 2016/11/07 by Matthew.Griffin Add starter content .upack files to starter_content tag so that they should still be installed if templates/feature packs option is de-selected in the Launcher Change 3187739 on 2016/11/04 by Mitchell.Wilson Updating DefautlEditor and DefaultEngine ini to correct path to VehicleMenu level. #jira UE-29748 Change 3187536 on 2016/11/04 by Martin.Wilson Fix for "Renaming a montage section via its details panel doesn't update the section correctly" #jira UE-35929 Change 3187499 on 2016/11/04 by zachary.wilson Checking in content fixes for Lighting Scenarios test level #jira UE-29618 Change 3187492 on 2016/11/04 by mason.seay Updated map to improve testing #jira UE-29618 Change 3187438 on 2016/11/04 by Nick.Shin fix html5 port number for cook-on-the-fly option #jira UE-38032 - Quicklaunch HTML5 fails on Chrome. Browser returns "This site can't be reached 127.0.0.1 refused to connect" Change 3187305 on 2016/11/04 by Martin.Wilson Fix log spam from animation sequence thumbnails #jira UE-38224 Change 3187260 on 2016/11/04 by Lauren.Ridge Fix for crash on opening a level in VR Editing mode. When closing VREditorMode for a level load, HMD no longer leaves stereo mode. #jira UE-32541 Change 3187224 on 2016/11/04 by Robert.Manuszewski Proper fix for a crash when launching BP-only project from the Editor with EDL enabled (does not modify UE4Game target binaries) #jira UE-37617 Change 3187136 on 2016/11/04 by Alexis.Matte Fbx importer for static mesh, make sure that we order the materials array to follow the section order. #jira UE-38242 Change 3187065 on 2016/11/04 by Mitchell.Wilson Updated BP_Commentary_Box to resolve warnings with array if the box opens then closes before the text is rendered. #jira UE-38266 Change 3187056 on 2016/11/04 by Mike.Beach Guarding against a rare crash that occurs when compiling a Blueprint after hot-reload. GUnrealEd was null, which is concerning (as it could have resounding effects in other systems), but as I could not repro it more than once (to figure it out more) I simply guarded the use of a null pointer here. #jira UE-38198 Change 3187040 on 2016/11/04 by Matthew.Griffin Corrected path to DotNETCommon folder Exclude all editor plugin pdbs from stripping #jira UE-37072 Change 3186984 on 2016/11/04 by Marc.Audy Fix crash when null component considered #jira UE-36493 Change 3186600 on 2016/11/04 by Max.Chen Sequencer: Fix crash in sequencer editor mode. #jira UE-38205 Change 3186564 on 2016/11/04 by Nick.Shin checking in latest physx libs for html5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186258 on 2016/11/03 by Nick.Shin fix for automation build to handle deleting of windows x86 & x64 libs properly #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186225 on 2016/11/03 by Lauren.Ridge Fix for foliage brush not showing up until after first motion controller click. #jira UE-38002 Change 3186100 on 2016/11/03 by Chris.Babcock Update local notifications to deal with depreciated API #jira UE-38236 #ue4 #android Change 3186074 on 2016/11/03 by Mitchell.Wilson Rebuilt lighting in Content Examples Welcome level #jira UE-38239 Change 3185923 on 2016/11/03 by Lina.Halper Fixed issue with animation not ticking in inactive world causing it to update parent animation #jira: UE-37933 Change 3185764 on 2016/11/03 by Mitchell.Wilson Updating deprecated node in MyCharacter_UMG. #jira UE-38229 Change 3185683 on 2016/11/03 by Nick.Shin non SSE2 version of PhysX for HTML5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3185492 on 2016/11/03 by Ben.Woodhouse Workaround for very high render query memory overhead on D3D12. Add a cvar to limit timestamp queries allocated by the GPU profiler in a given frame. On D3D12 this limit is 1024 - other RHIs remain unbounded. Currently render queries are 64KB each on D3D12, so this prevents high memory overhead on particular frames, e.g when we render a large number of reflection captures. In practice, most frames are under 400 queries, so in practice we shouldn't hit the limit except in extreme cases. #jira UE-38139 Change 3185481 on 2016/11/03 by Dmitry.Rekman Remove version number from Linux README (UE-38059). #jira UE-38059 Change 3185322 on 2016/11/03 by Ryan.Gerleve Allow path names in NetFieldExportGroups to be remapped on the client. #jira UE-37990 Change 3185293 on 2016/11/03 by Matthew.Griffin Exclude UnrealControls and iPhonePackager from Build Tools CS node on non-Windows platforms as they don't compile #jira UE-34016 Change 3185252 on 2016/11/03 by Michael.Trepka Properly revert to OpenGL on Macs that do not support Metal #jira UE-38190 Change 3184835 on 2016/11/03 by Jurre.deBaare Crash when using undo in the preview scene settings of Persona #fix Ensure that the profile index is valid after undo-ing #misc Added transactions for adding/remove of the profiles #jira UE-38142 Change 3184833 on 2016/11/03 by Jack.Porter Fixed crash when ENABLE_VERIFY_GL and r.MobileOnChipMSAA is enabled on Android #jira UE-38186 Change 3184418 on 2016/11/02 by Ryan.Vance #jira UE-38161 Adding ISceneViewExtension::UsePostInitView which will be used to enable/disable the usage of PostRenderViewFamily_RenderThread and PostRenderView_RenderThread which was added earlier. We need to enable this behavior based on the hmd's compositor behavior, so a simple cvar wont work. I missed the PostPresent implementation for steamvr in the earlier check in. Change 3184286 on 2016/11/02 by Dan.Oconnor Fix for IsValidLowLevel check being rotten. More correct fix will go into Dev-BP, but this is a low risk stop-gap #jira UE-38149 Change 3184283 on 2016/11/02 by Arne.Schober DR - UE-38155 replicated MS CL 3183837 - PSO Dangling Pointers: The PSO cache was returning pointers out of a Map which is based on a sparse Array and those pointers could become invalid if other insertions happen. #jira UE-38155 Change 3184244 on 2016/11/02 by Richard.Ugarte #jira UE-37534 Checking in updated UE4_Demo_Head_D on behalf of MikeB Change 3184171 on 2016/11/02 by Michael.Trepka Made Mac CrashReportClient high-DPI aware and fixed high-DPI handling in FMacWindow::IsPointInWindow() #jira UE-37697 Change 3184126 on 2016/11/02 by Lauren.Ridge VR Editor: Fixes for foliage painting only working on one controller, and for full press not painting foliage. #jira UE-38147 #jira UE-38002 Change 3183997 on 2016/11/02 by Mitchell.Wilson Scaled and Rotated 3d Widget to the correct position on example 2.3 in Content Examples UMG. Adjusted collision on example 1.4 in Content Examples Physics. Updated collision on SM_ExampleMesh_Rocket. Realigned some text render actors in Content Examples Post Process. #jira UE-38099 UE-38078 UE-38064 Change 3183945 on 2016/11/02 by Mieszko.Zielinski Fixed changing AreaClass of NavLinkProxy point links not having any effect on navmesh generation #UE4 #jira UE-38137 Change 3183906 on 2016/11/02 by Nick.Shin for OSX (release-4.14 stream): new OSX clang (from emscripten tool chain) configured by jukka from Mozilla see Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/incoming/EPIC_VERSION for details on where did this version come from fixes for OSX -- update existing (bash shell script and UE4 c#) build files to use the new "incoming" emsdk #jira UE-37329 - Step 'Compile UE4Game HTML5' - 300 Warnings Change 3183899 on 2016/11/02 by Mieszko.Zielinski Fixed EQS debugger not drawing item labels #UE4 #jira UE-38122 Change 3183239 on 2016/11/02 by Peter.Sauerbrei fix for mobile provision with UUID only filename being allowed again by copying them to a new file name which allows them to be used. #jira UE-38006 Change 3183149 on 2016/11/02 by Luke.Thatcher [RELEASE] [SHOOTERGAME] [!] Fix "Is Talking" icon on ShooterGame scoreboard, after PS4 OSS refactor. - ShooterGame was comparing FUniqueNetId::ToString() against AShooterPlayerState::GetShortPlayerName(). - This is wrong, since the NetId is not guaranteed to be equal to the player's name. #jira UE-38011 Change 3183005 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [^] Merging (as edit) PS4 OSS fixes from Engine to OrionGame. #jira UE-38017 UE-38020 Original Changelists: 3182765 [RELEASE] [PS4] [~] Additional logging for PS4 OSS "Play Together". 3182766 [RELEASE] [PS4] [!] Fix assert in FUniqueNetIdPS4::FindOrCreate. We were assuming an online-only ID could never become a local ID. This isn't the case in the following scenario: - Two users join a session on two separate PS4s. - One user signs into the other user's PS4 with the same account, with a second controller. PSN logs him out of the first PS4. - That user's Net ID has now migrated from being online-only, to local-with-online. This is a case that was not handled. 3182767 [RELEASE] [PS4] [!] Fix PS4 session invitations. - Was calling old Web API with SceNpOnlineId where SceNpAccountId is needed. - Replaced with NpToolkit2's session invitation API. 3182892 [RELEASE] [PS4] [!] Fix incorrect identity API implementation in PS4 OSS. - System events directly drive the login state of a user. This also removes the blocking call to sceNpGetState(). - GetAuthToken is only called if the engine calls IOnlineIdentity::Login(). 3182951 [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). Change 3182992 on 2016/11/02 by Nick.Darnell UMG Editor - Fixing a regression with the editor, closing the sequencer tab and reopening the editor should no longer cause a crash. #jira UE-38098 Change 3182951 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). #jira UE-38017 [CL 3201696 by Matthew Griffin in Main branch]
2016-11-17 04:29:30 -05:00
OnInputActionEvent.Clear();
OnKeyInputEvent.Clear();
OnAxisInputEvent.Clear();
OnStopDraggingEvent.Clear();
TransformGizmoActor = nullptr;
SnapGridActor = nullptr;
SnapGridMeshComponent = nullptr;
SnapGridMID = nullptr;
DraggedInteractable = nullptr;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( ViewportTransformer != nullptr )
{
ViewportTransformer->Shutdown();
ViewportTransformer = nullptr;
}
AssetContainer = nullptr;
GizmoType.Reset();
// Remove the input pre-processor
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
if (InputProcessor.IsValid() && FSlateApplication::IsInitialized())
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4279600) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4073383 by Patrick.Boutot [AJA] Set base timecode for AJA TimecodeProvider Change 4075631 by Patrick.Boutot Change icon for TimecodeSynchronizer. Update TimecodeSynchronizer with the new AJA delayed open sources. Add TimecodeProvider to TimecodeSynchronizer. Can now sync with TimecodeProvider or a master. Make sure the source are ready before viewing them. Remove PreRoll command. Change 4077328 by JeanMichel.Dignard Fixed SoftObjectPtr/Paths becoming invalid when saving a new world since it's being moved from /Temp/Untitled to its own package. #jira UEENT-1423 Change 4077338 by Rex.Hill USD plugin updated to v8.4 with python support Change 4079063 by Rex.Hill USD sdk recompiled as vs2015 targeting older version of CRT, also dependency added for PythonScriptPlugin Change 4079911 by Rex.Hill USD pyd files recompiled Change 4080058 by Rex.Hill Fix usd plugin loading, added missing libtrace.dll Change 4080376 by Matt.Hoffman Improvements to Sequence Recorder's public API to expose more functionality for third parties. Change 4084984 by Matt.Hoffman Sequence Recorder can now set a global time dilation when recording starts, optionally ignoring the dilation when recording keys. This is useful for recording objects in your scene that move too fast to track with a camera but still ending up with the same length recording in the end. #jira UESP-670 Change 4086688 by Matt.Hoffman Exposes getting and setting keys from sequencer sections via the scripting layer. Examples for how to work with Python and key data can be found in /Plugins/MovieScene/SequencerScripting/Content/Python in the form of "sequencer_examples.py" and "sequencer_key_examples.py". Documentation on how to use these examples is included in the python file. #jira UESP-547 Change 4088904 by Max.Chen Sequence Recorder: Set actor tags as unique Change 4089176 by Max.Chen Sequence Recorder: Add option to record to the target level sequence playback range length. Change 4089180 by Max.Chen Sequence Recorder: Add protection agains null movie scene sections Change 4089205 by Max.Chen Sequence Recorder: Save recorded audio files if auto save is on. #jira UESP-660 Change 4089206 by Max.Chen Sequencer: When importing fbx, if a camera is created, force mapping to be by name matching only so that other nodes in the fbx file do not get mapped onto the newly created camera. #jira UE-59347 Change 4089214 by Max.Chen Sequence Recorder: Add support for looping/rolling takes #jira UESP-658 Change 4089280 by Max.Chen Sequence Recorder: Added support to specify properties from actor classes (camera rig rail - current position on rail) Change 4093824 by Andrew.Rodham Editor: Added option to class pickers to force use of class Display Names Change 4093826 by Andrew.Rodham Removed implicit gamma to linear conversion from EXR writer - This was only implemented for exr data that was supplied as 8 bits per channel (ie. uint8), but there is no way of communicating with the Image Writer API to tell it whether you want it to do that conversion. This code is too low level to be making assumptions about what color-space the data is in. - This ensures that R8G8B8A8 render targets exported as EXR are exported as-is without any modification #jira UESP-545 Change 4093830 by Andrew.Rodham Fixed shutdown crash when destroying a media player that was still playing Change 4093831 by Andrew.Rodham Fixed exception handling in png image wrapper Change 4093833 by Andrew.Rodham Slate: Fixed not being able to set a hyperlink on notifications with unbound attributes that had explicit values set Change 4093841 by Andrew.Rodham Added a utility struct for dealing with editor actor layers from within Blueprints Change 4093867 by Andrew.Rodham Sequencer: Added the ability to implement custom capture protocols for movie scene captures - Converted capture protocol settings and instances to be single UObjects. This unifies the two concepts, and allows for Blueprint implementations. - Removed capture protocol registry since it is no longer required. - Removed FCaptureProtocolID in favor of class discovery at runtime. - Added new module "ImageWriteQueue", responsible for asynchronously managing a queue of image file write operations. - Added new capture protocol for capturing final pixels to EXR (including burn-ins) - Added a new BP function, ExportToDisk, accessible on all UTexture properties for writing texture and render target data to image files - New global BP nodes for querying movie capture status: IsCaptureInProgress, FindCaptureProtocol - Removed Flush On Draw functionality from viewports and frame grabber since it is unnecessary. #jira UESP-545 Change 4094239 by Rex.Hill Export sequence to usd #jira UESP-563 Change 4094393 by Andrew.Rodham Renamed references of 'BufferName' to 'StreamName' for user defined capture protocols Change 4094622 by Patrick.Boutot Add MediaFrameworkUtilitites plugin. Add MediaBundle. An asset that create a MediaPlayer, MediaSource, MediaTexture and MaterialInstance. Add MediaBundleActor. Can auto play a MediaBundle when click & drag in the viewport. Add the Media category in placement mode. Add flag on the MediaPlayer that prevent it from closing when PIE is started or closed. Change 4094673 by Anousack.Kitisa Created widget to display metadata as list view of tags/values. #jira UEENT-1296 Change 4094795 by Simon.Therriault MediaFrameworkUtilities - Adding default media texture for default media bundle material - Changed default material to unlit Change 4094867 by Rex.Hill Usd sequence exporter camera rotation corrected Change 4096426 by JeanLuc.Corenthin - Fixed logic of FLayoutUV::FindCharts to properly extract the list of triangles based on a mesh description. - Fixed logic in FMeshDescriptionOperations::ConverToRawMesh & FMeshDescriptionOperations::ConvertHardEdgesToSmoothGroup to take in account the fact that the arrays are sparse arrays - Fixed logic in FQuadricSimplifierMeshReduction::ReduceMeshDescription which wrongly assumed that number of vertex instances equals three times the number of triangles. - Added early-out in UMeshDescription::ComputePolygonTriangulation when perimeter has 3 vertex indices - Changed version of static mesh and mesh description - Fixed issue with mismatching attribute set when generating LOD meshes #jira UEENT-887, UE-59474, UE-59471 Change 4097101 by Patrick.Boutot Remove warning in PropertyEditorClass when trying to load the "None" class. Change 4097443 by Rex.Hill USD export bake keys Change 4097468 by Patrick.Boutot Edit and initialize the timecode provider of the editor. Change 4097479 by Anousack.Kitisa Added support for commandlet and unattended script modes to Plugin Warden. #jira UE-57333 Change 4097578 by Rex.Hill USD export tweaks Change 4098257 by Simon.Therriault GarbageMatteCaptureComponent - Adding spawned actor tracking to be able to use GarbageMatteActor spawned in editor. Change 4100072 by Jamie.Dale Updated wrapped enums to be more consistent with native Python enums - Wrapped enums now generate values that are instances of the enum type itself, containing a name and value field (like native Python enums). - Wrapped enums are now strongly typed and do not allow implicit conversion from numbers (explicit casting is available, but throws if the value is unknown). - Wrapped enum entries may be compared against numbers (even numbers that don't have valid values) via the == and != operators (like IntEnum in Python). - Wrapped enums may now be iterated (like native Python enums). - Wrapped enums now return a length based on their number of entries (like native Python enums). - ScriptName meta-data can now be used with enum entries. Change 4100255 by Patrick.Boutot [MediaBundle] Modify the base shader to support "failed texture" Change 4103838 by Simon.Therriault MR Garbage Matte Component - Adding FocalDriver interface to be able to poll focal information from outside (cinecamera). Could be updated to be event driven. Change 4115616 by Rex.Hill USD Exporter now exposed to UI Change 4116333 by Simon.Therriault MediaBundle - Updated default media bundle to include lens distortion and chromakeying - Added possibility to spawn material editor for MediaBundle inner material - Fix for inner objects flags preventing asset deletion - Fix for CloseMedia not being called when changing map Lens Distortion - Fix for not being able to generate a Identity lens displacement map Change 4117952 by Rex.Hill Expose OpenEditorForAssets to python Change 4118498 by Rex.Hill Sequencer USD export can now export properties of actors in levels Change 4118515 by Rex.Hill Update sequencer export task comment Change 4118706 by Rex.Hill Sequencer USD updates Change 4118968 by Rex.Hill Sequencer USD export now supports visibility Change 4119702 by Simon.Therriault MediaBundle - Fix crash when changing MediaBundle on Actor multiple times. - Fix crash when Undoing after placing a MediaBundle and pressing Stop then Undo. - Fixed bad reference count in MediaBundle when undo/redo of MediaBundle setting changed on MediaBundleActor - Added PostEditChange after setting MaterialProperty to fix potential propagation. Change 4120060 by Patrick.Boutot Fix typo for TimecodeProviderClassName. Add "Config required restart" Add a button to reapply the CustomTimeStep or TimecodeProvider Change 4122062 by Krzysztof.Narkowicz Fixed movie burnout fixed timestep. Engine didn't use a fixed time step due to a following bug: 1. UAutomatedLevelSequenceCapture::Initialize calls UMovieSceneCapture::Initialize. 2. UMovieSceneCapture::Initialize creates FRealTimeCaptureStrategy and calls CaptureStrategy->OnInitialize(). 3. UAutomatedLevelSequenceCapture::Initialize changes CaptureStrategy to FFixedTimeStepCaptureStrategy, but no one calls CaptureStrategy->OnInitialize(); after that and this function is required to set the fixed time step. 4. Result: movies are burned out with variable time step, causing different inconsistencies between frames, settings and HW configurations. #jira none Change 4122236 by Anousack.Kitisa Made the "Import Into Level..." File menu action follow the EditorImport flag of a SceneImportFactory. #jira UE-57612 #jira UEENT-762 Change 4122588 by Rex.Hill Sequencer Export USD lights now supported Change 4122822 by JeanMichel.Dignard Fix for UV packing FlipX. Don't flip the empty columns at the end since they are always expected to be on the right side. The same was already done for FlipY. #jira UE-56664 Change 4123009 by JeanMichel.Dignard Copied fixes from MeshUtilities LayoutUV to MeshDescription LayoutUV Change 4123517 by JeanLuc.Corenthin Fixed crash when running cooked game crash with asset imported from datasmith #jira UE-60173 Change 4124569 by Patrick.Boutot [AJA] When the CustomTimeStep & TimecodeProvider signal is lost in the editor (not in PIE), try to re-synchronize every second. Change 4126421 by Max.Chen Sequencer: Add the ability to switch the takes of all the selected shots/subsections. #jira UESP-761 Change 4133010 by Simon.Therriault MediaBundle - Made assets in the bundle visible in the content browser (different package per asset) and updated to support duplication correctly - Quick fix for MaterialDynamicInstance garbage matte parameter not going back to default value when cleared. - Added looping option on the bundle Keyer and lens materials - Renamed some parameter groups to Keyer_XX Change 4135728 by Rex.Hill MovieSceneCapture crash fix when iteration on classes defined in python Change 4135732 by Rex.Hill Sequencer scripting: expose get playback range, sub sequence get sequence Change 4135734 by Rex.Hill USD python code refactored Change 4136017 by Matt.Hoffman Fixes FrameNumber nodes tripping an ensure when using them via Blueprints and fixes FrameNumbers & friends not being properly breakable in BP. #jira UE-60188 Change 4147959 by Patrick.Boutot Media Output Architecture. Support 8bits & 10bits color. Capture the buffer as is with the correct pixel format and the corredt target size. Change 4147962 by Patrick.Boutot Remove AjaMediaViewportOutput && AjaMediaViewportOutputImpl. Refactor AjaMediaOutput to extend MediaOutput. Refactor AjaMediaGrameGrabberProtocol to use AjaMediaCapture. Create AjaMediaCapture. Change 4148395 by Rex.Hill USD python code cleanup Change 4152901 by Rex.Hill Fix crash when recompiling blueprint or script class that serializes an object reference manually Change 4152906 by Rex.Hill USD level import/export exposed to UI Change 4152956 by Rex.Hill Rename unreal_usd to usd_unreal to avoid future module name conflicts Change 4153331 by Rex.Hill Simplify USD attribute definitions Change 4155472 by Rex.Hill USD level import now handles cameras and lights Change 4155832 by Patrick.Boutot Fix Packaging for MediaFrameworkUtilities Fix MediaPlayer that crash on close when the engine is closing. Change 4156020 by Mike.Zyracki LIVE LINK Sequencer Recording and Playback #jira UESP-714 #jira UESP-715 Support for Live Link Recording/Playback with Sequencer. Basically if we see a MotionController controlled by a LiveLink Subject or a LiveLink Component on a Actor we create a LiveLinkTrack for it that will record raw sequencer data into. We currently do that at the end of recording but will investigate saving it as we record. For Playback we create a Live Link Subject per recorded track and push up interpolated data per Engine Tick on Evaluate. We need to see if we need to send out raw data but that's complicated due to the fact that sequencer time may not be sequential but random, Moved FLiveLinkTimeFrame to LiveLinkTypes so we can grab raw data. Added functions to LiveLinkClient/Subject to get raw data so we dont' need to do expensive searches. Also changed that code so that we can only save the LiveLinkData when specified. We decided to have the sequencer own saving of the live link data so we explicilty turn on saving when we start to record and then turn if off at the end. Without this it's possible to easily run out of memory while LiveLink records. In order to record LiveLinkComponents under Actors we had to change ActorRecording to record ActorComponents and not jus SceneComponents. Not sure of any drawbacks with this but it seems to work well. Had to make sure we stll keeped attach/parent/child logic when recording. Change 4158488 by Rex.Hill USD scene import/export now uses UsdLux lights Change 4158742 by Rex.Hill USD: Add test for level export and import Change 4161645 by Patrick.Boutot Update MediaRecorder to use the ImageWriteQueue. Add flag in IImageWriteQueue.Enqueue to prevent block if the queue is full. Change 4161651 by Patrick.Boutot Modify MediaCompositing to use an existing MediaPlayer Change 4161657 by Patrick.Boutot Extend the SequenceRecorder to support additional object to record from other plugins. Add SequenceRecorder for MediaPlayer. Will record every frame to disk that the MediaPlayer produce. Change 4162699 by Rex.Hill USD export sequence updates Change 4163138 by Rex.Hill USD sequence export test added Change 4163426 by Mike.Zyracki Fix for Curve Names being kept and AutoSetting Tangents on Live Link Recording Change 4165714 by Patrick.Boutot [MediaCapture] Remove color box that tell the status of the MediaCapture. Add MediaCapture's name and use an image to represent the status. Use a ScrollBox around the "preview" output. Can select any actors. Only show the selectable camera grid when there is more than one camera. Change 4166652 by Rex.Hill Expose SetMobility to scripting Change 4167292 by Mike.Zyracki Make sure we call Finalize Evaluation when closing or deleting the Sequencer. This will make sure TearDown is called on sections which fixes issues with LiveLink Sources not getting deleted and probably also issues with MovieScenePlayers not getting released correctly. Also includes addition to show the SubjectName next to the Sequencer Source in the LiveLinkClient UI. Change 4170578 by Rex.Hill PackageTools exposed to scripting Change 4170619 by Rex.Hill Fix ReversePolygonFacing crash Change 4170621 by Rex.Hill USD mesh import can now be given list of individual meshes Change 4172495 by Matt.Hoffman Fixes some flipped logic in Sequencer Media Track that was preventing it from working as expected. Slightly simplifies the logic on setting up movie data, and ensures that the external movie player has a callback registered so that SeekTo calls will work. Makes it so that you can specify your own sound component with an external media player as a media player can have multiple sound components listening to it. Adds support for flagging the media player to loop to help cue some media sources like EXR to handle loop points better. #jira None Change 4173387 by Jon.Nabozny Bookmark usability and extensibility improvements Change 4173755 by Rex.Hill PackageTools namespace deprecation Change 4181799 by Patrick.Boutot Fix precesion error when importing a camera switcher in sequencer #jira UE-61212 Change 4184435 by Patrick.Boutot Only show the MediaCapture tab spawner in the level editor. Make sure the Material used to draw the render target is GCed. Change 4195803 by Patrick.Boutot Warn user if the AJA CustomTimeStep is used with VSync enabled. Change 4195866 by Patrick.Boutot Remove mention of CharBGR10A2 in AJA. The feature is not yet ready. Change 4196059 by Rex.Hill Fix linux compile due to a .cpp including BookMarkBase.h instead of BookmarkBase.h Change 4196380 by Patrick.Boutot MediaCapture capture the backbuffer when the Viewport don't use an internal texture. #jira UE-61601 Change 4199378 by Patrick.Boutot For MediaFramework, add support for 10bits RGB texture Change 4199380 by Patrick.Boutot [AJA] Add support for 10bits RGB texture in input Fix interlaced format that wasn't using the proper Stride value. Change 4200359 by Jamie.Dale Renamed some "K2_" prefixed functions for Python Change 4203016 by Max.Chen Sequencer: Add movie scene locking/read only. Fixed a few bugs with locked sections - shouldn't be able to create or move keys on locked sections #jira UESP-867 Change 4203018 by Max.Chen Sequencer: Test for movie scene read only before calling modify/transactions. #jira UESP-867 Change 4203622 by Simon.Therriault Bringing Aja MediaOutput MediaMode fix from Release 4.20 Change 4204895 by Rex.Hill Expose several file path functions to scripting Change 4206747 by Rex.Hill USD level import and export updates Change 4206783 by Rex.Hill USD updates Change 4207021 by Rex.Hill USD, fix rotation on level import when there is non-uniform scale Change 4207414 by Rex.Hill USD import static mesh material improvements Change 4209733 by Patrick.Boutot Change the log time to use the current frame Timecode #jira UEENT-1107 Change 4209738 by Patrick.Boutot Option to automatically try to reopen the MediaSource again if an error is detected Change 4210385 by Max.Chen Sequencer: Fix CurrentShot LocalTime computation by using sequence time in playback resolution to compute the local shot time. Also, fixed the burnin asset so that CurrentShotLocalTime is hooked up to ShotFrame instead of MasterTime. This fixes a bug where the burnin's {ShotFrame} is not reporting the local shot frame number. #jira UE-61728 Change 4219824 by Patrick.Boutot Use the correct EditorCondition for property MaxNumAncillaryFrameBuffe Change 4220706 by Louise.Rasmussen Sequencer: Syncronizes Sections using Source Timecode Relative to the first Selected Section #JIRA UESP-826 Change 4220708 by Louise.Rasmussen Sequencer: Adds SourceTimecode option to the Render Movie Settings Burn In #JIRA UESP-826 Change 4226970 by Patrick.Boutot Add a Timecode widget, TimecodeProvider widget and a TimecodeProvider Tab Change 4227333 by Rex.Hill USD Sequencer export now supports deltas Change 4227455 by Matt.Hoffman Adds support to the Audio Mixer Submix to pause and resume a recording. #jira UESEQ-77 Change 4230963 by Patrick.Boutot Make the namespace an import option Change 4234208 by Jon.Nabozny Fixed crash when 5 or more LiveLink sources were connected at the same time Change 4234273 by Jon.Nabozny Add methods in FApp to get the current Timecode FrameRate. Change 4237170 by Simon.Therriault MediaCapture Fix for MediaCapture panel not working in PIE Change 4243758 by Andrew.Rodham It's now possible to resolve pixel data from a render target whose texture resource is still pending creation Change 4244790 by Matt.Hoffman This adds experimental support to Sequencer's Render to Movie for exporting audio via rendering a second pass. This requires the new audio mixer (launch editor with "-audiomixer") and currently supports exporting to .wav. The second pass disables rendering in the Viewport and disables capturing frames during this pass which removes the overhead caused by rendering the scene. Complex scenes still evaluate the sequence which may impact performance in complex situations (such as the Fortnite Launch Trailer). Current Limitations: Requires the new audio mixer ("-audiomixer") The second pass must acheive real time framerates. The audio engine is only built to handle real time situations (due to the high precision needed, gotten via the platform clock) so any drops in engine framerate during the second pass will cause a desync of the audio (as there will be more samples captured than frames of video). The editor has significant overhead which often prevents achieving consistent real-time rates. Using "Capture in New Process" alleviates this issue, even without closing the Editor. Audio has been enabled for both image capture and audio capture passes, which means stuttery audio now plays back during image capture. Attempts to alleviate this issue ended up conflicting with some editor code that forces the audio multiplier to 1.0 each Tick(), so audio has to play on both image and audio passes. Forces background audio (otherwise your output audio wav will be blank!) when app is not in focus, though users should leave the app in focus for best performance. #jira UESEQ-77, UESP-669 Change 4246443 by Simon.Tourangeau Remove Beta flag from nDisplay plugin #jira UEENT-1716 Change 4246480 by Simon.Tourangeau Fix nDisplay plugin icon #jira UEENT-1715 Change 4246571 by Simon.Tourangeau Merging Lauren's VR Editor fixes 4085915 Gamma correction fixes for VR Mode Content Browser icons and camera previews 4087955 Adding a third looping option to the Sequencer Radial Menu. Selecting the Looping option now cycles through No Looping > Loop All > Loop Range 4089914 Adding set start/end range buttons to radial menu 4090502 Fixing sequencer looping not being set correctly 4092824 Cameras are now visible in VR Mode - interim implementation until Game Mode works entirely 4095161 Fix for opening a sequence blocking level editor tab drag and drop 4096999 Making a VR Edit show flags mode that is similar to Game Mode but without the Game flag set to true, does hide billboards. Camera hide/show behavior is now correct. 4097286 Placing cameras now only summons the preview panel once you release 4100941 New spawn location for camera preview window (in front and to the side, on whichever side matches your UI hand) 4102732 Hiding VR editor elements from camera preview 4103378 Added camera burnin text on preview windows as well. 4103466 Fixes for camera text 4103779 Fix for the actor previews not unpinning when entering VR mode. 4105722 Adding support for multiple viewport previews in VR mode, and not creating a new viewport interaction if one already exists when getting it. 4106982 Any dockable window can now be placed in the world. 4107298 Fix for crash when closing multiple camera previews 4107426 Fix for crash when connecting node with no texture set 4136343 UI windows docked "to the world" no longer scale with you and stay the size they are docked at. 4136345 Settings for tweaking VR mode movement 4147473 Fix for controllers not showing up 4147734 Sequencer scrubbing will now pause when removing your thumb from a Vive touchpad 4171489 Added external UI panel support to VREditor module. Created an example camera-adjusting UI 4186392 Second fix for sequencer scrubbing on the radial menu Change 4247984 by Jamie.Dale Fixed potential memory corruption caused by Python glue code generation #jira UE-62397 Change 4255471 by Anousack.Kitisa Added functionalities to add/insert/remove UV channel from a StaticMesh accessible through the StaticMeshEditor and scripting. #jira UEENT-1592 #jira UEENT-1597 #jira UEENT-1660 Change 4256323 by Anousack.Kitisa Added Polygon Selection Mode by smoothing group in the MeshEditor. #jira UEENT-1594 Change 4258012 by Homam.Bahnassi Extending UVEdit material function to support mirroring. #jira UE-57306 Change 4258231 by Jamie.Dale Fixed GetHostName failing to convert UTF-8 data correctly Change 4258579 by Jamie.Dale Ensure that packages re-created after deleting their only asset are marked as fully loaded Change 4258652 by Jamie.Dale Added script exposed method to convert an Unreal relative path to absolute Change 4259124 by Patrick.Boutot For MediaBundle, show or hide the failed texture on console. #jira UE-61672 Change 4259264 by Jamie.Dale Show an error if trying to use ExecutePythonScript without Python enabled #jira UE-62318 Change 4259451 by Jamie.Dale No longer use stale subtitles in dialogue waves #jira UE-61500 Change 4259511 by Jamie.Dale Fix crash when passing None as the class for find/load_asset #jira UE-62130 Change 4259542 by Patrick.Boutot Can select the TimecodeSynchronizer from the Toolbar menu. Add option to show it in the toolbar. Can be defaulted by user/machine. Change 4259582 by Patrick.Boutot Hide Edit & Paste from PropertyMenuAssetPicker Change 4260760 by Max.Chen Sequencer: Fix dereferencing null pointer - CameraNode Change 4260895 by Jamie.Dale Changing localization target settings now updates the gather INI files immediately Change 4262166 by Patrick.Boutot Add support for MediaSourceProxy and MediaOutputProxy. Change 4262535 by Andrew.Rodham Sequencer: Added a method for user-defined capture protocols to resolve a buffer and pass it directly to a bound delegate handler Originating source CL#4261391 Change 4262669 by Patrick.Boutot Add MediaProfile. It let the user select their media sources and media outputs by machine by user. Change 4264577 by Patrick.Boutot Change the type of FMediaFrameworkCaptureCameraViewportCameraOutputInfo.LockedCameraActors to LazyObject to enable cross level reference. #jira UE-62438 Include dependence to settings Change 4265750 by JeanLuc.Corenthin Fix array's size issues with MeshDescription utility functions #jira UEENT-1574 Change 4268181 by Patrick.Boutot Mark LockedCameraActors as deprecated. [CL 4279869 by JeanMichel Dignard in Main branch]
2018-08-13 12:29:41 -04:00
{
FSlateApplication::Get().UnregisterInputPreProcessor(InputProcessor);
InputProcessor.Reset();
}
Copying //UE4/Release-Staging-4.14 to //UE4/Dev-Main (Source: //UE4/Release-4.14 @ 3195953) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3195953 on 2016/11/12 by Leslie.Nivison Rollback //UE4/Release-4.14/Engine/Plugins/Runtime/Nvidia to changelist 3193712 New GameWorks license from NVIDIA #jira UEPROD-900 Change 3195944 on 2016/11/12 by Leslie.Nivison Removing GameWorks SDK license until we get a new one from NVIDIA #jira UEPROD-900 Change 3195942 on 2016/11/11 by Chris.Gagnon Removing Ansel from 4.14 until revised EULA is handle. #jira UE-none Change 3195431 on 2016/11/11 by Mitchell.Wilson Rebuilt lighting in subway reflections sample #jira UE-38538 Change 3195080 on 2016/11/11 by mason.seay Extended floor to allow more driving space #jira UE-29618 Change 3194886 on 2016/11/11 by Chris.Babcock Correct handling for 6x6 blocksize in ASTC compressor #jira UE-38513 #ue4 #android Change 3193712 on 2016/11/10 by Leslie.Nivison Updating Ansel TPS info per NVIDIA response #jira UEPROD-900 Change 3193691 on 2016/11/10 by Lina.Halper #jira: UE-38488 Change 3193532 on 2016/11/10 by Lauren.Ridge Fix to keep the user in VR editing mode after leaving VR PIE. #jira UE-38317 Change 3193468 on 2016/11/10 by Leslie.Nivison Removing unneeded license #jira UEPROD-900 Change 3193465 on 2016/11/10 by Leslie.Nivison Updating credits for 4.14 #jira UEPROD-902 Change 3193416 on 2016/11/10 by Daniel.Lamb Changed default of exclude editor only content flag. #jira UE-38455 Change 3193399 on 2016/11/10 by Mitchell.Wilson Applied correct material to certain LODs of tree meshes in KiteDemo #jira UE-38472 Change 3193049 on 2016/11/10 by Thomas.Sarkanen Fix disappearing mesh on undo in skeletal mesh editor Also fixes crash on undo in morph target panel #jira UE-38430 - Undo in Skeletal Mesh Editor causes model to disappear #jira UE-38437 - Crash when Undo after editing a weight in Morph Target Previewer Change 3192655 on 2016/11/09 by Ryan.Vance #jira UE-37238 Pulling in 3164679 and 3169467 which didn't make the 4.14 cut. Also changed to a full inverse for InvTranslatedViewProjectionMatrix in FViewMatrices::UpdateViewMatrix. Change 3192613 on 2016/11/09 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3192197 on 2016/11/09 by Daniel.Wright Added SUPPORT_CONTACT_SHADOWS, only standard deferred lighting supports it. Fixes scene depth texture bound in forward shading base pass. #jira UE-38340 Change 3192182 on 2016/11/09 by Rolando.Caloca UE4.14 - Fix recompute tangents not working when skin cache is enabled #jira UE-38398 Change 3191695 on 2016/11/09 by Chris.Wood Editor heartbeat changes for 4.14 [AN-1003] - Make Editor heartbeat 1min [UE-38417] - Editor heartbeat changes (vanilla editor, new interval, debugger attached) Also added IsDebugger, IsVanilla and IntervalSec to Editor.Usage.Heartbeat #jira UE-38417 Change 3191437 on 2016/11/09 by Jack.Porter Fix for LandscapeInfo crash when using Force Delete #jira UE-37172 Change 3191033 on 2016/11/08 by Leslie.Nivison Adding licenses for marketplace plugins #jira UEPROD-901 Change 3191028 on 2016/11/08 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3190632 on 2016/11/08 by mason.seay Updated testmap and assets #jira UE-29618 Change 3190624 on 2016/11/08 by Jamie.Dale Fixed case where FHTML5TargetPlatform::RefreshHTML5Setup could incorrectly add an empty device Changes to UStrProperty::ExportTextItem caused FParse::Value to (correctly) read an empty string for DevicePath which passed the DirectoryExists check (where it would have previously read "))" which would fail that check). #jira UE-38157 Change 3190443 on 2016/11/08 by Josh.Adams - Somehow checking in my tested shelf messed up #jira UE-38304 Change 3190354 on 2016/11/08 by Josh.Adams - Vulkan now always being compiled in, if the SDK exists. Compiling not dependent on project settings #jira UE-38304 Change 3190123 on 2016/11/08 by zachary.wilson Updating testing content for sureface per-pixel improvements #jira UE-29618 Change 3190113 on 2016/11/08 by Alexis.Matte Make sure the default light map channel is 1 and not 0 #jira UE-35627 Change 3190102 on 2016/11/08 by Dmitry.Rekman Linux: default to binned everywhere (UE-38287). - Fixes suspicious crashes happening in uncooked build. Workaround, needs separate investigation. #jira UE-38287 Change 3190000 on 2016/11/08 by Allan.Bentham Removed old protostar loadmap hack. #jira UE-38342 Change 3189914 on 2016/11/08 by Allan.Bentham Fix vulkan crash when rendering sky capture. Fix crash when rendering LDR scene capture on device. #jira UE-38291 Change 3189861 on 2016/11/08 by Thomas.Sarkanen Fix out of bounds access when using hidden bones with master pose components Code was trying to to access the ReferenceToLocal array using a parent index from the master pose component. Now changed to only use indices known to be valid (i.e. this component's) to index the ReferenceToLocal array. Bone visibility is still master-authoratitive. #jira UE-38214 - [CrashReport] UE4Editor_Engine!UpdateRefToLocalMatrices() [skeletalrender.cpp:238] Change 3189370 on 2016/11/07 by Daniel.Wright Only check transform mismatches for static lighting in UStaticMeshComponent::ApplyComponentInstanceData on components that actually can have static lighting #jira UE-38272 Change 3189358 on 2016/11/07 by Mark.Satterthwaite Intel Metal drivers can no longer compile our compute shaders reliably meaning Intel Macs must always use Metal SM4 as otehrwise they will crash. #jira UE-38299 Change 3189273 on 2016/11/07 by Rolando.Caloca UE4.14 - Integrate fix from 3161219 #jira UE-38270 Change 3189084 on 2016/11/07 by Chris.Bunner Fix RemoveAAJitter from projection matrix. #jira UE-37701, UE-38003 Change 3188636 on 2016/11/07 by Allan.Bentham use glVertexAttribIPointer only on ES3.1 enabled projects. #jira UE-38241 Change 3188596 on 2016/11/07 by Yannick.Lange VR Editor: Fix crash when closing window while in VR Editor #jira UE-37995 Change 3188433 on 2016/11/07 by Matthew.Griffin Add starter content .upack files to starter_content tag so that they should still be installed if templates/feature packs option is de-selected in the Launcher Change 3187739 on 2016/11/04 by Mitchell.Wilson Updating DefautlEditor and DefaultEngine ini to correct path to VehicleMenu level. #jira UE-29748 Change 3187536 on 2016/11/04 by Martin.Wilson Fix for "Renaming a montage section via its details panel doesn't update the section correctly" #jira UE-35929 Change 3187499 on 2016/11/04 by zachary.wilson Checking in content fixes for Lighting Scenarios test level #jira UE-29618 Change 3187492 on 2016/11/04 by mason.seay Updated map to improve testing #jira UE-29618 Change 3187438 on 2016/11/04 by Nick.Shin fix html5 port number for cook-on-the-fly option #jira UE-38032 - Quicklaunch HTML5 fails on Chrome. Browser returns "This site can't be reached 127.0.0.1 refused to connect" Change 3187305 on 2016/11/04 by Martin.Wilson Fix log spam from animation sequence thumbnails #jira UE-38224 Change 3187260 on 2016/11/04 by Lauren.Ridge Fix for crash on opening a level in VR Editing mode. When closing VREditorMode for a level load, HMD no longer leaves stereo mode. #jira UE-32541 Change 3187224 on 2016/11/04 by Robert.Manuszewski Proper fix for a crash when launching BP-only project from the Editor with EDL enabled (does not modify UE4Game target binaries) #jira UE-37617 Change 3187136 on 2016/11/04 by Alexis.Matte Fbx importer for static mesh, make sure that we order the materials array to follow the section order. #jira UE-38242 Change 3187065 on 2016/11/04 by Mitchell.Wilson Updated BP_Commentary_Box to resolve warnings with array if the box opens then closes before the text is rendered. #jira UE-38266 Change 3187056 on 2016/11/04 by Mike.Beach Guarding against a rare crash that occurs when compiling a Blueprint after hot-reload. GUnrealEd was null, which is concerning (as it could have resounding effects in other systems), but as I could not repro it more than once (to figure it out more) I simply guarded the use of a null pointer here. #jira UE-38198 Change 3187040 on 2016/11/04 by Matthew.Griffin Corrected path to DotNETCommon folder Exclude all editor plugin pdbs from stripping #jira UE-37072 Change 3186984 on 2016/11/04 by Marc.Audy Fix crash when null component considered #jira UE-36493 Change 3186600 on 2016/11/04 by Max.Chen Sequencer: Fix crash in sequencer editor mode. #jira UE-38205 Change 3186564 on 2016/11/04 by Nick.Shin checking in latest physx libs for html5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186258 on 2016/11/03 by Nick.Shin fix for automation build to handle deleting of windows x86 & x64 libs properly #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186225 on 2016/11/03 by Lauren.Ridge Fix for foliage brush not showing up until after first motion controller click. #jira UE-38002 Change 3186100 on 2016/11/03 by Chris.Babcock Update local notifications to deal with depreciated API #jira UE-38236 #ue4 #android Change 3186074 on 2016/11/03 by Mitchell.Wilson Rebuilt lighting in Content Examples Welcome level #jira UE-38239 Change 3185923 on 2016/11/03 by Lina.Halper Fixed issue with animation not ticking in inactive world causing it to update parent animation #jira: UE-37933 Change 3185764 on 2016/11/03 by Mitchell.Wilson Updating deprecated node in MyCharacter_UMG. #jira UE-38229 Change 3185683 on 2016/11/03 by Nick.Shin non SSE2 version of PhysX for HTML5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3185492 on 2016/11/03 by Ben.Woodhouse Workaround for very high render query memory overhead on D3D12. Add a cvar to limit timestamp queries allocated by the GPU profiler in a given frame. On D3D12 this limit is 1024 - other RHIs remain unbounded. Currently render queries are 64KB each on D3D12, so this prevents high memory overhead on particular frames, e.g when we render a large number of reflection captures. In practice, most frames are under 400 queries, so in practice we shouldn't hit the limit except in extreme cases. #jira UE-38139 Change 3185481 on 2016/11/03 by Dmitry.Rekman Remove version number from Linux README (UE-38059). #jira UE-38059 Change 3185322 on 2016/11/03 by Ryan.Gerleve Allow path names in NetFieldExportGroups to be remapped on the client. #jira UE-37990 Change 3185293 on 2016/11/03 by Matthew.Griffin Exclude UnrealControls and iPhonePackager from Build Tools CS node on non-Windows platforms as they don't compile #jira UE-34016 Change 3185252 on 2016/11/03 by Michael.Trepka Properly revert to OpenGL on Macs that do not support Metal #jira UE-38190 Change 3184835 on 2016/11/03 by Jurre.deBaare Crash when using undo in the preview scene settings of Persona #fix Ensure that the profile index is valid after undo-ing #misc Added transactions for adding/remove of the profiles #jira UE-38142 Change 3184833 on 2016/11/03 by Jack.Porter Fixed crash when ENABLE_VERIFY_GL and r.MobileOnChipMSAA is enabled on Android #jira UE-38186 Change 3184418 on 2016/11/02 by Ryan.Vance #jira UE-38161 Adding ISceneViewExtension::UsePostInitView which will be used to enable/disable the usage of PostRenderViewFamily_RenderThread and PostRenderView_RenderThread which was added earlier. We need to enable this behavior based on the hmd's compositor behavior, so a simple cvar wont work. I missed the PostPresent implementation for steamvr in the earlier check in. Change 3184286 on 2016/11/02 by Dan.Oconnor Fix for IsValidLowLevel check being rotten. More correct fix will go into Dev-BP, but this is a low risk stop-gap #jira UE-38149 Change 3184283 on 2016/11/02 by Arne.Schober DR - UE-38155 replicated MS CL 3183837 - PSO Dangling Pointers: The PSO cache was returning pointers out of a Map which is based on a sparse Array and those pointers could become invalid if other insertions happen. #jira UE-38155 Change 3184244 on 2016/11/02 by Richard.Ugarte #jira UE-37534 Checking in updated UE4_Demo_Head_D on behalf of MikeB Change 3184171 on 2016/11/02 by Michael.Trepka Made Mac CrashReportClient high-DPI aware and fixed high-DPI handling in FMacWindow::IsPointInWindow() #jira UE-37697 Change 3184126 on 2016/11/02 by Lauren.Ridge VR Editor: Fixes for foliage painting only working on one controller, and for full press not painting foliage. #jira UE-38147 #jira UE-38002 Change 3183997 on 2016/11/02 by Mitchell.Wilson Scaled and Rotated 3d Widget to the correct position on example 2.3 in Content Examples UMG. Adjusted collision on example 1.4 in Content Examples Physics. Updated collision on SM_ExampleMesh_Rocket. Realigned some text render actors in Content Examples Post Process. #jira UE-38099 UE-38078 UE-38064 Change 3183945 on 2016/11/02 by Mieszko.Zielinski Fixed changing AreaClass of NavLinkProxy point links not having any effect on navmesh generation #UE4 #jira UE-38137 Change 3183906 on 2016/11/02 by Nick.Shin for OSX (release-4.14 stream): new OSX clang (from emscripten tool chain) configured by jukka from Mozilla see Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/incoming/EPIC_VERSION for details on where did this version come from fixes for OSX -- update existing (bash shell script and UE4 c#) build files to use the new "incoming" emsdk #jira UE-37329 - Step 'Compile UE4Game HTML5' - 300 Warnings Change 3183899 on 2016/11/02 by Mieszko.Zielinski Fixed EQS debugger not drawing item labels #UE4 #jira UE-38122 Change 3183239 on 2016/11/02 by Peter.Sauerbrei fix for mobile provision with UUID only filename being allowed again by copying them to a new file name which allows them to be used. #jira UE-38006 Change 3183149 on 2016/11/02 by Luke.Thatcher [RELEASE] [SHOOTERGAME] [!] Fix "Is Talking" icon on ShooterGame scoreboard, after PS4 OSS refactor. - ShooterGame was comparing FUniqueNetId::ToString() against AShooterPlayerState::GetShortPlayerName(). - This is wrong, since the NetId is not guaranteed to be equal to the player's name. #jira UE-38011 Change 3183005 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [^] Merging (as edit) PS4 OSS fixes from Engine to OrionGame. #jira UE-38017 UE-38020 Original Changelists: 3182765 [RELEASE] [PS4] [~] Additional logging for PS4 OSS "Play Together". 3182766 [RELEASE] [PS4] [!] Fix assert in FUniqueNetIdPS4::FindOrCreate. We were assuming an online-only ID could never become a local ID. This isn't the case in the following scenario: - Two users join a session on two separate PS4s. - One user signs into the other user's PS4 with the same account, with a second controller. PSN logs him out of the first PS4. - That user's Net ID has now migrated from being online-only, to local-with-online. This is a case that was not handled. 3182767 [RELEASE] [PS4] [!] Fix PS4 session invitations. - Was calling old Web API with SceNpOnlineId where SceNpAccountId is needed. - Replaced with NpToolkit2's session invitation API. 3182892 [RELEASE] [PS4] [!] Fix incorrect identity API implementation in PS4 OSS. - System events directly drive the login state of a user. This also removes the blocking call to sceNpGetState(). - GetAuthToken is only called if the engine calls IOnlineIdentity::Login(). 3182951 [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). Change 3182992 on 2016/11/02 by Nick.Darnell UMG Editor - Fixing a regression with the editor, closing the sequencer tab and reopening the editor should no longer cause a crash. #jira UE-38098 Change 3182951 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). #jira UE-38017 [CL 3201696 by Matthew Griffin in Main branch]
2016-11-17 04:29:30 -05:00
USelection::SelectionChangedEvent.RemoveAll( this );
GEditor->OnEditorClose().RemoveAll( this );
}
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
void UViewportWorldInteraction::TransitionWorld(UWorld* NewWorld, EEditorWorldExtensionTransitionState TransitionState)
{
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
check(NewWorld != nullptr);
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
Super::TransitionWorld(NewWorld, TransitionState);
if (TransitionState == EEditorWorldExtensionTransitionState::TransitionAll ||
TransitionState == EEditorWorldExtensionTransitionState::TransitionNonPIEOnly)
{
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
for (UViewportInteractor* Interactor : Interactors)
{
Interactor->Rename(nullptr, NewWorld->PersistentLevel);
}
}
}
void UViewportWorldInteraction::EnteredSimulateInEditor()
{
// Make sure transformables get updated
GEditor->NoteSelectionChange();
}
void UViewportWorldInteraction::LeftSimulateInEditor(UWorld* SimulateWorld)
{
// Make sure transformables get updated
GEditor->NoteSelectionChange();
}
Copying //UE4/Release-Staging-4.14 to //UE4/Dev-Main (Source: //UE4/Release-4.14 @ 3195953) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3195953 on 2016/11/12 by Leslie.Nivison Rollback //UE4/Release-4.14/Engine/Plugins/Runtime/Nvidia to changelist 3193712 New GameWorks license from NVIDIA #jira UEPROD-900 Change 3195944 on 2016/11/12 by Leslie.Nivison Removing GameWorks SDK license until we get a new one from NVIDIA #jira UEPROD-900 Change 3195942 on 2016/11/11 by Chris.Gagnon Removing Ansel from 4.14 until revised EULA is handle. #jira UE-none Change 3195431 on 2016/11/11 by Mitchell.Wilson Rebuilt lighting in subway reflections sample #jira UE-38538 Change 3195080 on 2016/11/11 by mason.seay Extended floor to allow more driving space #jira UE-29618 Change 3194886 on 2016/11/11 by Chris.Babcock Correct handling for 6x6 blocksize in ASTC compressor #jira UE-38513 #ue4 #android Change 3193712 on 2016/11/10 by Leslie.Nivison Updating Ansel TPS info per NVIDIA response #jira UEPROD-900 Change 3193691 on 2016/11/10 by Lina.Halper #jira: UE-38488 Change 3193532 on 2016/11/10 by Lauren.Ridge Fix to keep the user in VR editing mode after leaving VR PIE. #jira UE-38317 Change 3193468 on 2016/11/10 by Leslie.Nivison Removing unneeded license #jira UEPROD-900 Change 3193465 on 2016/11/10 by Leslie.Nivison Updating credits for 4.14 #jira UEPROD-902 Change 3193416 on 2016/11/10 by Daniel.Lamb Changed default of exclude editor only content flag. #jira UE-38455 Change 3193399 on 2016/11/10 by Mitchell.Wilson Applied correct material to certain LODs of tree meshes in KiteDemo #jira UE-38472 Change 3193049 on 2016/11/10 by Thomas.Sarkanen Fix disappearing mesh on undo in skeletal mesh editor Also fixes crash on undo in morph target panel #jira UE-38430 - Undo in Skeletal Mesh Editor causes model to disappear #jira UE-38437 - Crash when Undo after editing a weight in Morph Target Previewer Change 3192655 on 2016/11/09 by Ryan.Vance #jira UE-37238 Pulling in 3164679 and 3169467 which didn't make the 4.14 cut. Also changed to a full inverse for InvTranslatedViewProjectionMatrix in FViewMatrices::UpdateViewMatrix. Change 3192613 on 2016/11/09 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3192197 on 2016/11/09 by Daniel.Wright Added SUPPORT_CONTACT_SHADOWS, only standard deferred lighting supports it. Fixes scene depth texture bound in forward shading base pass. #jira UE-38340 Change 3192182 on 2016/11/09 by Rolando.Caloca UE4.14 - Fix recompute tangents not working when skin cache is enabled #jira UE-38398 Change 3191695 on 2016/11/09 by Chris.Wood Editor heartbeat changes for 4.14 [AN-1003] - Make Editor heartbeat 1min [UE-38417] - Editor heartbeat changes (vanilla editor, new interval, debugger attached) Also added IsDebugger, IsVanilla and IntervalSec to Editor.Usage.Heartbeat #jira UE-38417 Change 3191437 on 2016/11/09 by Jack.Porter Fix for LandscapeInfo crash when using Force Delete #jira UE-37172 Change 3191033 on 2016/11/08 by Leslie.Nivison Adding licenses for marketplace plugins #jira UEPROD-901 Change 3191028 on 2016/11/08 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3190632 on 2016/11/08 by mason.seay Updated testmap and assets #jira UE-29618 Change 3190624 on 2016/11/08 by Jamie.Dale Fixed case where FHTML5TargetPlatform::RefreshHTML5Setup could incorrectly add an empty device Changes to UStrProperty::ExportTextItem caused FParse::Value to (correctly) read an empty string for DevicePath which passed the DirectoryExists check (where it would have previously read "))" which would fail that check). #jira UE-38157 Change 3190443 on 2016/11/08 by Josh.Adams - Somehow checking in my tested shelf messed up #jira UE-38304 Change 3190354 on 2016/11/08 by Josh.Adams - Vulkan now always being compiled in, if the SDK exists. Compiling not dependent on project settings #jira UE-38304 Change 3190123 on 2016/11/08 by zachary.wilson Updating testing content for sureface per-pixel improvements #jira UE-29618 Change 3190113 on 2016/11/08 by Alexis.Matte Make sure the default light map channel is 1 and not 0 #jira UE-35627 Change 3190102 on 2016/11/08 by Dmitry.Rekman Linux: default to binned everywhere (UE-38287). - Fixes suspicious crashes happening in uncooked build. Workaround, needs separate investigation. #jira UE-38287 Change 3190000 on 2016/11/08 by Allan.Bentham Removed old protostar loadmap hack. #jira UE-38342 Change 3189914 on 2016/11/08 by Allan.Bentham Fix vulkan crash when rendering sky capture. Fix crash when rendering LDR scene capture on device. #jira UE-38291 Change 3189861 on 2016/11/08 by Thomas.Sarkanen Fix out of bounds access when using hidden bones with master pose components Code was trying to to access the ReferenceToLocal array using a parent index from the master pose component. Now changed to only use indices known to be valid (i.e. this component's) to index the ReferenceToLocal array. Bone visibility is still master-authoratitive. #jira UE-38214 - [CrashReport] UE4Editor_Engine!UpdateRefToLocalMatrices() [skeletalrender.cpp:238] Change 3189370 on 2016/11/07 by Daniel.Wright Only check transform mismatches for static lighting in UStaticMeshComponent::ApplyComponentInstanceData on components that actually can have static lighting #jira UE-38272 Change 3189358 on 2016/11/07 by Mark.Satterthwaite Intel Metal drivers can no longer compile our compute shaders reliably meaning Intel Macs must always use Metal SM4 as otehrwise they will crash. #jira UE-38299 Change 3189273 on 2016/11/07 by Rolando.Caloca UE4.14 - Integrate fix from 3161219 #jira UE-38270 Change 3189084 on 2016/11/07 by Chris.Bunner Fix RemoveAAJitter from projection matrix. #jira UE-37701, UE-38003 Change 3188636 on 2016/11/07 by Allan.Bentham use glVertexAttribIPointer only on ES3.1 enabled projects. #jira UE-38241 Change 3188596 on 2016/11/07 by Yannick.Lange VR Editor: Fix crash when closing window while in VR Editor #jira UE-37995 Change 3188433 on 2016/11/07 by Matthew.Griffin Add starter content .upack files to starter_content tag so that they should still be installed if templates/feature packs option is de-selected in the Launcher Change 3187739 on 2016/11/04 by Mitchell.Wilson Updating DefautlEditor and DefaultEngine ini to correct path to VehicleMenu level. #jira UE-29748 Change 3187536 on 2016/11/04 by Martin.Wilson Fix for "Renaming a montage section via its details panel doesn't update the section correctly" #jira UE-35929 Change 3187499 on 2016/11/04 by zachary.wilson Checking in content fixes for Lighting Scenarios test level #jira UE-29618 Change 3187492 on 2016/11/04 by mason.seay Updated map to improve testing #jira UE-29618 Change 3187438 on 2016/11/04 by Nick.Shin fix html5 port number for cook-on-the-fly option #jira UE-38032 - Quicklaunch HTML5 fails on Chrome. Browser returns "This site can't be reached 127.0.0.1 refused to connect" Change 3187305 on 2016/11/04 by Martin.Wilson Fix log spam from animation sequence thumbnails #jira UE-38224 Change 3187260 on 2016/11/04 by Lauren.Ridge Fix for crash on opening a level in VR Editing mode. When closing VREditorMode for a level load, HMD no longer leaves stereo mode. #jira UE-32541 Change 3187224 on 2016/11/04 by Robert.Manuszewski Proper fix for a crash when launching BP-only project from the Editor with EDL enabled (does not modify UE4Game target binaries) #jira UE-37617 Change 3187136 on 2016/11/04 by Alexis.Matte Fbx importer for static mesh, make sure that we order the materials array to follow the section order. #jira UE-38242 Change 3187065 on 2016/11/04 by Mitchell.Wilson Updated BP_Commentary_Box to resolve warnings with array if the box opens then closes before the text is rendered. #jira UE-38266 Change 3187056 on 2016/11/04 by Mike.Beach Guarding against a rare crash that occurs when compiling a Blueprint after hot-reload. GUnrealEd was null, which is concerning (as it could have resounding effects in other systems), but as I could not repro it more than once (to figure it out more) I simply guarded the use of a null pointer here. #jira UE-38198 Change 3187040 on 2016/11/04 by Matthew.Griffin Corrected path to DotNETCommon folder Exclude all editor plugin pdbs from stripping #jira UE-37072 Change 3186984 on 2016/11/04 by Marc.Audy Fix crash when null component considered #jira UE-36493 Change 3186600 on 2016/11/04 by Max.Chen Sequencer: Fix crash in sequencer editor mode. #jira UE-38205 Change 3186564 on 2016/11/04 by Nick.Shin checking in latest physx libs for html5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186258 on 2016/11/03 by Nick.Shin fix for automation build to handle deleting of windows x86 & x64 libs properly #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186225 on 2016/11/03 by Lauren.Ridge Fix for foliage brush not showing up until after first motion controller click. #jira UE-38002 Change 3186100 on 2016/11/03 by Chris.Babcock Update local notifications to deal with depreciated API #jira UE-38236 #ue4 #android Change 3186074 on 2016/11/03 by Mitchell.Wilson Rebuilt lighting in Content Examples Welcome level #jira UE-38239 Change 3185923 on 2016/11/03 by Lina.Halper Fixed issue with animation not ticking in inactive world causing it to update parent animation #jira: UE-37933 Change 3185764 on 2016/11/03 by Mitchell.Wilson Updating deprecated node in MyCharacter_UMG. #jira UE-38229 Change 3185683 on 2016/11/03 by Nick.Shin non SSE2 version of PhysX for HTML5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3185492 on 2016/11/03 by Ben.Woodhouse Workaround for very high render query memory overhead on D3D12. Add a cvar to limit timestamp queries allocated by the GPU profiler in a given frame. On D3D12 this limit is 1024 - other RHIs remain unbounded. Currently render queries are 64KB each on D3D12, so this prevents high memory overhead on particular frames, e.g when we render a large number of reflection captures. In practice, most frames are under 400 queries, so in practice we shouldn't hit the limit except in extreme cases. #jira UE-38139 Change 3185481 on 2016/11/03 by Dmitry.Rekman Remove version number from Linux README (UE-38059). #jira UE-38059 Change 3185322 on 2016/11/03 by Ryan.Gerleve Allow path names in NetFieldExportGroups to be remapped on the client. #jira UE-37990 Change 3185293 on 2016/11/03 by Matthew.Griffin Exclude UnrealControls and iPhonePackager from Build Tools CS node on non-Windows platforms as they don't compile #jira UE-34016 Change 3185252 on 2016/11/03 by Michael.Trepka Properly revert to OpenGL on Macs that do not support Metal #jira UE-38190 Change 3184835 on 2016/11/03 by Jurre.deBaare Crash when using undo in the preview scene settings of Persona #fix Ensure that the profile index is valid after undo-ing #misc Added transactions for adding/remove of the profiles #jira UE-38142 Change 3184833 on 2016/11/03 by Jack.Porter Fixed crash when ENABLE_VERIFY_GL and r.MobileOnChipMSAA is enabled on Android #jira UE-38186 Change 3184418 on 2016/11/02 by Ryan.Vance #jira UE-38161 Adding ISceneViewExtension::UsePostInitView which will be used to enable/disable the usage of PostRenderViewFamily_RenderThread and PostRenderView_RenderThread which was added earlier. We need to enable this behavior based on the hmd's compositor behavior, so a simple cvar wont work. I missed the PostPresent implementation for steamvr in the earlier check in. Change 3184286 on 2016/11/02 by Dan.Oconnor Fix for IsValidLowLevel check being rotten. More correct fix will go into Dev-BP, but this is a low risk stop-gap #jira UE-38149 Change 3184283 on 2016/11/02 by Arne.Schober DR - UE-38155 replicated MS CL 3183837 - PSO Dangling Pointers: The PSO cache was returning pointers out of a Map which is based on a sparse Array and those pointers could become invalid if other insertions happen. #jira UE-38155 Change 3184244 on 2016/11/02 by Richard.Ugarte #jira UE-37534 Checking in updated UE4_Demo_Head_D on behalf of MikeB Change 3184171 on 2016/11/02 by Michael.Trepka Made Mac CrashReportClient high-DPI aware and fixed high-DPI handling in FMacWindow::IsPointInWindow() #jira UE-37697 Change 3184126 on 2016/11/02 by Lauren.Ridge VR Editor: Fixes for foliage painting only working on one controller, and for full press not painting foliage. #jira UE-38147 #jira UE-38002 Change 3183997 on 2016/11/02 by Mitchell.Wilson Scaled and Rotated 3d Widget to the correct position on example 2.3 in Content Examples UMG. Adjusted collision on example 1.4 in Content Examples Physics. Updated collision on SM_ExampleMesh_Rocket. Realigned some text render actors in Content Examples Post Process. #jira UE-38099 UE-38078 UE-38064 Change 3183945 on 2016/11/02 by Mieszko.Zielinski Fixed changing AreaClass of NavLinkProxy point links not having any effect on navmesh generation #UE4 #jira UE-38137 Change 3183906 on 2016/11/02 by Nick.Shin for OSX (release-4.14 stream): new OSX clang (from emscripten tool chain) configured by jukka from Mozilla see Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/incoming/EPIC_VERSION for details on where did this version come from fixes for OSX -- update existing (bash shell script and UE4 c#) build files to use the new "incoming" emsdk #jira UE-37329 - Step 'Compile UE4Game HTML5' - 300 Warnings Change 3183899 on 2016/11/02 by Mieszko.Zielinski Fixed EQS debugger not drawing item labels #UE4 #jira UE-38122 Change 3183239 on 2016/11/02 by Peter.Sauerbrei fix for mobile provision with UUID only filename being allowed again by copying them to a new file name which allows them to be used. #jira UE-38006 Change 3183149 on 2016/11/02 by Luke.Thatcher [RELEASE] [SHOOTERGAME] [!] Fix "Is Talking" icon on ShooterGame scoreboard, after PS4 OSS refactor. - ShooterGame was comparing FUniqueNetId::ToString() against AShooterPlayerState::GetShortPlayerName(). - This is wrong, since the NetId is not guaranteed to be equal to the player's name. #jira UE-38011 Change 3183005 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [^] Merging (as edit) PS4 OSS fixes from Engine to OrionGame. #jira UE-38017 UE-38020 Original Changelists: 3182765 [RELEASE] [PS4] [~] Additional logging for PS4 OSS "Play Together". 3182766 [RELEASE] [PS4] [!] Fix assert in FUniqueNetIdPS4::FindOrCreate. We were assuming an online-only ID could never become a local ID. This isn't the case in the following scenario: - Two users join a session on two separate PS4s. - One user signs into the other user's PS4 with the same account, with a second controller. PSN logs him out of the first PS4. - That user's Net ID has now migrated from being online-only, to local-with-online. This is a case that was not handled. 3182767 [RELEASE] [PS4] [!] Fix PS4 session invitations. - Was calling old Web API with SceNpOnlineId where SceNpAccountId is needed. - Replaced with NpToolkit2's session invitation API. 3182892 [RELEASE] [PS4] [!] Fix incorrect identity API implementation in PS4 OSS. - System events directly drive the login state of a user. This also removes the blocking call to sceNpGetState(). - GetAuthToken is only called if the engine calls IOnlineIdentity::Login(). 3182951 [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). Change 3182992 on 2016/11/02 by Nick.Darnell UMG Editor - Fixing a regression with the editor, closing the sequencer tab and reopening the editor should no longer cause a crash. #jira UE-38098 Change 3182951 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). #jira UE-38017 [CL 3201696 by Matthew Griffin in Main branch]
2016-11-17 04:29:30 -05:00
void UViewportWorldInteraction::OnEditorClosed()
{
if( IsActive() )
Copying //UE4/Release-Staging-4.14 to //UE4/Dev-Main (Source: //UE4/Release-4.14 @ 3195953) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3195953 on 2016/11/12 by Leslie.Nivison Rollback //UE4/Release-4.14/Engine/Plugins/Runtime/Nvidia to changelist 3193712 New GameWorks license from NVIDIA #jira UEPROD-900 Change 3195944 on 2016/11/12 by Leslie.Nivison Removing GameWorks SDK license until we get a new one from NVIDIA #jira UEPROD-900 Change 3195942 on 2016/11/11 by Chris.Gagnon Removing Ansel from 4.14 until revised EULA is handle. #jira UE-none Change 3195431 on 2016/11/11 by Mitchell.Wilson Rebuilt lighting in subway reflections sample #jira UE-38538 Change 3195080 on 2016/11/11 by mason.seay Extended floor to allow more driving space #jira UE-29618 Change 3194886 on 2016/11/11 by Chris.Babcock Correct handling for 6x6 blocksize in ASTC compressor #jira UE-38513 #ue4 #android Change 3193712 on 2016/11/10 by Leslie.Nivison Updating Ansel TPS info per NVIDIA response #jira UEPROD-900 Change 3193691 on 2016/11/10 by Lina.Halper #jira: UE-38488 Change 3193532 on 2016/11/10 by Lauren.Ridge Fix to keep the user in VR editing mode after leaving VR PIE. #jira UE-38317 Change 3193468 on 2016/11/10 by Leslie.Nivison Removing unneeded license #jira UEPROD-900 Change 3193465 on 2016/11/10 by Leslie.Nivison Updating credits for 4.14 #jira UEPROD-902 Change 3193416 on 2016/11/10 by Daniel.Lamb Changed default of exclude editor only content flag. #jira UE-38455 Change 3193399 on 2016/11/10 by Mitchell.Wilson Applied correct material to certain LODs of tree meshes in KiteDemo #jira UE-38472 Change 3193049 on 2016/11/10 by Thomas.Sarkanen Fix disappearing mesh on undo in skeletal mesh editor Also fixes crash on undo in morph target panel #jira UE-38430 - Undo in Skeletal Mesh Editor causes model to disappear #jira UE-38437 - Crash when Undo after editing a weight in Morph Target Previewer Change 3192655 on 2016/11/09 by Ryan.Vance #jira UE-37238 Pulling in 3164679 and 3169467 which didn't make the 4.14 cut. Also changed to a full inverse for InvTranslatedViewProjectionMatrix in FViewMatrices::UpdateViewMatrix. Change 3192613 on 2016/11/09 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3192197 on 2016/11/09 by Daniel.Wright Added SUPPORT_CONTACT_SHADOWS, only standard deferred lighting supports it. Fixes scene depth texture bound in forward shading base pass. #jira UE-38340 Change 3192182 on 2016/11/09 by Rolando.Caloca UE4.14 - Fix recompute tangents not working when skin cache is enabled #jira UE-38398 Change 3191695 on 2016/11/09 by Chris.Wood Editor heartbeat changes for 4.14 [AN-1003] - Make Editor heartbeat 1min [UE-38417] - Editor heartbeat changes (vanilla editor, new interval, debugger attached) Also added IsDebugger, IsVanilla and IntervalSec to Editor.Usage.Heartbeat #jira UE-38417 Change 3191437 on 2016/11/09 by Jack.Porter Fix for LandscapeInfo crash when using Force Delete #jira UE-37172 Change 3191033 on 2016/11/08 by Leslie.Nivison Adding licenses for marketplace plugins #jira UEPROD-901 Change 3191028 on 2016/11/08 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3190632 on 2016/11/08 by mason.seay Updated testmap and assets #jira UE-29618 Change 3190624 on 2016/11/08 by Jamie.Dale Fixed case where FHTML5TargetPlatform::RefreshHTML5Setup could incorrectly add an empty device Changes to UStrProperty::ExportTextItem caused FParse::Value to (correctly) read an empty string for DevicePath which passed the DirectoryExists check (where it would have previously read "))" which would fail that check). #jira UE-38157 Change 3190443 on 2016/11/08 by Josh.Adams - Somehow checking in my tested shelf messed up #jira UE-38304 Change 3190354 on 2016/11/08 by Josh.Adams - Vulkan now always being compiled in, if the SDK exists. Compiling not dependent on project settings #jira UE-38304 Change 3190123 on 2016/11/08 by zachary.wilson Updating testing content for sureface per-pixel improvements #jira UE-29618 Change 3190113 on 2016/11/08 by Alexis.Matte Make sure the default light map channel is 1 and not 0 #jira UE-35627 Change 3190102 on 2016/11/08 by Dmitry.Rekman Linux: default to binned everywhere (UE-38287). - Fixes suspicious crashes happening in uncooked build. Workaround, needs separate investigation. #jira UE-38287 Change 3190000 on 2016/11/08 by Allan.Bentham Removed old protostar loadmap hack. #jira UE-38342 Change 3189914 on 2016/11/08 by Allan.Bentham Fix vulkan crash when rendering sky capture. Fix crash when rendering LDR scene capture on device. #jira UE-38291 Change 3189861 on 2016/11/08 by Thomas.Sarkanen Fix out of bounds access when using hidden bones with master pose components Code was trying to to access the ReferenceToLocal array using a parent index from the master pose component. Now changed to only use indices known to be valid (i.e. this component's) to index the ReferenceToLocal array. Bone visibility is still master-authoratitive. #jira UE-38214 - [CrashReport] UE4Editor_Engine!UpdateRefToLocalMatrices() [skeletalrender.cpp:238] Change 3189370 on 2016/11/07 by Daniel.Wright Only check transform mismatches for static lighting in UStaticMeshComponent::ApplyComponentInstanceData on components that actually can have static lighting #jira UE-38272 Change 3189358 on 2016/11/07 by Mark.Satterthwaite Intel Metal drivers can no longer compile our compute shaders reliably meaning Intel Macs must always use Metal SM4 as otehrwise they will crash. #jira UE-38299 Change 3189273 on 2016/11/07 by Rolando.Caloca UE4.14 - Integrate fix from 3161219 #jira UE-38270 Change 3189084 on 2016/11/07 by Chris.Bunner Fix RemoveAAJitter from projection matrix. #jira UE-37701, UE-38003 Change 3188636 on 2016/11/07 by Allan.Bentham use glVertexAttribIPointer only on ES3.1 enabled projects. #jira UE-38241 Change 3188596 on 2016/11/07 by Yannick.Lange VR Editor: Fix crash when closing window while in VR Editor #jira UE-37995 Change 3188433 on 2016/11/07 by Matthew.Griffin Add starter content .upack files to starter_content tag so that they should still be installed if templates/feature packs option is de-selected in the Launcher Change 3187739 on 2016/11/04 by Mitchell.Wilson Updating DefautlEditor and DefaultEngine ini to correct path to VehicleMenu level. #jira UE-29748 Change 3187536 on 2016/11/04 by Martin.Wilson Fix for "Renaming a montage section via its details panel doesn't update the section correctly" #jira UE-35929 Change 3187499 on 2016/11/04 by zachary.wilson Checking in content fixes for Lighting Scenarios test level #jira UE-29618 Change 3187492 on 2016/11/04 by mason.seay Updated map to improve testing #jira UE-29618 Change 3187438 on 2016/11/04 by Nick.Shin fix html5 port number for cook-on-the-fly option #jira UE-38032 - Quicklaunch HTML5 fails on Chrome. Browser returns "This site can't be reached 127.0.0.1 refused to connect" Change 3187305 on 2016/11/04 by Martin.Wilson Fix log spam from animation sequence thumbnails #jira UE-38224 Change 3187260 on 2016/11/04 by Lauren.Ridge Fix for crash on opening a level in VR Editing mode. When closing VREditorMode for a level load, HMD no longer leaves stereo mode. #jira UE-32541 Change 3187224 on 2016/11/04 by Robert.Manuszewski Proper fix for a crash when launching BP-only project from the Editor with EDL enabled (does not modify UE4Game target binaries) #jira UE-37617 Change 3187136 on 2016/11/04 by Alexis.Matte Fbx importer for static mesh, make sure that we order the materials array to follow the section order. #jira UE-38242 Change 3187065 on 2016/11/04 by Mitchell.Wilson Updated BP_Commentary_Box to resolve warnings with array if the box opens then closes before the text is rendered. #jira UE-38266 Change 3187056 on 2016/11/04 by Mike.Beach Guarding against a rare crash that occurs when compiling a Blueprint after hot-reload. GUnrealEd was null, which is concerning (as it could have resounding effects in other systems), but as I could not repro it more than once (to figure it out more) I simply guarded the use of a null pointer here. #jira UE-38198 Change 3187040 on 2016/11/04 by Matthew.Griffin Corrected path to DotNETCommon folder Exclude all editor plugin pdbs from stripping #jira UE-37072 Change 3186984 on 2016/11/04 by Marc.Audy Fix crash when null component considered #jira UE-36493 Change 3186600 on 2016/11/04 by Max.Chen Sequencer: Fix crash in sequencer editor mode. #jira UE-38205 Change 3186564 on 2016/11/04 by Nick.Shin checking in latest physx libs for html5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186258 on 2016/11/03 by Nick.Shin fix for automation build to handle deleting of windows x86 & x64 libs properly #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186225 on 2016/11/03 by Lauren.Ridge Fix for foliage brush not showing up until after first motion controller click. #jira UE-38002 Change 3186100 on 2016/11/03 by Chris.Babcock Update local notifications to deal with depreciated API #jira UE-38236 #ue4 #android Change 3186074 on 2016/11/03 by Mitchell.Wilson Rebuilt lighting in Content Examples Welcome level #jira UE-38239 Change 3185923 on 2016/11/03 by Lina.Halper Fixed issue with animation not ticking in inactive world causing it to update parent animation #jira: UE-37933 Change 3185764 on 2016/11/03 by Mitchell.Wilson Updating deprecated node in MyCharacter_UMG. #jira UE-38229 Change 3185683 on 2016/11/03 by Nick.Shin non SSE2 version of PhysX for HTML5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3185492 on 2016/11/03 by Ben.Woodhouse Workaround for very high render query memory overhead on D3D12. Add a cvar to limit timestamp queries allocated by the GPU profiler in a given frame. On D3D12 this limit is 1024 - other RHIs remain unbounded. Currently render queries are 64KB each on D3D12, so this prevents high memory overhead on particular frames, e.g when we render a large number of reflection captures. In practice, most frames are under 400 queries, so in practice we shouldn't hit the limit except in extreme cases. #jira UE-38139 Change 3185481 on 2016/11/03 by Dmitry.Rekman Remove version number from Linux README (UE-38059). #jira UE-38059 Change 3185322 on 2016/11/03 by Ryan.Gerleve Allow path names in NetFieldExportGroups to be remapped on the client. #jira UE-37990 Change 3185293 on 2016/11/03 by Matthew.Griffin Exclude UnrealControls and iPhonePackager from Build Tools CS node on non-Windows platforms as they don't compile #jira UE-34016 Change 3185252 on 2016/11/03 by Michael.Trepka Properly revert to OpenGL on Macs that do not support Metal #jira UE-38190 Change 3184835 on 2016/11/03 by Jurre.deBaare Crash when using undo in the preview scene settings of Persona #fix Ensure that the profile index is valid after undo-ing #misc Added transactions for adding/remove of the profiles #jira UE-38142 Change 3184833 on 2016/11/03 by Jack.Porter Fixed crash when ENABLE_VERIFY_GL and r.MobileOnChipMSAA is enabled on Android #jira UE-38186 Change 3184418 on 2016/11/02 by Ryan.Vance #jira UE-38161 Adding ISceneViewExtension::UsePostInitView which will be used to enable/disable the usage of PostRenderViewFamily_RenderThread and PostRenderView_RenderThread which was added earlier. We need to enable this behavior based on the hmd's compositor behavior, so a simple cvar wont work. I missed the PostPresent implementation for steamvr in the earlier check in. Change 3184286 on 2016/11/02 by Dan.Oconnor Fix for IsValidLowLevel check being rotten. More correct fix will go into Dev-BP, but this is a low risk stop-gap #jira UE-38149 Change 3184283 on 2016/11/02 by Arne.Schober DR - UE-38155 replicated MS CL 3183837 - PSO Dangling Pointers: The PSO cache was returning pointers out of a Map which is based on a sparse Array and those pointers could become invalid if other insertions happen. #jira UE-38155 Change 3184244 on 2016/11/02 by Richard.Ugarte #jira UE-37534 Checking in updated UE4_Demo_Head_D on behalf of MikeB Change 3184171 on 2016/11/02 by Michael.Trepka Made Mac CrashReportClient high-DPI aware and fixed high-DPI handling in FMacWindow::IsPointInWindow() #jira UE-37697 Change 3184126 on 2016/11/02 by Lauren.Ridge VR Editor: Fixes for foliage painting only working on one controller, and for full press not painting foliage. #jira UE-38147 #jira UE-38002 Change 3183997 on 2016/11/02 by Mitchell.Wilson Scaled and Rotated 3d Widget to the correct position on example 2.3 in Content Examples UMG. Adjusted collision on example 1.4 in Content Examples Physics. Updated collision on SM_ExampleMesh_Rocket. Realigned some text render actors in Content Examples Post Process. #jira UE-38099 UE-38078 UE-38064 Change 3183945 on 2016/11/02 by Mieszko.Zielinski Fixed changing AreaClass of NavLinkProxy point links not having any effect on navmesh generation #UE4 #jira UE-38137 Change 3183906 on 2016/11/02 by Nick.Shin for OSX (release-4.14 stream): new OSX clang (from emscripten tool chain) configured by jukka from Mozilla see Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/incoming/EPIC_VERSION for details on where did this version come from fixes for OSX -- update existing (bash shell script and UE4 c#) build files to use the new "incoming" emsdk #jira UE-37329 - Step 'Compile UE4Game HTML5' - 300 Warnings Change 3183899 on 2016/11/02 by Mieszko.Zielinski Fixed EQS debugger not drawing item labels #UE4 #jira UE-38122 Change 3183239 on 2016/11/02 by Peter.Sauerbrei fix for mobile provision with UUID only filename being allowed again by copying them to a new file name which allows them to be used. #jira UE-38006 Change 3183149 on 2016/11/02 by Luke.Thatcher [RELEASE] [SHOOTERGAME] [!] Fix "Is Talking" icon on ShooterGame scoreboard, after PS4 OSS refactor. - ShooterGame was comparing FUniqueNetId::ToString() against AShooterPlayerState::GetShortPlayerName(). - This is wrong, since the NetId is not guaranteed to be equal to the player's name. #jira UE-38011 Change 3183005 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [^] Merging (as edit) PS4 OSS fixes from Engine to OrionGame. #jira UE-38017 UE-38020 Original Changelists: 3182765 [RELEASE] [PS4] [~] Additional logging for PS4 OSS "Play Together". 3182766 [RELEASE] [PS4] [!] Fix assert in FUniqueNetIdPS4::FindOrCreate. We were assuming an online-only ID could never become a local ID. This isn't the case in the following scenario: - Two users join a session on two separate PS4s. - One user signs into the other user's PS4 with the same account, with a second controller. PSN logs him out of the first PS4. - That user's Net ID has now migrated from being online-only, to local-with-online. This is a case that was not handled. 3182767 [RELEASE] [PS4] [!] Fix PS4 session invitations. - Was calling old Web API with SceNpOnlineId where SceNpAccountId is needed. - Replaced with NpToolkit2's session invitation API. 3182892 [RELEASE] [PS4] [!] Fix incorrect identity API implementation in PS4 OSS. - System events directly drive the login state of a user. This also removes the blocking call to sceNpGetState(). - GetAuthToken is only called if the engine calls IOnlineIdentity::Login(). 3182951 [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). Change 3182992 on 2016/11/02 by Nick.Darnell UMG Editor - Fixing a regression with the editor, closing the sequencer tab and reopening the editor should no longer cause a crash. #jira UE-38098 Change 3182951 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). #jira UE-38017 [CL 3201696 by Matthew Griffin in Main branch]
2016-11-17 04:29:30 -05:00
{
Shutdown();
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
void UViewportWorldInteraction::Tick( float DeltaSeconds )
{
CurrentDeltaTime = DeltaSeconds;
if( RoomTransformToSetOnFrame.IsSet() )
{
const uint32 SetOnFrameNumber = RoomTransformToSetOnFrame.GetValue().Get<1>();
if( SetOnFrameNumber == CurrentTickNumber )
{
const FTransform& NewRoomTransform = RoomTransformToSetOnFrame.GetValue().Get<0>();
SetRoomTransform( NewRoomTransform );
RoomTransformToSetOnFrame.Reset();
}
}
OnPreWorldInteractionTickEvent.Broadcast( DeltaSeconds );
// Get the latest interactor data, and fill in our its data with fresh transforms
PollInputIfNeeded();
// Update hover. Note that hover can also be updated when ticking our sub-systems below.
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
HoverTick( DeltaSeconds );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
InteractionTick( DeltaSeconds );
// Update all the interactors
for ( UViewportInteractor* Interactor : Interactors )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
Interactor->Tick( DeltaSeconds );
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
OnPostWorldInteractionTickEvent.Broadcast( DeltaSeconds );
for (UViewportInteractor* Interactor : Interactors)
{
Interactor->ResetLaserEnd();
}
CurrentTickNumber++;
}
void UViewportWorldInteraction::AddInteractor( UViewportInteractor* Interactor )
{
Interactor->SetWorldInteraction( this );
Interactors.AddUnique( Interactor );
}
void UViewportWorldInteraction::RemoveInteractor( UViewportInteractor* Interactor )
{
Interactor->Shutdown();
Interactor->RemoveOtherInteractor();
Interactors.Remove( Interactor );
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
void UViewportWorldInteraction::SetTransformer( UViewportTransformer* NewTransformer )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Clear all existing transformables
const bool bNewObjectsSelected = false;
SetTransformables( TArray< TUniquePtr< class FViewportTransformable > >(), bNewObjectsSelected );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( ViewportTransformer != nullptr )
{
ViewportTransformer->Shutdown();
ViewportTransformer = nullptr;
}
ViewportTransformer = NewTransformer;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( ViewportTransformer == nullptr )
{
ViewportTransformer = NewObject<UActorTransformer>();
}
check( ViewportTransformer != nullptr );
ViewportTransformer->Init( this );
}
void UViewportWorldInteraction::SetTransformables( TArray< TUniquePtr< class FViewportTransformable > >&& NewTransformables, const bool bNewObjectsSelected )
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
{
// We're dealing with a new set of transformables, so clear out anything that was going on with the old ones.
bDraggedSinceLastSelection = false;
LastDragGizmoStartTransform = FTransform::Identity;
bIsInterpolatingTransformablesFromSnapshotTransform = false;
bFreezePlacementWhileInterpolatingTransformables = false;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
TransformablesInterpolationStartTime = FTimespan::Zero();
TransformablesInterpolationDuration = 1.0f;
// Clear our last dragging mode on all interactors, so no inertia from the last objects we dragged will
// be applied to the new transformables.
for( UViewportInteractor* Interactor : Interactors )
{
FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
InteractorData.LastDraggingMode = EViewportInteractionDraggingMode::Nothing;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
Transformables = MoveTemp( NewTransformables );
RefreshTransformGizmo( bNewObjectsSelected );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
void UViewportWorldInteraction::SetDefaultOptionalViewportClient(const TSharedPtr<class FEditorViewportClient>& InEditorViewportClient)
{
if (InEditorViewportClient.IsValid())
{
DefaultOptionalViewportClient = InEditorViewportClient.Get();
DefaultOptionalViewportClient->ShowWidget(false);
}
}
void UViewportWorldInteraction::PairInteractors( UViewportInteractor* FirstInteractor, UViewportInteractor* SecondInteractor )
{
FirstInteractor->SetOtherInteractor( SecondInteractor );
SecondInteractor->SetOtherInteractor( FirstInteractor );
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bool UViewportWorldInteraction::InputKey( FEditorViewportClient* InViewportClient, FViewport* Viewport, FKey Key, EInputEvent Event )
{
bool bWasHandled = false;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( IsActive() && !bWasHandled )
{
check( InViewportClient != nullptr );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Don't bother processing clicks if Alt is held down, as that's used for orbit in level viewports
FInputEventState InputState( InViewportClient->Viewport, Key, Event );
const bool bAltOrbitDragging = InputState.IsAltButtonPressed() && !InputState.IsCtrlButtonPressed() && !InputState.IsShiftButtonPressed() && Key == EKeys::LeftMouseButton;
if( !bAltOrbitDragging )
{
OnKeyInputEvent.Broadcast(InViewportClient, Key, Event, bWasHandled);
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( !bWasHandled || !IsActive() )
{
for( UViewportInteractor* Interactor : Interactors )
{
bWasHandled = Interactor->HandleInputKey( *InViewportClient, Key, Event );
// Stop iterating if the input was handled by an Interactor
if( bWasHandled || !IsActive() )
{
break;
}
}
}
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( bWasHandled )
{
// This is a temporary workaround so that we don't steal the handling of the drag tool from the viewport client
FInputEventState InputState( InViewportClient->Viewport, Key, Event );
const bool bMarqueeSelecting = InputState.IsAltButtonPressed() && InputState.IsCtrlButtonPressed() && Key == EKeys::LeftMouseButton;
if( bMarqueeSelecting )
{
bWasHandled = false;
}
}
return bWasHandled;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bool UViewportWorldInteraction::PreprocessedInputKey( const FKey Key, const EInputEvent Event )
{
if( DefaultOptionalViewportClient != nullptr && bUseInputPreprocessor == true )
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
{
return InputKey( DefaultOptionalViewportClient, DefaultOptionalViewportClient->Viewport, Key, Event );
}
return false;
}
bool UViewportWorldInteraction::InputAxis( FEditorViewportClient* InViewportClient, FViewport* Viewport, int32 ControllerId, FKey Key, float Delta, float DeltaTime )
{
bool bWasHandled = false;
if( IsActive() )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
check( InViewportClient != nullptr );
OnAxisInputEvent.Broadcast( InViewportClient, ControllerId, Key, Delta, DeltaTime, bWasHandled );
if( !bWasHandled || !IsActive() )
{
for( UViewportInteractor* Interactor : Interactors )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bWasHandled = Interactor->HandleInputAxis( *InViewportClient, Key, Delta, DeltaTime );
// Stop iterating if the input was handled by an interactor
if( bWasHandled || !IsActive() )
{
break;
}
}
}
}
return bWasHandled;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bool UViewportWorldInteraction::PreprocessedInputAxis( const int32 ControllerId, const FKey Key, const float Delta, const float DeltaTime )
{
if( DefaultOptionalViewportClient != nullptr && bUseInputPreprocessor == true )
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
{
return InputAxis( DefaultOptionalViewportClient, DefaultOptionalViewportClient->Viewport, ControllerId, Key, Delta, DeltaTime );
}
return false;
}
FTransform UViewportWorldInteraction::GetRoomTransform() const
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
FTransform RoomTransform;
if( DefaultOptionalViewportClient != nullptr )
{
RoomTransform = FTransform(
DefaultOptionalViewportClient->GetViewRotation().Quaternion(),
DefaultOptionalViewportClient->GetViewLocation(),
FVector( 1.0f ) );
}
return RoomTransform;
}
FTransform UViewportWorldInteraction::GetRoomSpaceHeadTransform() const
{
FTransform HeadTransform = FTransform::Identity;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( HaveHeadTransform() )
{
FQuat RoomSpaceHeadOrientation;
FVector RoomSpaceHeadLocation;
GEngine->XRSystem->GetCurrentPose( IXRTrackingSystem::HMDDeviceId, /* Out */ RoomSpaceHeadOrientation, /* Out */ RoomSpaceHeadLocation );
HeadTransform = FTransform(
RoomSpaceHeadOrientation,
RoomSpaceHeadLocation,
FVector( 1.0f ) );
}
return HeadTransform;
}
FTransform UViewportWorldInteraction::GetHeadTransform() const
{
return GetRoomSpaceHeadTransform() * GetRoomTransform();
}
void UViewportWorldInteraction::SetHeadTransform( const FTransform& NewHeadTransform )
{
if (DefaultOptionalViewportClient != nullptr)
{
FRotator UseRotation( NewHeadTransform.GetRotation().Rotator() );
// adjust the yaw by the difference of the flag and the HMD
float YawDifference = GetHeadTransform().GetRotation().Rotator().Yaw - UseRotation.Yaw;
UseRotation.Yaw = GetRoomTransform().GetRotation().Rotator().Yaw - YawDifference;
UseRotation.Pitch = 0.0f;
UseRotation.Roll = 0.0f;
FVector Location( NewHeadTransform.GetLocation() );
// get HMD location in room space but scaled to the floor.
FVector HMDLocationOffset( GetRoomSpaceHeadTransform().GetLocation() * FVector( 1.0f, 1.0f, 1.0f ) );
// rotate the offset vector by the rotator
HMDLocationOffset = UseRotation.RotateVector( HMDLocationOffset );
// offset the room location by the HMD
Location -= HMDLocationOffset;
FTransform NewRoomTransform;
NewRoomTransform.SetLocation( Location );
NewRoomTransform.SetRotation( UseRotation.Quaternion() );
RoomTransformToSetOnFrame = MakeTuple( NewRoomTransform, CurrentTickNumber + 1 );
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bool UViewportWorldInteraction::HaveHeadTransform() const
{
return DefaultOptionalViewportClient != nullptr && GEngine->XRSystem.IsValid() && GEngine->StereoRenderingDevice.IsValid() && GEngine->StereoRenderingDevice->IsStereoEnabled();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
void UViewportWorldInteraction::SetRoomTransform( const FTransform& NewRoomTransform )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( DefaultOptionalViewportClient != nullptr )
{
DefaultOptionalViewportClient->SetViewLocation( NewRoomTransform.GetLocation() );
DefaultOptionalViewportClient->SetViewRotation( NewRoomTransform.GetRotation().Rotator() );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Forcibly dirty the viewport camera location
const bool bDollyCamera = false;
DefaultOptionalViewportClient->MoveViewportCamera( FVector::ZeroVector, FRotator::ZeroRotator, bDollyCamera );
}
}
void UViewportWorldInteraction::SetRoomTransformForNextFrame(const FTransform& NewRoomTransform)
{
RoomTransformToSetOnFrame = MakeTuple(NewRoomTransform, CurrentTickNumber + 1);
}
float UViewportWorldInteraction::GetWorldScaleFactor() const
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
return GetWorld()->GetWorldSettings()->WorldToMeters / 100.0f;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
FEditorViewportClient* UViewportWorldInteraction::GetDefaultOptionalViewportClient() const
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
return DefaultOptionalViewportClient;
}
void UViewportWorldInteraction::Undo()
{
PlaySound(AssetContainer->UndoSound, TransformGizmoActor->GetActorLocation());
bPlayNextRefreshTransformGizmoSound = false;
ExecCommand(FString("TRANSACTION UNDO"));
}
void UViewportWorldInteraction::Redo()
{
PlaySound(AssetContainer->RedoSound, TransformGizmoActor->GetActorLocation());
bPlayNextRefreshTransformGizmoSound = false;
ExecCommand(FString("TRANSACTION REDO"));
}
void UViewportWorldInteraction::DeleteSelectedObjects()
{
if (FLevelEditorActionCallbacks::Delete_CanExecute())
{
ExecCommand(FString("DELETE"));
}
}
void UViewportWorldInteraction::Copy()
{
if (FLevelEditorActionCallbacks::Copy_CanExecute())
{
ExecCommand(FString("EDIT COPY"));
}
}
void UViewportWorldInteraction::Paste()
{
if (FLevelEditorActionCallbacks::Paste_CanExecute())
{
// @todo vreditor: Needs "paste here" style pasting (TO=HERE), but with ray
ExecCommand(FString("EDIT PASTE"));
}
}
void UViewportWorldInteraction::Duplicate()
{
if (FLevelEditorActionCallbacks::Duplicate_CanExecute())
{
ExecCommand(FString("DUPLICATE"));
}
}
void UViewportWorldInteraction::Deselect()
{
GEditor->SelectNone( true, true );
}
void UViewportWorldInteraction::HoverTick( const float DeltaTime )
{
for ( UViewportInteractor* Interactor : Interactors )
{
bool bWasHandled = false;
FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
Interactor->ResetHoverState();
FHitResult HitHoverResult = Interactor->GetHitResultFromLaserPointer();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
const bool bIsHoveringOverTransformGizmo =
HitHoverResult.HitObjectHandle.IsValid() &&
HitHoverResult.HitObjectHandle == TransformGizmoActor;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Prefer transform gizmo hover over everything else
if( !bIsHoveringOverTransformGizmo )
{
FVector HoverImpactPoint = FVector::ZeroVector;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
OnHoverUpdateEvent.Broadcast( Interactor, /* In/Out */ HoverImpactPoint, /* In/Out */ bWasHandled );
if( bWasHandled )
{
Interactor->SetHoverLocation(HoverImpactPoint);
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
}
if ( !bWasHandled )
{
UActorComponent* NewHoveredActorComponent = nullptr;
if ( HitHoverResult.HitObjectHandle.IsValid() )
{
USceneComponent* HoveredActorComponent = HitHoverResult.GetComponent();
if ( HoveredActorComponent && IsInteractableComponent( HoveredActorComponent ) )
{
AActor* Actor = HitHoverResult.HitObjectHandle.FetchActor();
HoveredObjects.Add( FViewportHoverTarget( Actor ) );
Interactor->SetHoverLocation(HitHoverResult.ImpactPoint);
bWasHandled = true;
if ( Actor == TransformGizmoActor )
{
NewHoveredActorComponent = HoveredActorComponent;
InteractorData.HoveringOverTransformGizmoComponent = HoveredActorComponent;
InteractorData.HoverHapticCheckLastHoveredGizmoComponent = HitHoverResult.GetComponent();
}
else
{
IViewportInteractableInterface* Interactable = Cast<IViewportInteractableInterface>( Actor );
if ( Interactable )
{
NewHoveredActorComponent = HoveredActorComponent;
// Check if the current hovered component of the interactor is different from the hitresult component
if ( NewHoveredActorComponent != InteractorData.LastHoveredActorComponent && !IsOtherInteractorHoveringOverComponent( Interactor, NewHoveredActorComponent ) )
{
Interactable->OnHoverEnter( Interactor, HitHoverResult );
}
Interactable->OnHover( Interactor );
}
}
}
}
// Leave hovered interactable
//@todo ViewportInteraction: This does not take into account when the other interactors are already hovering over this interactable
if ( InteractorData.LastHoveredActorComponent != nullptr && ( InteractorData.LastHoveredActorComponent != NewHoveredActorComponent || NewHoveredActorComponent == nullptr )
&& !IsOtherInteractorHoveringOverComponent( Interactor, NewHoveredActorComponent ) )
{
AActor* HoveredActor = InteractorData.LastHoveredActorComponent->GetOwner();
if ( HoveredActor )
{
IViewportInteractableInterface* Interactable = Cast<IViewportInteractableInterface>( HoveredActor );
if ( Interactable )
{
Interactable->OnHoverLeave( Interactor, NewHoveredActorComponent );
}
}
}
//Update the hovered actor component with the new component
InteractorData.LastHoveredActorComponent = NewHoveredActorComponent;
}
if (InteractorData.LastHoveredActorComponent == nullptr && HitHoverResult.GetComponent() != nullptr)
{
InteractorData.LastHoveredActorComponent = HitHoverResult.GetComponent();
}
}
}
void UViewportWorldInteraction::InteractionTick( const float DeltaTime )
{
const FTimespan CurrentTime = FTimespan::FromSeconds( FPlatformTime::Seconds() );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
const float WorldToMetersScale = GetWorld()->GetWorldSettings()->WorldToMeters;
// Update viewport with any objects that are currently hovered over
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( DefaultOptionalViewportClient != nullptr )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
const bool bUseEditorSelectionHoverFeedback = GEditor != NULL && GetDefault<ULevelEditorViewportSettings>()->bEnableViewportHoverFeedback;
if( bUseEditorSelectionHoverFeedback && DefaultOptionalViewportClient->IsLevelEditorClient())
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
FLevelEditorViewportClient* LevelEditorViewportClient = static_cast<FLevelEditorViewportClient*>( DefaultOptionalViewportClient );
LevelEditorViewportClient->UpdateHoveredObjects( HoveredObjects );
}
}
// This will be filled in again during the next input update
HoveredObjects.Reset();
}
const float WorldScaleFactor = GetWorldScaleFactor();
// Move selected actors
UViewportInteractor* DraggingWithInteractor = nullptr;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
UViewportInteractor* AssistingDragWithInteractor = nullptr;
for ( UViewportInteractor* Interactor : Interactors )
{
bool bCanSlideRayLength = false;
FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact )
{
check( DraggingWithInteractor == nullptr ); // Only support dragging one thing at a time right now!
DraggingWithInteractor = Interactor;
if (!InteractorData.bDraggingWithGrabberSphere)
{
bCanSlideRayLength = true;
}
}
if ( InteractorData.DraggingMode == EViewportInteractionDraggingMode::AssistingDrag )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
check( AssistingDragWithInteractor == nullptr ); // Only support assisting one thing at a time right now!
AssistingDragWithInteractor = Interactor;
if( !InteractorData.bDraggingWithGrabberSphere )
{
bCanSlideRayLength = true;
}
}
if ( bCanSlideRayLength )
{
Interactor->CalculateDragRay( InteractorData.DragRayLength, InteractorData.DragRayLengthVelocity );
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
UViewportInteractor* InertiaFromInteractor = nullptr;
for ( UViewportInteractor* Interactor : Interactors )
{
FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact ||
( InteractorData.DraggingMode == EViewportInteractionDraggingMode::World && bAllowWorldMovement ) )
{
// Are we dragging with two interactors ?
UViewportInteractor* OtherInteractor = nullptr;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if ( AssistingDragWithInteractor != nullptr )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
OtherInteractor = AssistingDragWithInteractor;
}
UViewportInteractor* OtherInteractorThatWasAssistingDrag = GetOtherInteractorIntertiaContribute( Interactor );
FVector DraggedTo = InteractorData.Transform.GetLocation();
FVector DragDelta = DraggedTo - InteractorData.LastTransform.GetLocation();
FVector DragDeltaFromStart = DraggedTo - InteractorData.ImpactLocationAtDragStart;
FVector OtherHandDraggedTo = FVector::ZeroVector;
FVector OtherHandDragDelta = FVector::ZeroVector;
FVector OtherHandDragDeltaFromStart = FVector::ZeroVector;
if( OtherInteractor != nullptr )
{
OtherHandDraggedTo = OtherInteractor->GetInteractorData().Transform.GetLocation();
OtherHandDragDelta = OtherHandDraggedTo - OtherInteractor->GetInteractorData().LastTransform.GetLocation();
OtherHandDragDeltaFromStart = DraggedTo - OtherInteractor->GetInteractorData().ImpactLocationAtDragStart;
}
else if( OtherInteractorThatWasAssistingDrag != nullptr )
{
OtherHandDragDelta = OtherInteractorThatWasAssistingDrag->GetInteractorData().DragTranslationVelocity;
OtherHandDraggedTo = OtherInteractorThatWasAssistingDrag->GetInteractorData().LastDragToLocation + OtherHandDragDelta;
OtherHandDragDeltaFromStart = OtherHandDraggedTo - OtherInteractorThatWasAssistingDrag->GetInteractorData().ImpactLocationAtDragStart;
}
FVector LaserPointerStart = InteractorData.Transform.GetLocation();
FVector LaserPointerDirection = InteractorData.Transform.GetUnitAxis( EAxis::X );
FVector LaserPointerEnd = InteractorData.Transform.GetLocation();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact )
{
// Move objects using the laser pointer (in world space)
if( InteractorData.bDraggingWithGrabberSphere )
{
FSphere GrabberSphere;
if( Interactor->GetGrabberSphere( /* Out */ GrabberSphere ) )
{
// @todo grabber: Fill in LaserPointerStart LaserPointerEnd LaserPointerDirection (not used for anything when in TransformablesFreely mode)
const FVector RotatedOffsetFromSphereCenterAtDragStart = InteractorData.ImpactLocationAtDragStart - InteractorData.GrabberSphereLocationAtDragStart;
const FVector UnrotatedOffsetFromSphereCenterAtDragStart = InteractorData.InteractorTransformAtDragStart.GetRotation().UnrotateVector( RotatedOffsetFromSphereCenterAtDragStart );
DraggedTo = GrabberSphere.Center + InteractorData.Transform.GetRotation().RotateVector( UnrotatedOffsetFromSphereCenterAtDragStart );
const FVector WorldSpaceDragDelta = DraggedTo - InteractorData.LastDragToLocation;
DragDelta = WorldSpaceDragDelta;
InteractorData.DragTranslationVelocity = WorldSpaceDragDelta;
const FVector WorldSpaceDeltaFromStart = DraggedTo - InteractorData.ImpactLocationAtDragStart;
DragDeltaFromStart = WorldSpaceDeltaFromStart;
InteractorData.LastDragToLocation = DraggedTo;
// Update hover location (we only do this when dragging using the laser pointer)
Interactor->SetHoverLocation(DraggedTo);
}
else
{
// We lost our grabber sphere, so cancel the drag
StopDragging( Interactor );
}
}
else if( Interactor->GetLaserPointer( /* Out */ LaserPointerStart, /* Out */ LaserPointerEnd ) )
{
LaserPointerDirection = ( LaserPointerEnd - LaserPointerStart ).GetSafeNormal();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact )
{
// Check to see if the laser pointer is over something we can drop on
FVector HitLocation = FVector::ZeroVector;
bool bHitSomething = FindPlacementPointUnderLaser( Interactor, /* Out */ HitLocation );
if( !bHitSomething )
{
HitLocation = LaserPointerStart + LaserPointerDirection * InteractorData.DragRayLength;
}
if( InteractorData.bIsFirstDragUpdate || !bFreezePlacementWhileInterpolatingTransformables || !bIsInterpolatingTransformablesFromSnapshotTransform )
{
InteractorData.DragRayLength = ( LaserPointerStart - HitLocation ).Size();
DraggedTo = HitLocation;
// If the object moved reasonably far between frames, it might be because the angle we were aligning
// the object with during placement changed radically. To avoid it popping, we smoothly interpolate
// it's position over a very short timespan
if( !bIsInterpolatingTransformablesFromSnapshotTransform ) // Let the last animation finish first
{
const FVector WorldSpaceDragDelta = InteractorData.bIsFirstDragUpdate ? FVector::ZeroVector : ( DraggedTo - InteractorData.LastDragToLocation );
const float ScaledDragDistance = WorldSpaceDragDelta.Size() * WorldScaleFactor;
if( ScaledDragDistance >= VI::DragAtLaserImpactInterpolationThreshold->GetFloat() )
{
bIsInterpolatingTransformablesFromSnapshotTransform = true;
bFreezePlacementWhileInterpolatingTransformables = true;
TransformablesInterpolationStartTime = CurrentTime;
TransformablesInterpolationDuration = VI::DragAtLaserImpactInterpolationDuration->GetFloat();
// Snapshot time!
InteractorData.GizmoInterpolationSnapshotTransform = InteractorData.GizmoLastTransform;
}
}
}
else
{
// Keep interpolating toward the previous placement location
check( bFreezePlacementWhileInterpolatingTransformables );
DraggedTo = InteractorData.LastDragToLocation;
}
}
else
{
DraggedTo = LaserPointerStart + LaserPointerDirection * InteractorData.DragRayLength;
}
const FVector WorldSpaceDragDelta = DraggedTo - InteractorData.LastDragToLocation;
DragDelta = WorldSpaceDragDelta;
InteractorData.DragTranslationVelocity = WorldSpaceDragDelta;
const FVector WorldSpaceDeltaFromStart = DraggedTo - InteractorData.ImpactLocationAtDragStart;
DragDeltaFromStart = WorldSpaceDeltaFromStart;
InteractorData.LastDragToLocation = DraggedTo;
// Update hover location (we only do this when dragging using the laser pointer)
Interactor->SetHoverLocation(FMath::ClosestPointOnLine(LaserPointerStart, LaserPointerEnd, DraggedTo));
}
else
{
// We lost our laser pointer, so cancel the drag
StopDragging( Interactor );
}
if( OtherInteractor != nullptr ) // @todo grabber: Second hand support (should be doable)
{
FVector OtherHandLaserPointerStart, OtherHandLaserPointerEnd;
if( OtherInteractor->GetLaserPointer( /* Out */ OtherHandLaserPointerStart, /* Out */ OtherHandLaserPointerEnd ) )
{
FViewportInteractorData& OtherInteractorData = OtherInteractor->GetInteractorData();
const FVector OtherHandLaserPointerDirection = ( OtherHandLaserPointerEnd - OtherHandLaserPointerStart ).GetSafeNormal();
OtherHandDraggedTo = OtherHandLaserPointerStart + OtherHandLaserPointerDirection * OtherInteractorData.DragRayLength;
const FVector OtherHandWorldSpaceDragDelta = OtherHandDraggedTo - OtherInteractorData.LastDragToLocation;
OtherHandDragDelta = OtherHandWorldSpaceDragDelta;
OtherInteractorData.DragTranslationVelocity = OtherHandWorldSpaceDragDelta;
const FVector OtherHandWorldSpaceDeltaFromStart = OtherHandDraggedTo - OtherInteractorData.ImpactLocationAtDragStart;
OtherHandDragDeltaFromStart = OtherHandWorldSpaceDeltaFromStart;
OtherInteractorData.LastDragToLocation = OtherHandDraggedTo;
// Only hover if we're using the laser pointer
OtherInteractor->SetHoverLocation(OtherHandDraggedTo);
}
else
{
// We lost our laser pointer, so cancel the drag assist
StopDragging( OtherInteractor );
}
}
}
else if( ensure( InteractorData.DraggingMode == EViewportInteractionDraggingMode::World ) )
{
// While we're changing WorldToMetersScale every frame, our room-space hand locations will be scaled as well! We need to
// inverse compensate for this scaling so that we can figure out how much the hands actually moved as if no scale happened.
// This only really matters when we're performing world scaling interactively.
const FVector RoomSpaceUnscaledHandLocation = ( InteractorData.RoomSpaceTransform.GetLocation() / WorldToMetersScale ) * LastWorldToMetersScale;
const FVector RoomSpaceUnscaledHandDelta = ( RoomSpaceUnscaledHandLocation - InteractorData.LastRoomSpaceTransform.GetLocation() );
// Move the world (in room space)
DraggedTo = InteractorData.LastRoomSpaceTransform.GetLocation() + RoomSpaceUnscaledHandDelta;
InteractorData.DragTranslationVelocity = RoomSpaceUnscaledHandDelta;
DragDelta = RoomSpaceUnscaledHandDelta;
InteractorData.LastDragToLocation = DraggedTo;
// Two handed?
if( OtherInteractor != nullptr )
{
FViewportInteractorData& OtherInteractorData = OtherInteractor->GetInteractorData();
const FVector OtherHandRoomSpaceUnscaledLocation = ( OtherInteractorData.RoomSpaceTransform.GetLocation() / WorldToMetersScale ) * LastWorldToMetersScale;
const FVector OtherHandRoomSpaceUnscaledHandDelta = ( OtherHandRoomSpaceUnscaledLocation - OtherInteractorData.LastRoomSpaceTransform.GetLocation() );
OtherHandDraggedTo = OtherInteractorData.LastRoomSpaceTransform.GetLocation() + OtherHandRoomSpaceUnscaledHandDelta;
OtherInteractorData.DragTranslationVelocity = OtherHandRoomSpaceUnscaledHandDelta;
OtherHandDragDelta = OtherHandRoomSpaceUnscaledHandDelta;
OtherInteractorData.LastDragToLocation = OtherHandDraggedTo;
}
}
{
const bool bIsMouseCursorInteractor = Cast<UMouseCursorInteractor>( Interactor ) != nullptr;
{
// Don't bother with inertia if we're not moving very fast. This filters out tiny accidental movements.
const FVector RoomSpaceHandDelta = bIsMouseCursorInteractor ?
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
( DragDelta ) : // For the mouse cursor the interactor origin won't change unless the camera moves, so just test the distance we dragged instead.
( InteractorData.RoomSpaceTransform.GetLocation() - InteractorData.LastRoomSpaceTransform.GetLocation() );
if( RoomSpaceHandDelta.Size() < VI::MinVelocityForInertia->GetFloat() * WorldScaleFactor )
{
InteractorData.DragTranslationVelocity = FVector::ZeroVector;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( AssistingDragWithInteractor != nullptr )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
FViewportInteractorData& AssistingOtherInteractorData = AssistingDragWithInteractor->GetInteractorData();
const FVector OtherHandRoomSpaceHandDelta = ( AssistingOtherInteractorData.RoomSpaceTransform.GetLocation() - AssistingOtherInteractorData.LastRoomSpaceTransform.GetLocation() );
if( OtherHandRoomSpaceHandDelta.Size() < VI::MinVelocityForInertia->GetFloat() * WorldScaleFactor )
{
AssistingOtherInteractorData.DragTranslationVelocity = FVector::ZeroVector;
}
}
}
}
UViewportDragOperation* DragOperation = nullptr;
if (InteractorData.DragOperationComponent.IsValid())
{
UViewportDragOperationComponent* DragOperationComponent = InteractorData.DragOperationComponent.Get();
if (DragOperationComponent->GetDragOperation() == nullptr)
{
DragOperationComponent->StartDragOperation();
}
DragOperation = DragOperationComponent->GetDragOperation();
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
const FVector OldViewLocation = DefaultOptionalViewportClient != nullptr ? DefaultOptionalViewportClient->GetViewLocation() : FVector::ZeroVector;
// Dragging transform gizmo handle
const bool bWithTwoHands = ( OtherInteractor != nullptr || OtherInteractorThatWasAssistingDrag != nullptr );
const bool bIsLaserPointerValid = true;
FVector UnsnappedDraggedTo = FVector::ZeroVector;
UpdateDragging(
DeltaTime,
InteractorData.bIsFirstDragUpdate,
Interactor,
InteractorData.DraggingMode,
DragOperation,
bWithTwoHands,
InteractorData.OptionalHandlePlacement,
DragDelta,
OtherHandDragDelta,
DraggedTo,
OtherHandDraggedTo,
DragDeltaFromStart,
OtherHandDragDeltaFromStart,
LaserPointerStart,
LaserPointerDirection,
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
Interactor->GetLaserPointerMaxLength(),
bIsLaserPointerValid,
InteractorData.GizmoStartTransform,
InteractorData.GizmoLastTransform,
InteractorData.GizmoTargetTransform,
InteractorData.GizmoUnsnappedTargetTransform,
InteractorData.GizmoInterpolationSnapshotTransform,
InteractorData.GizmoStartLocalBounds,
InteractorData.DraggingTransformGizmoComponent.Get(),
/* In/Out */ InteractorData.GizmoSpaceFirstDragUpdateOffsetAlongAxis,
/* In/Out */ InteractorData.GizmoSpaceDragDeltaFromStartOffset,
/* In/Out */ InteractorData.LockedWorldDragMode,
/* In/Out */ InteractorData.GizmoScaleSinceDragStarted,
/* In/Out */ InteractorData.GizmoRotationRadiansSinceDragStarted,
InteractorData.bIsDrivingVelocityOfSimulatedTransformables,
/* Out */ UnsnappedDraggedTo );
// Make sure the hover point is right on the position that we're dragging the object to. This is important
// when constraining dragged objects to a single axis or a plane
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo )
{
InteractorData.HoverLocation = FMath::ClosestPointOnSegment( UnsnappedDraggedTo, LaserPointerStart, LaserPointerEnd );
}
if( OtherInteractorThatWasAssistingDrag != nullptr )
{
OtherInteractorThatWasAssistingDrag->GetInteractorData().LastDragToLocation = OtherHandDraggedTo;
// Apply damping
const bool bVelocitySensitive = InteractorData.DraggingMode == EViewportInteractionDraggingMode::World;
ApplyVelocityDamping( OtherInteractorThatWasAssistingDrag->GetInteractorData().DragTranslationVelocity, bVelocitySensitive );
}
// If we were dragging the world, then play some haptic feedback
if( InteractorData.DraggingMode == EViewportInteractionDraggingMode::World )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
const FVector NewViewLocation = DefaultOptionalViewportClient != nullptr ? DefaultOptionalViewportClient->GetViewLocation() : FVector::ZeroVector;
// @todo vreditor: Consider doing this for inertial moves too (we need to remember the last hand that invoked the move.)
const float RoomSpaceHapticTranslationInterval = 25.0f; // @todo vreditor tweak: Hard coded haptic distance
const float WorldSpaceHapticTranslationInterval = RoomSpaceHapticTranslationInterval * WorldScaleFactor;
bool bCrossedGridLine = false;
for( int32 AxisIndex = 0; AxisIndex < 3; ++AxisIndex )
{
const int32 OldGridCellIndex = FMath::TruncToInt( OldViewLocation[ AxisIndex ] / WorldSpaceHapticTranslationInterval );
const int32 NewGridCellIndex = FMath::TruncToInt( NewViewLocation[ AxisIndex ] / WorldSpaceHapticTranslationInterval );
if( OldGridCellIndex != NewGridCellIndex )
{
bCrossedGridLine = true;
}
}
if( bCrossedGridLine )
{
// @todo vreditor: Make this a velocity-sensitive strength?
const float ForceFeedbackStrength = VI::GridHapticFeedbackStrength->GetFloat(); // @todo vreditor tweak: Force feedback strength and enable/disable should be user configurable in options
Interactor->PlayHapticEffect( ForceFeedbackStrength );
if ( bWithTwoHands )
{
Interactor->GetOtherInteractor()->PlayHapticEffect( ForceFeedbackStrength );
}
}
}
}
else if ( InteractorData.DraggingMode == EViewportInteractionDraggingMode::Interactable )
{
if ( DraggedInteractable )
{
UViewportDragOperationComponent* DragOperationComponent = DraggedInteractable->GetDragOperationComponent();
if ( DragOperationComponent )
{
UViewportDragOperation* DragOperation = DragOperationComponent->GetDragOperation();
if ( DragOperation )
{
DragOperation->ExecuteDrag( Interactor, DraggedInteractable );
}
}
}
else
{
InteractorData.DraggingMode = EViewportInteractionDraggingMode::Nothing;
}
}
// If we're not actively dragging, apply inertia to any selected elements that we've dragged around recently
else
{
if( (!InteractorData.DragTranslationVelocity.IsNearlyZero( VI::DragTranslationVelocityStopEpsilon->GetFloat() ) || bIsInterpolatingTransformablesFromSnapshotTransform) &&
!InteractorData.bWasAssistingDrag && // If we were only assisting, let the other hand take care of doing the update
!InteractorData.bIsDrivingVelocityOfSimulatedTransformables ) // If simulation mode is on, let the physics engine take care of inertia
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if( InteractorData.LastDraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo ||
InteractorData.LastDraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
InteractorData.LastDraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact )
{
InertiaFromInteractor = Interactor;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
const FVector DragDelta = InteractorData.DragTranslationVelocity;
const FVector DraggedTo = InteractorData.LastDragToLocation + DragDelta;
const FVector DragDeltaFromStart = DraggedTo - InteractorData.ImpactLocationAtDragStart;
UViewportInteractor* OtherInteractorThatWasAssistingDrag = GetOtherInteractorIntertiaContribute( Interactor );
const bool bWithTwoHands = ( OtherInteractorThatWasAssistingDrag != nullptr );
FVector OtherHandDragDelta = FVector::ZeroVector;
FVector OtherHandDragDeltaFromStart = FVector::ZeroVector;
FVector OtherHandDraggedTo = FVector::ZeroVector;
if( bWithTwoHands )
{
FViewportInteractorData& OtherInteractorThatWasAssistingDragData = OtherInteractorThatWasAssistingDrag->GetInteractorData();
OtherHandDragDelta = OtherInteractorThatWasAssistingDragData.DragTranslationVelocity;
OtherHandDraggedTo = OtherInteractorThatWasAssistingDragData.LastDragToLocation + OtherHandDragDelta;
OtherHandDragDeltaFromStart = OtherHandDraggedTo - OtherInteractorThatWasAssistingDragData.ImpactLocationAtDragStart;
}
const bool bIsLaserPointerValid = false; // Laser pointer has moved on to other things
FVector UnsnappedDraggedTo = FVector::ZeroVector;
UpdateDragging(
DeltaTime,
InteractorData.bIsFirstDragUpdate,
Interactor,
InteractorData.LastDraggingMode,
InteractorData.LastDragOperation,
bWithTwoHands,
InteractorData.OptionalHandlePlacement,
DragDelta,
OtherHandDragDelta,
DraggedTo,
OtherHandDraggedTo,
DragDeltaFromStart,
OtherHandDragDeltaFromStart,
FVector::ZeroVector, // No valid laser pointer during inertia
FVector::ZeroVector, // No valid laser pointer during inertia
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
0.0f, // No valid laser pointer during inertia
bIsLaserPointerValid,
InteractorData.GizmoStartTransform,
InteractorData.GizmoLastTransform,
InteractorData.GizmoTargetTransform,
InteractorData.GizmoUnsnappedTargetTransform,
InteractorData.GizmoInterpolationSnapshotTransform,
InteractorData.GizmoStartLocalBounds,
InteractorData.DraggingTransformGizmoComponent.Get(),
/* In/Out */ InteractorData.GizmoSpaceFirstDragUpdateOffsetAlongAxis,
/* In/Out */ InteractorData.GizmoSpaceDragDeltaFromStartOffset,
/* In/Out */ InteractorData.LockedWorldDragMode,
/* In/Out */ InteractorData.GizmoScaleSinceDragStarted,
/* In/Out */ InteractorData.GizmoRotationRadiansSinceDragStarted,
InteractorData.bIsDrivingVelocityOfSimulatedTransformables,
/* Out */ UnsnappedDraggedTo );
InteractorData.LastDragToLocation = DraggedTo;
const bool bVelocitySensitive = InteractorData.LastDraggingMode == EViewportInteractionDraggingMode::World;
ApplyVelocityDamping( InteractorData.DragTranslationVelocity, bVelocitySensitive );
if( OtherInteractorThatWasAssistingDrag != nullptr )
{
FViewportInteractorData& OtherInteractorThatWasAssistingDragData = OtherInteractorThatWasAssistingDrag->GetInteractorData();
OtherInteractorThatWasAssistingDragData.LastDragToLocation = OtherHandDraggedTo;
ApplyVelocityDamping( OtherInteractorThatWasAssistingDragData.DragTranslationVelocity, bVelocitySensitive );
}
}
else
{
InteractorData.DragTranslationVelocity = FVector::ZeroVector;
}
}
}
// Update transformables
const bool bSmoothSnappingEnabled = IsSmoothSnappingEnabled();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if ( bAreTransformablesMoving && ( bSmoothSnappingEnabled || bIsInterpolatingTransformablesFromSnapshotTransform ) )
{
const float SmoothSnapSpeed = VI::SmoothSnapSpeed->GetFloat();
const bool bUseElasticSnapping = bSmoothSnappingEnabled &&
VI::ElasticSnap->GetInt() > 0 &&
DraggingWithInteractor != nullptr && // Only while we're still dragging stuff!
VI::ActorSnap->GetInt() == 0; // Not while using actor align/snap
const float ElasticSnapStrength = VI::ElasticSnapStrength->GetFloat();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
float InterpProgress = 1.0f;
const bool bWasInterpolationNeeded = bIsInterpolatingTransformablesFromSnapshotTransform;
bool bDidInterpolationFinishThisUpdate = false;
if( bIsInterpolatingTransformablesFromSnapshotTransform )
{
InterpProgress = FMath::Clamp( (float)( CurrentTime - TransformablesInterpolationStartTime ).GetTotalSeconds() / TransformablesInterpolationDuration, 0.0f, 1.0f );
if( InterpProgress >= 1.0f - KINDA_SMALL_NUMBER )
{
// Finished interpolating
bIsInterpolatingTransformablesFromSnapshotTransform = false;
bFreezePlacementWhileInterpolatingTransformables = false;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bDidInterpolationFinishThisUpdate = true;
}
}
bool bIsStillSmoothSnapping = false;
UViewportInteractor* TransformingInteractor = DraggingWithInteractor != nullptr ? DraggingWithInteractor : InertiaFromInteractor;
if( TransformingInteractor != nullptr )
{
FViewportInteractorData& InteractorData = TransformingInteractor->GetInteractorData();
FTransform ActualGizmoTargetTransform = InteractorData.GizmoTargetTransform;
// If 'elastic snapping' is turned on, we'll have the object 'reach' toward its unsnapped position, so
// that the user always has visual feedback when they are dragging something around, even if they
// haven't dragged far enough to overcome the snap threshold.
if( bUseElasticSnapping )
{
ActualGizmoTargetTransform.BlendWith( InteractorData.GizmoUnsnappedTargetTransform, ElasticSnapStrength );
}
FTransform InterpolatedGizmoTransform = ActualGizmoTargetTransform;
if( !ActualGizmoTargetTransform.Equals( InteractorData.GizmoLastTransform, 0.0f ) )
{
// If we're really close, just snap it.
if( ActualGizmoTargetTransform.Equals( InteractorData.GizmoLastTransform, KINDA_SMALL_NUMBER ) )
{
InterpolatedGizmoTransform = InteractorData.GizmoLastTransform = ActualGizmoTargetTransform;
}
else
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bIsStillSmoothSnapping = true;
InterpolatedGizmoTransform.Blend(
InteractorData.GizmoLastTransform,
ActualGizmoTargetTransform,
FMath::Min( 1.0f, SmoothSnapSpeed * FMath::Min( DeltaTime, 1.0f / 30.0f ) ) );
}
InteractorData.GizmoLastTransform = InterpolatedGizmoTransform;
}
if( bIsInterpolatingTransformablesFromSnapshotTransform )
{
InterpolatedGizmoTransform.BlendWith( InteractorData.GizmoInterpolationSnapshotTransform, 1.0f - InterpProgress );
}
for ( TUniquePtr<FViewportTransformable>& TransformablePtr : Transformables )
{
FViewportTransformable& Transformable = *TransformablePtr;
// Update the transform!
// NOTE: We never sweep while smooth-snapping as the object will never end up where we want it to
// due to friction with the ground and other objects.
const bool bSweep = false;
Transformable.ApplyTransform( Transformable.StartTransform * InteractorData.GizmoStartTransform.Inverse() * InterpolatedGizmoTransform, bSweep );
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Did we finish interpolating in this update? If so, we need to finalize things and notify everyone
if( bAreTransformablesMoving &&
DraggingWithInteractor == nullptr &&
InertiaFromInteractor == nullptr &&
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
( !bWasInterpolationNeeded || bDidInterpolationFinishThisUpdate ) &&
!bIsStillSmoothSnapping )
{
FinishedMovingTransformables();
}
}
else
{
// Neither smooth snapping or interpolation is enabled right now, but the transformables could have some velocity
// applied. We'll check to see whether they've come to a rest, and if so finalize their positions.
if( bAreTransformablesMoving &&
DraggingWithInteractor == nullptr &&
InertiaFromInteractor == nullptr )
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
{
FinishedMovingTransformables();
}
}
// Refresh the transform gizmo every frame, just in case actors were moved by some external
// influence. Also, some features of the transform gizmo respond to camera position (like the
// measurement text labels), so it just makes sense to keep it up to date.
{
const bool bNewObjectsSelected = false;
RefreshTransformGizmo( bNewObjectsSelected );
}
LastWorldToMetersScale = WorldToMetersScale;
}
bool UViewportWorldInteraction::IsInteractableComponent( const UActorComponent* Component ) const
{
bool bResult = false;
// Don't interact primitive components that have been set as not selectable
if (Component != nullptr)
{
const UPrimitiveComponent* ComponentAsPrimitive = Cast<UPrimitiveComponent>(Component);
if (ComponentAsPrimitive != nullptr)
{
bResult = (ComponentAsPrimitive->bSelectable == true);
}
}
return bResult;
}
ABaseTransformGizmo* UViewportWorldInteraction::GetTransformGizmoActor()
{
SpawnTransformGizmoIfNeeded();
return TransformGizmoActor;
}
void UViewportWorldInteraction::SetDraggedSinceLastSelection( const bool bNewDraggedSinceLastSelection )
{
bDraggedSinceLastSelection = bNewDraggedSinceLastSelection;
}
void UViewportWorldInteraction::SetLastDragGizmoStartTransform( const FTransform NewLastDragGizmoStartTransform )
{
LastDragGizmoStartTransform = NewLastDragGizmoStartTransform;
}
const TArray<UViewportInteractor*>& UViewportWorldInteraction::GetInteractors() const
{
return Interactors;
}
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #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]
2016-11-23 15:48:37 -05:00
BEGIN_FUNCTION_BUILD_OPTIMIZATION
void UViewportWorldInteraction::UpdateDragging(
const float DeltaTime,
bool& bIsFirstDragUpdate,
UViewportInteractor* Interactor,
const EViewportInteractionDraggingMode DraggingMode,
UViewportDragOperation* DragOperation,
const bool bWithTwoHands,
const TOptional<FTransformGizmoHandlePlacement> OptionalHandlePlacement,
const FVector& DragDelta,
const FVector& OtherHandDragDelta,
const FVector& DraggedTo,
const FVector& OtherHandDraggedTo,
const FVector& DragDeltaFromStart,
const FVector& OtherHandDragDeltaFromStart,
const FVector& LaserPointerStart,
const FVector& LaserPointerDirection,
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
const float LaserPointerMaxLength,
const bool bIsLaserPointerValid,
const FTransform& GizmoStartTransform,
FTransform& GizmoLastTransform,
FTransform& GizmoTargetTransform,
FTransform& GizmoUnsnappedTargetTransform,
const FTransform& GizmoInterpolationSnapshotTransform,
const FBox& GizmoStartLocalBounds,
const USceneComponent* const DraggingTransformGizmoComponent,
FVector& GizmoSpaceFirstDragUpdateOffsetAlongAxis,
FVector& DragDeltaFromStartOffset,
ELockedWorldDragMode& LockedWorldDragMode,
float& GizmoScaleSinceDragStarted,
float& GizmoRotationRadiansSinceDragStarted,
bool& bIsDrivingVelocityOfSimulatedTransformables,
FVector& OutUnsnappedDraggedTo )
{
// IMPORTANT NOTE: Depending on the DraggingMode, the incoming coordinates can be in different coordinate spaces.
// -> When dragging objects around, everything is in world space unless otherwise specified in the variable name.
// -> When dragging the world around, everything is in room space unless otherwise specified.
bool bMovedTransformGizmo = false;
// This will be set to true if we want to set the physics velocity on the dragged objects based on how far
// we dragged this frame. Used for pushing objects around in Simulate mode. If this is set to false, we'll
// simply zero out the velocities instead to cancel out the physics engine's applied forces (e.g. gravity)
// while we're dragging objects around (otherwise, the objects will spaz out as soon as dragging stops.)
bool bShouldApplyVelocitiesFromDrag = false;
const ECoordSystem CoordSystem = GetTransformGizmoCoordinateSpace();
// Always snap objects relative to where they were when we first grabbed them. We never want objects to immediately
// teleport to the closest snap, but instead snaps should always be relative to the gizmo center
// NOTE: While placing objects, we always snap in world space, since the initial position isn't really at all useful
const bool bLocalSpaceSnapping =
CoordSystem == COORD_Local &&
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
DraggingMode != EViewportInteractionDraggingMode::TransformablesAtLaserImpact;
const FVector SnapGridBase = ( DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact || bLocalSpaceSnapping ) ? FVector::ZeroVector : GizmoStartTransform.GetLocation();
// Okay, time to move stuff! We'll do this part differently depending on whether we're dragging actual actors around
// or we're moving the camera (aka. dragging the world)
if (DragOperation != nullptr && DraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo)
{
FVector OutClosestPointOnLaser;
FVector ConstrainedDragDeltaFromStart = ComputeConstrainedDragDeltaFromStart(
bIsFirstDragUpdate,
DragOperation->bPlaneConstraint,
OptionalHandlePlacement,
DragDeltaFromStart,
LaserPointerStart,
LaserPointerDirection,
bIsLaserPointerValid,
GizmoStartTransform,
LaserPointerMaxLength,
/* In/Out */ GizmoSpaceFirstDragUpdateOffsetAlongAxis,
/* In/Out */ DragDeltaFromStartOffset,
/* Out */ OutClosestPointOnLaser);
// Set out put for hover point
OutUnsnappedDraggedTo = GizmoStartTransform.GetLocation() + OutClosestPointOnLaser;
// Grid snap!
const FVector DesiredGizmoLocation = GizmoStartTransform.GetLocation() + ConstrainedDragDeltaFromStart;
FDraggingTransformableData DragData;
DragData.Interactor = Interactor;
DragData.WorldInteraction = this;
DragData.OptionalHandlePlacement = OptionalHandlePlacement;
DragData.DragDelta = DragDelta;
DragData.ConstrainedDragDelta = ConstrainedDragDeltaFromStart;
DragData.OtherHandDragDelta = OtherHandDragDelta;
DragData.DraggedTo = DraggedTo;
DragData.OtherHandDraggedTo = OtherHandDraggedTo;
DragData.DragDeltaFromStart = DragDeltaFromStart;
DragData.OtherHandDragDeltaFromStart = OtherHandDragDeltaFromStart;
DragData.LaserPointerStart = LaserPointerStart;
DragData.LaserPointerDirection = LaserPointerDirection;
DragData.GizmoStartTransform = GizmoStartTransform;
DragData.GizmoLastTransform = GizmoLastTransform;
DragData.OutGizmoUnsnappedTargetTransform = GizmoUnsnappedTargetTransform;
DragData.OutUnsnappedDraggedTo = OutUnsnappedDraggedTo;
DragData.GizmoStartLocalBounds = GizmoStartLocalBounds;
DragData.GizmoCoordinateSpace = GetTransformGizmoCoordinateSpace();
DragData.PassDraggedTo = DesiredGizmoLocation;
DragOperation->ExecuteDrag(DragData);
GizmoTargetTransform = GizmoUnsnappedTargetTransform;
if (DragData.bAllowSnap)
{
// Translation snap
if (DragData.bOutTranslated && (AreAligningToActors() || FSnappingUtils::IsSnapToGridEnabled()))
{
const FVector ResultLocation = SnapLocation(bLocalSpaceSnapping,
DragData.OutGizmoUnsnappedTargetTransform.GetLocation(),
GizmoStartTransform,
SnapGridBase,
true /*bShouldConstrainMovement*/,
ConstrainedDragDeltaFromStart);
GizmoTargetTransform.SetLocation(ResultLocation);
}
// Rotation snap
if (DragData.bOutRotated && FSnappingUtils::IsRotationSnapEnabled())
{
FRotator RotationToSnap = DragData.OutGizmoUnsnappedTargetTransform.GetRotation().Rotator();
FSnappingUtils::SnapRotatorToGrid(RotationToSnap);
GizmoTargetTransform.SetRotation(RotationToSnap.Quaternion());
}
// Scale snap
if (DragData.bOutScaled && FSnappingUtils::IsScaleSnapEnabled())
{
FVector ScaleToSnap = DragData.OutGizmoUnsnappedTargetTransform.GetScale3D();
FSnappingUtils::SnapScale(ScaleToSnap, SnapGridBase);
GizmoTargetTransform.SetScale3D(ScaleToSnap);
}
}
GizmoUnsnappedTargetTransform = DragData.OutGizmoUnsnappedTargetTransform;
bMovedTransformGizmo = DragData.bOutMovedTransformGizmo;
bShouldApplyVelocitiesFromDrag = DragData.bOutShouldApplyVelocitiesFromDrag;
}
else if (DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact)
{
FVector OutClosestPointOnLaser;
FVector ConstrainedDragDeltaFromStart = ComputeConstrainedDragDeltaFromStart(
bIsFirstDragUpdate,
false,
OptionalHandlePlacement,
DragDeltaFromStart,
LaserPointerStart,
LaserPointerDirection,
bIsLaserPointerValid,
GizmoStartTransform,
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
LaserPointerMaxLength,
/* In/Out */ GizmoSpaceFirstDragUpdateOffsetAlongAxis,
/* In/Out */ DragDeltaFromStartOffset,
/* Out */ OutClosestPointOnLaser);
const FVector DesiredGizmoLocation = GizmoStartTransform.GetLocation() + ConstrainedDragDeltaFromStart;
// Set out put for hover point
OutUnsnappedDraggedTo = GizmoStartTransform.GetLocation() + OutClosestPointOnLaser;
// Grid snap!
const bool bShouldConstrainMovement = true;
FVector SnappedDraggedTo = SnapLocation(bLocalSpaceSnapping, DesiredGizmoLocation, GizmoStartTransform, SnapGridBase, bShouldConstrainMovement, ConstrainedDragDeltaFromStart);
// Two passes. First update the real transform. Then update the unsnapped transform.
for (int32 PassIndex = 0; PassIndex < 2; ++PassIndex)
{
const bool bIsUpdatingUnsnappedTarget = (PassIndex == 1);
const FVector& PassDraggedTo = bIsUpdatingUnsnappedTarget ? DesiredGizmoLocation : SnappedDraggedTo;
// Translate the gizmo!
FTransform& PassGizmoTargetTransform = bIsUpdatingUnsnappedTarget ? GizmoUnsnappedTargetTransform : GizmoTargetTransform;
PassGizmoTargetTransform.SetLocation(PassDraggedTo);
bMovedTransformGizmo = true;
bShouldApplyVelocitiesFromDrag = true;
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
else if ( DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
DraggingMode == EViewportInteractionDraggingMode::World )
{
// If we have only one thing selected and it's a certain type of object (like a camera), then we might be able to "carry" it instead of
// translating it like usual. Carrying just means to freely rotate and translate the object proportionally to how far the end of the
// laser has moved since you started dragging it. It's useful for things that you are aiming, like a camera.
const bool bCanBeCarried = Transformables.Num() == 1 && Transformables[0].Get()->ShouldBeCarried();
const bool bIsCarrying = bCanBeCarried && VI::AllowCarryingCertainObjects->GetInt() != 0 && DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely && !bWithTwoHands;
FTransform NewGizmoToWorld = FTransform::Identity;
if (bIsCarrying)
{
const FTransform InteractorToWorld = Interactor->GetInteractorData().Transform;
const FTransform WorldToInteractor = InteractorToWorld.Inverse();
const FTransform LaserImpactToInteractor(FRotator::ZeroRotator, WorldToInteractor.TransformPosition(DraggedTo));
const FTransform LaserImpactToWorld = LaserImpactToInteractor * InteractorToWorld;
const FTransform LaserImpactStartToInteractorStart = LaserImpactToInteractor; // @todo: Should use DraggedToAtStart, not DraggedTo above for this ideally (won't handle laser length change during drag)
const FTransform InteractorStartToWorld = Interactor->GetInteractorData().InteractorTransformAtDragStart;
const FTransform LaserImpactStartToWorld = LaserImpactStartToInteractorStart * InteractorStartToWorld;
const FTransform GizmoStartToWorld = GizmoStartTransform;
const FTransform WorldToGizmoStart = GizmoStartToWorld.Inverse();
const FTransform LaserImpactStartToGizmoStart = LaserImpactStartToWorld * WorldToGizmoStart;
const FTransform FixedOffsetFromLaser = LaserImpactStartToGizmoStart.Inverse();
const FTransform NewTargetTransform = FixedOffsetFromLaser * LaserImpactToWorld;
if (!LastCarryingTransform.IsSet())
{
LastCarryingTransform = NewTargetTransform;
}
// Apply smoothing
NewGizmoToWorld.Blend(LastCarryingTransform.GetValue(), NewTargetTransform, VI::CarrySmoothingLerpAlpha->GetFloat());
LastCarryingTransform = NewGizmoToWorld;
}
else
{
FVector TranslationOffset = FVector::ZeroVector;
FQuat RotationOffset = FQuat::Identity;
FVector ScaleOffset = FVector(1.0f);
bool bHasPivotLocation = false;
FVector PivotLocation = FVector::ZeroVector;
if ( bWithTwoHands )
{
// Rotate/scale while simultaneously counter-translating (two hands)
// NOTE: The reason that we use per-frame deltas (rather than the delta from the start of the whole interaction,
// like we do with the other interaction modes), is because the point that we're rotating/scaling relative to
// actually changes every update as the user moves their hands. So it's iteratively getting the user to
// the result they naturally expect.
const FVector LineStart = DraggedTo;
const FVector LineStartDelta = DragDelta;
const float LineStartDistance = LineStartDelta.Size();
const FVector LastLineStart = LineStart - LineStartDelta;
const FVector LineEnd = OtherHandDraggedTo;
const FVector LineEndDelta = OtherHandDragDelta;
const float LineEndDistance = LineEndDelta.Size();
const FVector LastLineEnd = LineEnd - LineEndDelta;
// Choose a point along the new line segment to rotate and scale relative to. We'll weight it toward the
// side of the line that moved the most this update.
const float TotalDistance = LineStartDistance + LineEndDistance;
float LineStartToEndActivityWeight = 0.5f; // Default to right in the center, if no distance moved yet.
if (GetDefault<UVISettings>()->bScaleWorldWithDynamicPivot && !FMath::IsNearlyZero( TotalDistance ) ) // Avoid division by zero
{
LineStartToEndActivityWeight = LineStartDistance / TotalDistance;
}
PivotLocation = FMath::Lerp( LastLineStart, LastLineEnd, LineStartToEndActivityWeight );
bHasPivotLocation = true;
if ( DraggingMode == EViewportInteractionDraggingMode::World && GetDefault<UVISettings>()->bScaleWorldFromFloor)
{
PivotLocation.Z = 0.0f;
}
// @todo vreditor debug
if ( false )
{
const FTransform LinesRelativeTo = DraggingMode == EViewportInteractionDraggingMode::World ? GetRoomTransform() : FTransform::Identity;
DrawDebugLine( GetWorld(), LinesRelativeTo.TransformPosition( LineStart ), LinesRelativeTo.TransformPosition( LineEnd ), FColor::Green, false, 0.0f );
DrawDebugLine( GetWorld(), LinesRelativeTo.TransformPosition( LastLineStart ), LinesRelativeTo.TransformPosition( LastLineEnd ), FColor::Red, false, 0.0f );
DrawDebugSphere( GetWorld(), LinesRelativeTo.TransformPosition( PivotLocation ), 2.5f * GetWorldScaleFactor(), 32, FColor::White, false, 0.0f );
}
const float LastLineLength = ( LastLineEnd - LastLineStart ).Size();
const float LineLength = ( LineEnd - LineStart ).Size();
ScaleOffset = FVector( LineLength / LastLineLength );
// ScaleOffset = FVector( 0.98f + 0.04f * FMath::MakePulsatingValue( FPlatformTime::Seconds(), 0.1f ) ); // FVector( LineLength / LastLineLength );
GizmoScaleSinceDragStarted += ( LineLength - LastLineLength ) / GetWorldScaleFactor();
// How much did the line rotate since last time?
RotationOffset = FQuat::FindBetweenVectors( LastLineEnd - LastLineStart, LineEnd - LineStart );
GizmoRotationRadiansSinceDragStarted += RotationOffset.AngularDistance( FQuat::Identity );
// For translation, only move proportionally to the common vector between the two deltas. Basically,
// you need to move both hands in the same direction to translate while gripping with two hands.
const FVector AverageDelta = ( DragDelta + OtherHandDragDelta ) * 0.5f;
const float TranslationWeight = FMath::Max( 0.0f, FVector::DotProduct( DragDelta.GetSafeNormal(), OtherHandDragDelta.GetSafeNormal() ) );
TranslationOffset = FMath::Lerp( FVector::ZeroVector, AverageDelta, TranslationWeight );
}
else
{
// Translate only (one hand)
TranslationOffset = DragDelta;
//Apply drag scale only if dragging world
if (DraggingMode == EViewportInteractionDraggingMode::World)
{
TranslationOffset *= VI::DragScale->GetFloat();
}
GizmoScaleSinceDragStarted = 0.0f;
GizmoRotationRadiansSinceDragStarted = 0.0f;
}
if ( VI::AllowVerticalWorldMovement->GetInt() == 0 )
{
TranslationOffset.Z = 0.0f;
}
if ( DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely )
{
if( !bHasPivotLocation )
{
PivotLocation = GizmoUnsnappedTargetTransform.GetLocation();
bHasPivotLocation = true;
}
{
const FTransform ScaleOffsetTransform( FQuat::Identity, FVector::ZeroVector, ScaleOffset );
const FTransform TranslationOffsetTransform( FQuat::Identity, TranslationOffset );
const FTransform RotationOffsetTransform( RotationOffset, FVector::ZeroVector );
const FTransform PivotToWorld = FTransform( FQuat::Identity, PivotLocation );
const FTransform WorldToPivot = FTransform( FQuat::Identity, -PivotLocation );
NewGizmoToWorld = GizmoUnsnappedTargetTransform * WorldToPivot * ScaleOffsetTransform * RotationOffsetTransform * PivotToWorld * TranslationOffsetTransform;
}
}
else if ( DraggingMode == EViewportInteractionDraggingMode::World && !bSkipInteractiveWorldMovementThisFrame )
{
FTransform RoomTransform = GetRoomTransform();
if( bWithTwoHands )
{
if(!GetDefault<UVISettings>()->bAllowSimultaneousWorldScalingAndRotation &&
LockedWorldDragMode == ELockedWorldDragMode::Unlocked )
{
const bool bHasDraggedEnoughToScale = FMath::Abs(GizmoScaleSinceDragStarted) >= VI::WorldScalingDragThreshold->GetFloat();
if (bHasDraggedEnoughToScale)
{
LockedWorldDragMode = ELockedWorldDragMode::OnlyScaling;
}
const bool bHasDraggedEnoughToRotate = FMath::Abs(GizmoRotationRadiansSinceDragStarted) >= FMath::DegreesToRadians(VI::WorldRotationDragThreshold->GetFloat());
if (bHasDraggedEnoughToRotate)
{
LockedWorldDragMode = ELockedWorldDragMode::OnlyRotating;
}
}
}
else
{
// Only one hand is dragging world, so make sure everything is unlocked
LockedWorldDragMode = ELockedWorldDragMode::Unlocked;
GizmoScaleSinceDragStarted = 0.0f;
GizmoRotationRadiansSinceDragStarted = 0.0f;
}
const bool bAllowWorldTranslation =
(LockedWorldDragMode == ELockedWorldDragMode::Unlocked);
const bool bAllowWorldScaling =
bWithTwoHands
&&
(
(
(GetDefault<UVISettings>()->bAllowSimultaneousWorldScalingAndRotation)
&&
(LockedWorldDragMode == ELockedWorldDragMode::Unlocked)
)
||
(LockedWorldDragMode == ELockedWorldDragMode::OnlyScaling)
);
const bool bAllowWorldRotation =
bWithTwoHands
&&
(
(
(GetDefault<UVISettings>()->bAllowSimultaneousWorldScalingAndRotation)
&&
(LockedWorldDragMode == ELockedWorldDragMode::Unlocked)
)
||
(LockedWorldDragMode == ELockedWorldDragMode::OnlyRotating)
);
if (bAllowWorldScaling)
{
// Adjust world scale
const float WorldScaleOffset = ScaleOffset.GetAbsMax();
if (WorldScaleOffset != 0.0f)
{
const float OldWorldToMetersScale = GetWorld()->GetWorldSettings()->WorldToMeters;
const float NewWorldToMetersScale = OldWorldToMetersScale / WorldScaleOffset;
// NOTE: Instead of clamping, we simply skip changing the W2M this frame if it's out of bounds. Clamping makes our math more complicated.
if (!FMath::IsNearlyEqual(NewWorldToMetersScale, OldWorldToMetersScale) &&
NewWorldToMetersScale >= GetMinScale() && NewWorldToMetersScale <= GetMaxScale())
{
SetWorldToMetersScale(NewWorldToMetersScale);
CompensateRoomTransformForWorldScale(RoomTransform, NewWorldToMetersScale, PivotLocation);
}
}
}
// Apply rotation and translation
{
FTransform RotationOffsetTransform = FTransform::Identity;
if (bAllowWorldRotation)
{
RotationOffsetTransform.SetRotation(RotationOffset);
if (VI::AllowWorldRotationPitchAndRoll->GetInt() == 0)
{
// Eliminate pitch and roll in rotation offset. We don't want the user to get sick!
FRotator YawRotationOffset = RotationOffset.Rotator();
YawRotationOffset.Pitch = YawRotationOffset.Roll = 0.0f;
RotationOffsetTransform.SetRotation(YawRotationOffset.Quaternion());
}
}
// Move the camera in the opposite direction, so it feels to the user as if they're dragging the entire world around
FTransform TranslationOffsetTransform(FTransform::Identity);
if (bAllowWorldTranslation)
{
TranslationOffsetTransform.SetLocation(TranslationOffset);
}
const FTransform PivotToWorld = FTransform(FQuat::Identity, PivotLocation) * RoomTransform;
const FTransform WorldToPivot = PivotToWorld.Inverse();
RoomTransform = TranslationOffsetTransform.Inverse() * RoomTransform * WorldToPivot * RotationOffsetTransform.Inverse() * PivotToWorld;
}
RoomTransformToSetOnFrame = MakeTuple(RoomTransform, CurrentTickNumber + 1);
}
}
if (DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely)
{
// Grid snap!
FTransform SnappedNewGizmoToWorld = NewGizmoToWorld;
{
if (FSnappingUtils::IsSnapToGridEnabled() || AreAligningToActors())
{
const FVector GizmoDragDelta = NewGizmoToWorld.GetLocation() - GizmoUnsnappedTargetTransform.GetLocation();
const bool bShouldConstrainMovement = false;
SnappedNewGizmoToWorld.SetLocation(SnapLocation(bLocalSpaceSnapping, NewGizmoToWorld.GetLocation(), GizmoUnsnappedTargetTransform, SnapGridBase, bShouldConstrainMovement, GizmoDragDelta));
}
// Rotation snap
if (FSnappingUtils::IsRotationSnapEnabled())
{
FRotator RotationToSnap = SnappedNewGizmoToWorld.GetRotation().Rotator();
FSnappingUtils::SnapRotatorToGrid(RotationToSnap);
SnappedNewGizmoToWorld.SetRotation(RotationToSnap.Quaternion());
}
// Scale snap
if (FSnappingUtils::IsScaleSnapEnabled())
{
FVector ScaleToSnap = SnappedNewGizmoToWorld.GetScale3D();
FSnappingUtils::SnapScale(ScaleToSnap, SnapGridBase);
SnappedNewGizmoToWorld.SetScale3D(ScaleToSnap);
}
}
// Two passes. First update the real transform. Then update the unsnapped transform.
for (int32 PassIndex = 0; PassIndex < 2; ++PassIndex)
{
const bool bIsUpdatingUnsnappedTarget = (PassIndex == 1);
const FTransform NewTransform = (bIsUpdatingUnsnappedTarget ? NewGizmoToWorld : SnappedNewGizmoToWorld);
FTransform& PassGizmoTargetTransform = bIsUpdatingUnsnappedTarget ? GizmoUnsnappedTargetTransform : GizmoTargetTransform;
PassGizmoTargetTransform = NewTransform;
bMovedTransformGizmo = true;
bShouldApplyVelocitiesFromDrag = true;
}
}
}
// If we're not using smooth snapping, go ahead and immediately update the transforms of all objects. If smooth
// snapping is enabled, this will be done in Tick() instead.
if (bMovedTransformGizmo)
{
// Update velocity if we're simulating in editor
if (GEditor->bIsSimulatingInEditor)
{
FVector MoveDelta = GizmoUnsnappedTargetTransform.GetLocation() - GizmoLastTransform.GetLocation();
if( bShouldApplyVelocitiesFromDrag )
{
bIsDrivingVelocityOfSimulatedTransformables = true;
}
else
{
MoveDelta = FVector::ZeroVector;
}
for (TUniquePtr<FViewportTransformable>& TransformablePtr : Transformables)
{
FViewportTransformable& Transformable = *TransformablePtr;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// @todo VREditor physics: When freely transforming, should set angular velocity too (will pivot be the same though??)
if (Transformable.IsPhysicallySimulated())
{
Transformable.SetLinearVelocity( ( MoveDelta * VI::InertiaVelocityBoost->GetFloat() ) / DeltaTime );
}
}
}
const bool bSmoothSnappingEnabled = IsSmoothSnappingEnabled();
if (!bSmoothSnappingEnabled && !bIsInterpolatingTransformablesFromSnapshotTransform)
{
GizmoLastTransform = GizmoTargetTransform;
const bool bSweep = bShouldApplyVelocitiesFromDrag && VI::SweepPhysicsWhileSimulating->GetInt() != 0 && bIsDrivingVelocityOfSimulatedTransformables;
for (TUniquePtr<FViewportTransformable>& TransformablePtr : Transformables)
{
FViewportTransformable& Transformable = *TransformablePtr;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Update the transform!
Transformable.ApplyTransform(Transformable.StartTransform * GizmoStartTransform.Inverse() * GizmoTargetTransform , bSweep);
}
}
}
bIsFirstDragUpdate = false;
bSkipInteractiveWorldMovementThisFrame = false;
}
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #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]
2016-11-23 15:48:37 -05:00
END_FUNCTION_BUILD_OPTIMIZATION
FVector UViewportWorldInteraction::ComputeConstrainedDragDeltaFromStart(
const bool bIsFirstDragUpdate,
const bool bOnPlane,
const TOptional<FTransformGizmoHandlePlacement> OptionalHandlePlacement,
const FVector& DragDeltaFromStart,
const FVector& LaserPointerStart,
const FVector& LaserPointerDirection,
const bool bIsLaserPointerValid,
const FTransform& GizmoStartTransform,
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
const float LaserPointerMaxLength,
FVector& GizmoSpaceFirstDragUpdateOffsetAlongAxis,
FVector& GizmoSpaceDragDeltaFromStartOffset,
FVector& OutClosestPointOnLaser) const
{
FVector ConstrainedGizmoSpaceDeltaFromStart;
bool bConstrainDirectlyToLineOrPlane = false;
if ( OptionalHandlePlacement.IsSet() )
{
// Constrain to line/plane
const FTransformGizmoHandlePlacement& HandlePlacement = OptionalHandlePlacement.GetValue();
int32 CenterHandleCount, FacingAxisIndex, CenterAxisIndex;
HandlePlacement.GetCenterHandleCountAndFacingAxisIndex( /* Out */ CenterHandleCount, /* Out */ FacingAxisIndex, /* Out */ CenterAxisIndex );
// Our laser pointer ray won't be valid for inertial transform, since it's already moved on to other things. But the existing velocity should already be on axis.
bConstrainDirectlyToLineOrPlane = ( CenterHandleCount == 2 ) && bIsLaserPointerValid;
if ( bConstrainDirectlyToLineOrPlane )
{
const FVector GizmoSpaceLaserPointerStart = GizmoStartTransform.InverseTransformPosition( LaserPointerStart );
const FVector GizmoSpaceLaserPointerDirection = GizmoStartTransform.InverseTransformVectorNoScale( LaserPointerDirection );
FVector GizmoSpaceConstraintAxis =
FacingAxisIndex == 0 ? FVector::ForwardVector : ( FacingAxisIndex == 1 ? FVector::RightVector : FVector::UpVector );
if ( HandlePlacement.Axes[ FacingAxisIndex ] == ETransformGizmoHandleDirection::Negative )
{
GizmoSpaceConstraintAxis *= -1.0f;
}
if ( bOnPlane )
{
const FPlane GizmoSpaceConstrainToPlane( FVector::ZeroVector, GizmoSpaceConstraintAxis );
// 2D Plane
FVector GizmoSpacePointOnPlane = FVector::ZeroVector;
if ( !FMath::SegmentPlaneIntersection(
GizmoSpaceLaserPointerStart,
GizmoSpaceLaserPointerStart + LaserPointerMaxLength * GizmoSpaceLaserPointerDirection,
GizmoSpaceConstrainToPlane,
/* Out */ GizmoSpacePointOnPlane ) )
{
// No intersect. Default to no delta.
GizmoSpacePointOnPlane = FVector::ZeroVector;
}
// Gizmo space is defined as the starting position of the interaction, so we simply take the closest position
// along the plane as our delta from the start in gizmo space
ConstrainedGizmoSpaceDeltaFromStart = GizmoSpacePointOnPlane;
// Set out for the closest point on laser for clipping
OutClosestPointOnLaser = GizmoStartTransform.TransformVector(GizmoSpacePointOnPlane);
}
else
{
// 1D Line
const float AxisSegmentLength = LaserPointerMaxLength * 2.0f; // @todo vreditor: We're creating a line segment to represent an infinitely long axis, but really it just needs to be further than our laser pointer can reach
DVector GizmoSpaceClosestPointOnLaserDouble, GizmoSpaceClosestPointOnAxisDouble;
SegmentDistToSegmentDouble(
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
GizmoSpaceLaserPointerStart, DVector( GizmoSpaceLaserPointerStart ) + DVector( GizmoSpaceLaserPointerDirection ) * LaserPointerMaxLength,
DVector( GizmoSpaceConstraintAxis ) * -AxisSegmentLength, DVector( GizmoSpaceConstraintAxis ) * AxisSegmentLength,
/* Out */ GizmoSpaceClosestPointOnLaserDouble,
/* Out */ GizmoSpaceClosestPointOnAxisDouble );
// Gizmo space is defined as the starting position of the interaction, so we simply take the closest position
// along the axis as our delta from the start in gizmo space
ConstrainedGizmoSpaceDeltaFromStart = GizmoSpaceClosestPointOnAxisDouble.ToFVector();
// Set out for the closest point on laser for clipping
OutClosestPointOnLaser = GizmoStartTransform.TransformVector(GizmoSpaceClosestPointOnLaserDouble.ToFVector());
}
// Account for the handle position on the outside of the bounds. This is a bit confusing but very important for dragging
// to feel right. When constraining movement to either a plane or single axis, we always want the object to move exactly
// to the location under the laser/cursor -- it's an absolute movement. But if we did that on the first update frame, it
// would teleport from underneath the gizmo handle to that location.
{
if ( bIsFirstDragUpdate )
{
GizmoSpaceFirstDragUpdateOffsetAlongAxis = ConstrainedGizmoSpaceDeltaFromStart;
}
ConstrainedGizmoSpaceDeltaFromStart -= GizmoSpaceFirstDragUpdateOffsetAlongAxis;
// OK, it gets even more complicated. When dragging and releasing for inertial movement, this code path
// will no longer be executed (because the hand/laser has moved on to doing other things, and our drag
// is driven by velocity only). So we need to remember the LAST offset from the object's position to
// where we actually constrained it to, and continue to apply that delta during the inertial drag.
// That actually happens in the code block near the bottom of this function.
const FVector GizmoSpaceDragDeltaFromStart = GizmoStartTransform.InverseTransformVectorNoScale( DragDeltaFromStart );
GizmoSpaceDragDeltaFromStartOffset = ConstrainedGizmoSpaceDeltaFromStart - GizmoSpaceDragDeltaFromStart;
}
}
}
if ( !bConstrainDirectlyToLineOrPlane )
{
ConstrainedGizmoSpaceDeltaFromStart = GizmoStartTransform.InverseTransformVectorNoScale( DragDeltaFromStart );
// Apply axis constraint if we have one (and we haven't already constrained directly to a line)
if ( OptionalHandlePlacement.IsSet() )
{
// OK in this case, inertia is moving our selected objects while they remain constrained to
// either a plane or a single axis. Every frame, we need to apply the original delta between
// where the laser was aiming and where the object was constrained to on the LAST frame before
// the user released the object and it moved inertially. See the big comment up above for
// more information. Inertial movement of constrained objects is actually very complicated!
ConstrainedGizmoSpaceDeltaFromStart += GizmoSpaceDragDeltaFromStartOffset;
const FTransformGizmoHandlePlacement& HandlePlacement = OptionalHandlePlacement.GetValue();
for ( int32 AxisIndex = 0; AxisIndex < 3; ++AxisIndex )
{
if ( bOnPlane )
{
if ( HandlePlacement.Axes[ AxisIndex ] == ETransformGizmoHandleDirection::Positive )
{
// Lock the opposing axes out (plane translation)
ConstrainedGizmoSpaceDeltaFromStart[ AxisIndex ] = 0.0f;
}
}
else
{
if ( HandlePlacement.Axes[ AxisIndex ] == ETransformGizmoHandleDirection::Center )
{
// Lock the centered axis out (line translation)
ConstrainedGizmoSpaceDeltaFromStart[ AxisIndex ] = 0.0f;
}
}
}
}
}
FVector ConstrainedWorldSpaceDeltaFromStart = GizmoStartTransform.TransformVectorNoScale( ConstrainedGizmoSpaceDeltaFromStart );
return ConstrainedWorldSpaceDeltaFromStart;
}
void UViewportWorldInteraction::StartDragging( UViewportInteractor* Interactor, UActorComponent* ClickedTransformGizmoComponent, const FVector& HitLocation, const bool bIsPlacingNewObjects, const bool bAllowInterpolationWhenPlacing, const bool bShouldUseLaserImpactDrag, const bool bStartTransaction, const bool bWithGrabberSphere )
{
bool bHaveGrabberSphere = false;
bool bHaveLaserPointer = false;
FSphere GrabberSphere = FSphere( 0 );
FVector LaserPointerStart = FVector::ZeroVector;
FVector LaserPointerEnd = FVector::ZeroVector;
if( bWithGrabberSphere )
{
bHaveGrabberSphere = Interactor->GetGrabberSphere( /* Out */ GrabberSphere );
check( bHaveGrabberSphere );
}
else
{
bHaveLaserPointer = Interactor->GetLaserPointer( /* Out */ LaserPointerStart, /* Out */ LaserPointerEnd );
check( bHaveLaserPointer );
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
if( bStartTransaction )
{
// Capture undo state
TrackingTransaction.TransCount++;
TrackingTransaction.Begin( LOCTEXT( "MovingObjects", "Move Object" ) );
}
else
{
// Did you forget to use an FScopedTransaction? If GUndo was null, then most likely we forgot to wrap this call within an editor transaction.
// The only exception is in Simulate mode, where Undo is not allowed.
check( GUndo != nullptr || GEditor == nullptr || GEditor->bIsSimulatingInEditor );
}
// Suspend actor/component modification during each delta step to avoid recording unnecessary overhead into the transaction buffer
GEditor->DisableDeltaModification( true );
// Give the interactor a chance to do something when starting dragging
Interactor->OnStartDragging( HitLocation, bIsPlacingNewObjects );
const bool bUsingGizmo = ClickedTransformGizmoComponent != nullptr;
check( !bUsingGizmo || ( ClickedTransformGizmoComponent->GetOwner() == TransformGizmoActor ) );
// Start dragging the objects right away!
InteractorData.DraggingMode = InteractorData.LastDraggingMode = bShouldUseLaserImpactDrag ? EViewportInteractionDraggingMode::TransformablesAtLaserImpact :
( bUsingGizmo ? EViewportInteractionDraggingMode::TransformablesWithGizmo : EViewportInteractionDraggingMode::TransformablesFreely );
bAreTransformablesMoving = true;
// Starting a new drag, so make sure the other hand doesn't think it's assisting us
if( Interactor->GetOtherInteractor() != nullptr )
{
FViewportInteractorData& OtherInteractorData = Interactor->GetOtherInteractor()->GetInteractorData();
OtherInteractorData.bWasAssistingDrag = false;
}
InteractorData.bDraggingWithGrabberSphere = bWithGrabberSphere;
InteractorData.bIsFirstDragUpdate = true;
InteractorData.bWasAssistingDrag = false;
if( bWithGrabberSphere )
{
// NOTE: With the grabber sphere, we don't allow the user to shift the drag ray distance
InteractorData.DragRayLength = 0.0f;
}
else
{
InteractorData.DragRayLength = ( HitLocation - LaserPointerStart ).Size();
}
InteractorData.LastDragToLocation = HitLocation;
InteractorData.InteractorTransformAtDragStart = InteractorData.Transform;
InteractorData.GrabberSphereLocationAtDragStart = bWithGrabberSphere ? GrabberSphere.Center : FVector::ZeroVector;
InteractorData.ImpactLocationAtDragStart = HitLocation;
InteractorData.DragTranslationVelocity = FVector::ZeroVector;
InteractorData.DragRayLengthVelocity = 0.0f;
InteractorData.bIsDrivingVelocityOfSimulatedTransformables = false;
// Start dragging the transform gizmo. Even if the user clicked on the actor itself, we'll use
// the gizmo to transform it.
if ( bUsingGizmo )
{
InteractorData.DraggingTransformGizmoComponent = Cast<USceneComponent>( ClickedTransformGizmoComponent );
}
else
{
InteractorData.DraggingTransformGizmoComponent = nullptr;
}
if ( TransformGizmoActor != nullptr )
{
InteractorData.DragOperationComponent = TransformGizmoActor->GetInteractionType(InteractorData.DraggingTransformGizmoComponent.Get(), InteractorData.OptionalHandlePlacement);
InteractorData.GizmoStartTransform = TransformGizmoActor->GetTransform();
InteractorData.GizmoStartLocalBounds = GizmoLocalBounds;
}
else
{
InteractorData.DragOperationComponent.Reset();
InteractorData.GizmoStartTransform = FTransform::Identity;
InteractorData.GizmoStartLocalBounds = FBox(ForceInit);
}
InteractorData.GizmoLastTransform = InteractorData.GizmoTargetTransform = InteractorData.GizmoUnsnappedTargetTransform = InteractorData.GizmoInterpolationSnapshotTransform = InteractorData.GizmoStartTransform;
InteractorData.GizmoSpaceFirstDragUpdateOffsetAlongAxis = FVector::ZeroVector; // Will be determined on first update
InteractorData.GizmoSpaceDragDeltaFromStartOffset = FVector::ZeroVector; // Set every frame while dragging
InteractorData.GizmoScaleSinceDragStarted = 0.0f;
InteractorData.GizmoRotationRadiansSinceDragStarted = 0.0f;
bDraggedSinceLastSelection = true;
LastDragGizmoStartTransform = InteractorData.GizmoStartTransform;
// Make sure all of our transformables are reset to their initial transform before we start dragging them
for( TUniquePtr<FViewportTransformable>& Transformable : Transformables )
{
Transformable->StartTransform = Transformable->GetTransform();
}
// Calculate the offset between the average location and the hit location after setting the transformables for the new selected objects
InteractorData.StartHitLocationToTransformableCenter = CalculateAverageLocationOfTransformables() - HitLocation;
// If we're placing actors, start interpolating to their actual location. This helps smooth everything out when
// using the laser impact point as the target transform
if( bIsPlacingNewObjects && bAllowInterpolationWhenPlacing )
{
bIsInterpolatingTransformablesFromSnapshotTransform = true;
bFreezePlacementWhileInterpolatingTransformables = false; // Always update the placement location when dragging out new objects
const FTimespan CurrentTime = FTimespan::FromSeconds( FPlatformTime::Seconds() );
TransformablesInterpolationStartTime = CurrentTime;
TransformablesInterpolationDuration = VI::PlacementInterpolationDuration->GetFloat();
}
// Play a haptic effect when objects are picked up
Interactor->PlayHapticEffect( Interactor->GetDragHapticFeedbackStrength() );
if (ViewportTransformer)
{
ViewportTransformer->OnStartDragging(Interactor);
}
OnStartDraggingEvent.Broadcast( Interactor );
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
void UViewportWorldInteraction::StopDragging( UViewportInteractor* Interactor )
{
FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
if ( InteractorData.DraggingMode != EViewportInteractionDraggingMode::Nothing )
{
LowSpeedInertiaDamping = VI::LowSpeedInertiaDamping->GetFloat();
HighSpeedInertiaDamping = VI::HighSpeedInertiaDamping->GetFloat();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
OnStopDraggingEvent.Broadcast( Interactor );
// If the other hand started dragging after we started, allow that hand to "take over" the drag, so the user
// doesn't have to click again to continue their action. Inertial effects of the hand that stopped dragging
// will still be in effect.
FViewportInteractorData* OtherInteractorData = nullptr;
if( Interactor->GetOtherInteractor() != nullptr )
{
OtherInteractorData = &Interactor->GetOtherInteractor()->GetInteractorData();
}
if ( OtherInteractorData != nullptr && OtherInteractorData->DraggingMode == EViewportInteractionDraggingMode::AssistingDrag )
{
// The other hand takes over whatever this hand was doing
OtherInteractorData->DraggingMode = OtherInteractorData->LastDraggingMode = InteractorData.DraggingMode;
OtherInteractorData->bIsDrivingVelocityOfSimulatedTransformables = InteractorData.bIsDrivingVelocityOfSimulatedTransformables;
OtherInteractorData->GizmoStartTransform = InteractorData.GizmoStartTransform;
OtherInteractorData->GizmoLastTransform = InteractorData.GizmoLastTransform;
OtherInteractorData->GizmoTargetTransform = InteractorData.GizmoTargetTransform;
OtherInteractorData->GizmoUnsnappedTargetTransform = InteractorData.GizmoUnsnappedTargetTransform;
OtherInteractorData->GizmoInterpolationSnapshotTransform = InteractorData.GizmoInterpolationSnapshotTransform;
OtherInteractorData->GizmoStartLocalBounds = InteractorData.GizmoStartLocalBounds;
OtherInteractorData->LockedWorldDragMode = ELockedWorldDragMode::Unlocked;
OtherInteractorData->GizmoScaleSinceDragStarted = 0.0f;
OtherInteractorData->GizmoRotationRadiansSinceDragStarted = 0.0f;
// The other hand is no longer assisting, as it's now the primary interacting hand.
OtherInteractorData->bWasAssistingDrag = false;
// The hand that stopped dragging will be remembered as "assisting" the other hand, so that its
// inertia will still influence interactions
InteractorData.bWasAssistingDrag = true;
}
else
{
if ( InteractorData.DraggingMode == EViewportInteractionDraggingMode::Interactable )
{
if ( DraggedInteractable )
{
DraggedInteractable->OnDragRelease( Interactor );
UViewportDragOperationComponent* DragOperationComponent = DraggedInteractable->GetDragOperationComponent();
if ( DragOperationComponent )
{
DragOperationComponent->ClearDragOperation();
}
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
else if ( InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact )
{
// Destroy drag operation.
if (InteractorData.DragOperationComponent != nullptr)
{
InteractorData.LastDragOperation = InteractorData.DragOperationComponent->GetDragOperation();
InteractorData.DragOperationComponent->ClearDragOperation();
}
InteractorData.DragOperationComponent.Reset();
InteractorData.DraggingMode = EViewportInteractionDraggingMode::Nothing;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// If we're not dragging anything around, check to see if transformables have come to a rest.
const bool bTransformablesStillMoving =
bAreTransformablesMoving &&
( IsSmoothSnappingEnabled() ||
!InteractorData.DragTranslationVelocity.IsNearlyZero( VI::DragTranslationVelocityStopEpsilon->GetFloat() ) ||
bIsInterpolatingTransformablesFromSnapshotTransform );
if( !bTransformablesStillMoving )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Finalize the drag
FinishedMovingTransformables();
}
if (ViewportTransformer)
{
ViewportTransformer->OnStopDragging(Interactor);
}
}
}
// Make sure we reset the dragging state if we released
FSlateApplication& SlateApplication = FSlateApplication::Get();
if (SlateApplication.IsDragDropping())
{
TSharedPtr<FGenericWindow> Window = SlateApplication.GetActiveTopLevelWindow()->GetNativeWindow();
SlateApplication.OnDragLeave(Window);
}
InteractorData.DraggingMode = EViewportInteractionDraggingMode::Nothing;
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
void UViewportWorldInteraction::FinishedMovingTransformables()
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bAreTransformablesMoving = false;
bIsInterpolatingTransformablesFromSnapshotTransform = false;
bFreezePlacementWhileInterpolatingTransformables = false;
TransformablesInterpolationStartTime = FTimespan::Zero();
TransformablesInterpolationDuration = 1.0f;
LastCarryingTransform.Reset();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
OnFinishedMovingTransformablesEvent.Broadcast();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Finalize undo
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// @todo vreditor undo: This doesn't actually encapsulate any inertial movement that happens after the drag is released!
// We need to figure out whether that matters or not. Also, look into PostEditMove( bFinished=true ) and how that relates to this.
--TrackingTransaction.TransCount;
TrackingTransaction.End();
GEditor->DisableDeltaModification( false );
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
void UViewportWorldInteraction::SetUseInputPreprocessor( bool bInUseInputPreprocessor )
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
{
bUseInputPreprocessor = bInUseInputPreprocessor;
}
void UViewportWorldInteraction::AllowWorldMovement(bool bAllow)
{
bAllowWorldMovement = bAllow;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
bool UViewportWorldInteraction::FindPlacementPointUnderLaser( UViewportInteractor* Interactor, FVector& OutHitLocation )
{
// Check to see if the laser pointer is over something we can drop on
bool bHitSomething = false;
FVector HitLocation = FVector::ZeroVector;
bool bAnyPhysicallySimulatedTransformables = false;
static TArray<AActor*> IgnoredActors;
{
IgnoredActors.Reset();
// Don't trace against stuff that we're dragging!
for( TUniquePtr<FViewportTransformable>& TransformablePtr : Transformables )
{
FViewportTransformable& Transformable = *TransformablePtr;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
Transformable.UpdateIgnoredActorList( IgnoredActors );
if( Transformable.IsPhysicallySimulated() )
{
bAnyPhysicallySimulatedTransformables = true;
}
}
}
const EHitResultGizmoFilterMode GizmoFilterMode = EHitResultGizmoFilterMode::NoGizmos; // Never place on top of gizmos, just ignore them
const bool bEvenIfUIIsInFront = true; // Don't let the UI block placement
FHitResult HitResult = Interactor->GetHitResultFromLaserPointer( &IgnoredActors, GizmoFilterMode, nullptr, bEvenIfUIIsInFront );
if( HitResult.HitObjectHandle.IsValid() )
{
bHitSomething = true;
HitLocation = HitResult.ImpactPoint;
}
if( bHitSomething )
{
FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
// Pull back from the impact point
{
const FVector GizmoSpaceImpactNormal = InteractorData.GizmoStartTransform.InverseTransformVectorNoScale( HitResult.ImpactNormal );
FVector ExtremePointOnBox;
const FVector ExtremeDirection = -GizmoSpaceImpactNormal;
const FBox& Box = GizmoLocalBounds;
{
const FVector ExtremePoint(
ExtremeDirection.X >= 0.0f ? Box.Max.X : Box.Min.X,
ExtremeDirection.Y >= 0.0f ? Box.Max.Y : Box.Min.Y,
ExtremeDirection.Z >= 0.0f ? Box.Max.Z : Box.Min.Z );
const float ProjectionDistance = FVector::DotProduct( ExtremePoint, ExtremeDirection );
const float ExtraOffset =
( bAnyPhysicallySimulatedTransformables && GEditor->bIsSimulatingInEditor ) ? ( GizmoLocalBounds.GetSize().GetAbsMax() * VI::PlacementOffsetScaleWhileSimulating->GetFloat() ) : 0.0f;
ExtremePointOnBox = ExtremeDirection * ( ProjectionDistance + ExtraOffset );
}
const FVector WorldSpaceExtremePointOnBox = InteractorData.GizmoStartTransform.TransformVectorNoScale( ExtremePointOnBox );
HitLocation -= WorldSpaceExtremePointOnBox;
HitLocation -= InteractorData.StartHitLocationToTransformableCenter;
}
OutHitLocation = HitLocation;
}
return bHitSomething;
}
FTrackingTransaction& UViewportWorldInteraction::GetTrackingTransaction()
{
return TrackingTransaction;
}
bool UViewportWorldInteraction::IsSmoothSnappingEnabled() const
{
// @todo vreditor perf: We could cache this, perhaps. There are a few other places we do similar checks. O(N).
bool bAnyPhysicallySimulatedTransformables = false;
for( const TUniquePtr<FViewportTransformable>& TransformablePtr : Transformables )
{
FViewportTransformable& Transformable = *TransformablePtr;
if( Transformable.IsPhysicallySimulated() )
{
bAnyPhysicallySimulatedTransformables = true;
}
}
const float SmoothSnapSpeed = VI::SmoothSnapSpeed->GetFloat();
const bool bSmoothSnappingEnabled =
( !GEditor->bIsSimulatingInEditor || !bAnyPhysicallySimulatedTransformables ) &&
( FSnappingUtils::IsSnapToGridEnabled() || FSnappingUtils::IsRotationSnapEnabled() || FSnappingUtils::IsScaleSnapEnabled() || VI::ActorSnap->GetInt() == 1) &&
VI::SmoothSnap->GetInt() != 0 &&
!FMath::IsNearlyZero( SmoothSnapSpeed );
return bSmoothSnappingEnabled;
}
void UViewportWorldInteraction::PollInputIfNeeded()
{
if ( LastFrameNumberInputWasPolled != GFrameNumber )
{
for ( UViewportInteractor* Interactor : Interactors )
{
Interactor->PollInput();
}
LastFrameNumberInputWasPolled = GFrameNumber;
}
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
void UViewportWorldInteraction::RefreshTransformGizmo( const bool bNewObjectsSelected )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if ( IsTransformGizmoVisible() )
{
SpawnTransformGizmoIfNeeded();
// Make sure the gizmo is visible
const bool bShouldBeVisible = true;
const bool bPropagateToChildren = true;
TransformGizmoActor->GetRootComponent()->SetVisibility( bShouldBeVisible, bPropagateToChildren );
UViewportInteractor* DraggingWithInteractor = nullptr;
static TArray< UActorComponent* > HoveringOverHandles;
HoveringOverHandles.Reset();
for( UViewportInteractor* Interactor : Interactors )
{
FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
if( InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact )
{
DraggingWithInteractor = Interactor;
}
UActorComponent* HoveringOverHandle = InteractorData.HoveringOverTransformGizmoComponent.Get();
if( HoveringOverHandle != nullptr )
{
HoveringOverHandles.Add( HoveringOverHandle );
}
}
const bool bAllHandlesVisible = ( DraggingWithInteractor == nullptr );
UActorComponent* SingleVisibleHandle = ( DraggingWithInteractor != nullptr ) ? DraggingWithInteractor->GetInteractorData().DraggingTransformGizmoComponent.Get() : nullptr;
const ECoordSystem CurrentCoordSystem = GetTransformGizmoCoordinateSpace();
const bool bIsWorldSpaceGizmo = ( CurrentCoordSystem == COORD_World );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
FViewportTransformable& LastTransformable = *Transformables.Last();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Use the location and orientation of the last selected object, to be consistent with the regular editor's gizmo
FTransform GizmoToWorld = LastTransformable.GetTransform();
GizmoToWorld.RemoveScaling(); // We don't need the pivot itself to be scaled
if ( bIsWorldSpaceGizmo )
{
GizmoToWorld.SetRotation( FQuat::Identity );
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// Create a gizmo-local bounds around all of the selected objects
FBox GizmoSpaceSelectedObjectsBounds;
GizmoSpaceSelectedObjectsBounds.Init();
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
for ( TUniquePtr<FViewportTransformable>& TransformablePtr : Transformables )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
FViewportTransformable& Transformable = *TransformablePtr;
// Get the bounding box into the local space of the gizmo
const FBox GizmoSpaceBounds = Transformable.BuildBoundingBox( GizmoToWorld );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
GizmoSpaceSelectedObjectsBounds += GizmoSpaceBounds;
}
}
// Don't show gizmo rotation and scale handles when we're dealing with a single unoriented
// point in space (such as a mesh vertex), which can't reasonably be rotated or scaled.
const bool bHaveSingleUnorientedPoint =
Transformables.Num() == 1 &&
Transformables[ 0 ]->IsUnorientedPoint();
const bool bAllowRotationAndScaleHandles = !bHaveSingleUnorientedPoint;
if( ( Transformables.Num() > 1 && this->ViewportTransformer->ShouldCenterTransformGizmoPivot() ) ||
VI::ForceGizmoPivotToCenterOfObjectsBounds->GetInt() > 0 )
{
const FVector GizmoSpaceBoundsCenterLocation = GizmoSpaceSelectedObjectsBounds.GetCenter();
GizmoToWorld.SetLocation( GizmoToWorld.TransformPosition( GizmoSpaceBoundsCenterLocation ) );
GizmoSpaceSelectedObjectsBounds = GizmoSpaceSelectedObjectsBounds.ShiftBy( -GizmoSpaceBoundsCenterLocation );
}
if ( bNewObjectsSelected )
{
TransformGizmoActor->OnNewObjectsSelected();
}
const EGizmoHandleTypes CurrentGizmoType = GetCurrentGizmoType();
const ECoordSystem GizmoCoordinateSpace = GetTransformGizmoCoordinateSpace();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
GizmoLocalBounds = GizmoSpaceSelectedObjectsBounds;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
// If the user has an HMD on, use the head location for gizmo distance-based sizing, otherwise use the active
// level editing viewport's camera location.
// @todo gizmo: Ideally the gizmo would be sized separately for every viewport it's visible within
FVector ViewerLocation = GizmoToWorld.GetLocation();
if( HaveHeadTransform() )
{
ViewerLocation = GetHeadTransform().GetLocation();
}
else if (DefaultOptionalViewportClient != nullptr)
{
ViewerLocation = DefaultOptionalViewportClient->GetViewLocation();
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
else if( GCurrentLevelEditingViewportClient != nullptr )
{
ViewerLocation = GCurrentLevelEditingViewportClient->GetViewLocation();
}
TransformGizmoActor->UpdateGizmo(
CurrentGizmoType,
GizmoCoordinateSpace,
GizmoToWorld,
GizmoSpaceSelectedObjectsBounds,
ViewerLocation,
TransformGizmoScale,
bAllHandlesVisible,
bAllowRotationAndScaleHandles,
SingleVisibleHandle,
HoveringOverHandles,
VI::GizmoHandleHoverScale->GetFloat(),
VI::GizmoHandleHoverAnimationDuration->GetFloat() );
// Only draw if snapping is turned on
SpawnGridMeshActor();
if ( FSnappingUtils::IsSnapToGridEnabled() )
{
const bool bShouldGridBeVisible = true;
const bool bPropagateToGridChildren = true;
SnapGridActor->GetRootComponent()->SetVisibility( bShouldGridBeVisible, bPropagateToGridChildren );
const float GizmoAnimationAlpha = TransformGizmoActor->GetAnimationAlpha();
// Position the grid snap actor
const FVector GizmoLocalBoundsBottom( 0.0f, 0.0f, GizmoLocalBounds.Min.Z );
const float SnapGridZOffset = 0.1f; // @todo vreditor tweak: Offset the grid position a little bit to avoid z-fighting with objects resting directly on a floor
const FVector SnapGridLocation = GizmoToWorld.TransformPosition( GizmoLocalBoundsBottom ) + FVector( 0.0f, 0.0f, SnapGridZOffset );
SnapGridActor->SetActorLocationAndRotation( SnapGridLocation, GizmoToWorld.GetRotation() );
// Figure out how big to make the snap grid. We'll use a multiplier of the object's bounding box size (ignoring local
// height, because we currently only draw the grid at the bottom of the object.)
FBox GizmoLocalBoundsFlattened = GizmoLocalBounds;
GizmoLocalBoundsFlattened.Min.Z = GizmoLocalBoundsFlattened.Max.Z = 0.0f;
const FBox GizmoWorldBoundsFlattened = GizmoLocalBoundsFlattened.TransformBy( GizmoToWorld );
// Make sure we're at least as big as the gizmo bounds, but also large enough that you can see at least a few grid cells (depending on your snap size)
const float SnapGridSize =
FMath::Max( GizmoWorldBoundsFlattened.GetSize().GetAbsMax(), GEditor->GetGridSize() * 2.5f ) * VI::SnapGridSize->GetFloat();
// The mesh is 100x100, so we'll scale appropriately
const float SnapGridScale = SnapGridSize / 100.0f;
SnapGridActor->SetActorScale3D( FVector( SnapGridScale ) );
EViewportInteractionDraggingMode DraggingMode = EViewportInteractionDraggingMode::Nothing;
FVector GizmoStartLocationWhileDragging = FVector::ZeroVector;
for ( UViewportInteractor* Interactor : Interactors )
{
const FViewportInteractorData& InteractorData = Interactor->GetInteractorData();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if ( InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo ||
InteractorData.DraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact )
{
DraggingMode = InteractorData.DraggingMode;
GizmoStartLocationWhileDragging = InteractorData.GizmoStartTransform.GetLocation();
break;
}
else if ( bDraggedSinceLastSelection &&
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
( InteractorData.LastDraggingMode == EViewportInteractionDraggingMode::TransformablesFreely ||
InteractorData.LastDraggingMode == EViewportInteractionDraggingMode::TransformablesWithGizmo ||
InteractorData.LastDraggingMode == EViewportInteractionDraggingMode::TransformablesAtLaserImpact ) )
{
DraggingMode = InteractorData.LastDraggingMode;
GizmoStartLocationWhileDragging = LastDragGizmoStartTransform.GetLocation();
}
}
FVector SnapGridCenter = SnapGridLocation;
if ( DraggingMode != EViewportInteractionDraggingMode::Nothing )
{
SnapGridCenter = GizmoStartLocationWhileDragging;
}
// Fade the grid in with the transform gizmo
const float GridAlpha = GizmoAnimationAlpha;
// Animate the grid a little bit
const FLinearColor GridColor = FLinearColor::LerpUsingHSV(
FLinearColor::White,
FLinearColor::Yellow,
FMath::MakePulsatingValue( GetTimeSinceEntered().GetTotalSeconds(), 0.5f ) ).CopyWithNewOpacity( GridAlpha );
const float GridInterval = GEditor->GetGridSize();
// If the grid size is very small, shrink the size of our lines so that they don't overlap
float LineWidth = VI::SnapGridLineWidth->GetFloat();
while ( GridInterval < LineWidth * 3.0f ) // @todo vreditor tweak
{
LineWidth *= 0.5f;
}
{
// Update snap grid material state
UMaterialInstanceDynamic* LocalSnapGridMID = GetSnapGridMID();
static FName GridColorParameterName( "GridColor" );
LocalSnapGridMID->SetVectorParameterValue( GridColorParameterName, GridColor );
static FName GridCenterParameterName( "GridCenter" );
LocalSnapGridMID->SetVectorParameterValue( GridCenterParameterName, SnapGridCenter );
static FName GridIntervalParameterName( "GridInterval" );
LocalSnapGridMID->SetScalarParameterValue( GridIntervalParameterName, GridInterval );
static FName GridRadiusParameterName( "GridRadius" );
LocalSnapGridMID->SetScalarParameterValue( GridRadiusParameterName, SnapGridSize * 0.5f );
static FName LineWidthParameterName( "LineWidth" );
LocalSnapGridMID->SetScalarParameterValue( LineWidthParameterName, LineWidth );
FMatrix GridRotationMatrix = GizmoToWorld.ToMatrixNoScale().Inverse();
GridRotationMatrix.SetOrigin( FVector::ZeroVector );
static FName GridRotationMatrixXParameterName( "GridRotationMatrixX" );
static FName GridRotationMatrixYParameterName( "GridRotationMatrixY" );
static FName GridRotationMatrixZParameterName( "GridRotationMatrixZ" );
LocalSnapGridMID->SetVectorParameterValue( GridRotationMatrixXParameterName, GridRotationMatrix.GetScaledAxis( EAxis::X ) );
LocalSnapGridMID->SetVectorParameterValue( GridRotationMatrixYParameterName, GridRotationMatrix.GetScaledAxis( EAxis::Y ) );
LocalSnapGridMID->SetVectorParameterValue( GridRotationMatrixZParameterName, GridRotationMatrix.GetScaledAxis( EAxis::Z ) );
}
}
else
{
// Grid snap not enabled
const bool bShouldGridBeVisible = false;
const bool bPropagateToGridChildren = true;
SnapGridActor->GetRootComponent()->SetVisibility( bShouldGridBeVisible, bPropagateToGridChildren );
}
if (bNewObjectsSelected && bPlayNextRefreshTransformGizmoSound)
{
PlaySound(AssetContainer->SelectionChangeSound, TransformGizmoActor->GetActorLocation());
}
bPlayNextRefreshTransformGizmoSound = true;
}
else
{
// Nothing selected or the gizmo was asked to be hidden
if( TransformGizmoActor != nullptr )
{
const bool bShouldBeVisible = false;
const bool bPropagateToChildren = true;
TransformGizmoActor->GetRootComponent()->SetVisibility( bShouldBeVisible, bPropagateToChildren );
}
Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 3293188) #rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3203880 on 2016/11/18 by Ori.Cohen Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3207429 on 2016/11/22 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3207285 Change 3252627 on 2017/01/10 by Lukasz.Furman removed duplicated entries from visual logger shape rendering #ue4 Change 3252675 on 2017/01/10 by Ori.Cohen Add support for tagged memory regions (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252686 on 2017/01/10 by Ori.Cohen Refactor BodySetup to make it easier to reuse shape creation (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252833 on 2017/01/10 by Ori.Cohen Refactor constraint so that it can be used for external solvers. (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252887 on 2017/01/10 by Dan.Reynolds Increased modes to include: Harmonic minor Melodic minor (going up) Pentatonic (Major) Pentatonic (minor) Whole Tone Diminished (WH) and Blues Change 3252895 on 2017/01/10 by Aaron.McLeran update to music utilities. Change 3253060 on 2017/01/10 by Aaron.McLeran Updates to synthesis plugin and some new features to DSP objects Change 3253061 on 2017/01/10 by Aaron.McLeran Updates to music maps Change 3253078 on 2017/01/10 by Aaron.McLeran Removing pragma optimization code accidentally checked in Change 3253110 on 2017/01/10 by Ori.Cohen First iteration of immediate mode ragdoll node (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3253315 on 2017/01/10 by Aaron.McLeran Fixing a few bugs in DSP objects - Added a new types file EpicSynth1 and EpicSynth1 component can share enums Change 3253577 on 2017/01/11 by Aaron.McLeran Checking in updates to assets for music -- celestial manager for rotating objects like planets, new ambient map Change 3254052 on 2017/01/11 by Ori.Cohen Fix build. Change 3254059 on 2017/01/11 by Ori.Cohen Turn off html5 trying to build apex. Change 3254095 on 2017/01/11 by Ori.Cohen Fix build Change 3254200 on 2017/01/11 by Jon.Nabozny Make vectorized FTransform Accumulate (with blend) and AccumulateWithAdditive (with blend) consistent with the non-vectorized version and comments. #JIRA UE-40469 Change 3254334 on 2017/01/11 by Marc.Audy Put in missing virtual Change 3254397 on 2017/01/11 by dan.reynolds Updates to OtonOkeMap Change 3254410 on 2017/01/11 by Marc.Audy Cleanup autos Change 3254420 on 2017/01/11 by Marc.Audy PR #3110: Add missing IsInAudioThread check (Contributed by projectgheist) Modified somewhat, but based on what PR indicated as a problem. #jira UE-40369 Change 3254423 on 2017/01/11 by Marc.Audy Optimize GetDefaultSubobjectByName and GetDefaultSubobjects Remove autos Change 3254826 on 2017/01/11 by Aaron.McLeran Bringing optimizations to dev-framework Change 3254831 on 2017/01/11 by dan.reynolds Modified MidiSynthTestBP to use Program Change events to pull a Preset from a Preset Bank--added a Data Blueprint Object ES1Bank_Default (containing Preset arrays) with children classes for different classifications of Presets. Change 3254833 on 2017/01/11 by dan.reynolds Updating MidiSynthTestBP's default SynthPreset pan value. Change 3254851 on 2017/01/11 by dan.reynolds Updating ES1Bank_Bass Updating OtonOkeMap Change 3254854 on 2017/01/11 by Aaron.McLeran Some fixups for pan modulation Change 3255682 on 2017/01/12 by aaron.mcleran Turning the bass down a bit on OtonOkeMap Change 3255721 on 2017/01/12 by Marc.Audy Fix spelling error Change 3255790 on 2017/01/12 by Marc.Audy Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3256263 on 2017/01/12 by Ori.Cohen Refactor immediate mode api to take PxD6Joint and PxRigidActor instead. Change 3256288 on 2017/01/12 by Ori.Cohen Undo constraint refactor as we found a way around it and it made the code much harder to read/debug Change 3256360 on 2017/01/12 by Ori.Cohen Make sure physx actors passed into immediate mode are done so with proper locks (can probably improve this in the case where the actor is not even in the scene) Change 3256846 on 2017/01/13 by Marc.Audy Deprecate FBox/FBox2D int32 constructor because it makes no sense if you pass in a non 0 value. Use ForceInit instead. Change 3256954 on 2017/01/13 by Marc.Audy Fix missed fixup of deprecated constructor use Change 3257167 on 2017/01/13 by Jon.Nabozny Fix check in FBodyInstance::SetCollisionEnabled. Create convenience methods for HasPhysics and HasQuery. #jira UE-39633 Change 3257181 on 2017/01/13 by Zak.Parrish Adding input map and some testing content to Xenakis Change 3257183 on 2017/01/13 by Mieszko.Zielinski Implemented an improved navigation projection BP function that retrieves both projected locaiton as well as a boolean indicating if the projection succeeded #UE4 Also, did similar changes to GetRandomReachablePointInRadius and GetRandomPointInNavigableRadius #jira UE-40368 Change 3257211 on 2017/01/13 by Jon.Nabozny Fix CIS issue caused by 3257167. Change 3257220 on 2017/01/13 by Marc.Audy Additional FBox constructor deprecation fixups Change 3257236 on 2017/01/13 by zak.parrish Fixed error on Xenakis input pawn Change 3257242 on 2017/01/13 by zak.parrish Update to InputListener Change 3257273 on 2017/01/13 by Marc.Audy No reason to pass simple types by reference Change 3257418 on 2017/01/13 by Ori.Cohen Attempt to turn android physx libs back to static libs. Change 3257445 on 2017/01/13 by Ori.Cohen Turn android libs back to OBJ and removed unreal side linking as it seems we are now just merging into a single physx lib Change 3257903 on 2017/01/14 by Aaron.McLeran Additions to synth module and updates to dsp objects - Adding ability to create arbitrary modular patches from modulating sources to modulation destinations - DSP objects define their default depths but patches can override - Creating new SynthesisEditor module for synthesis plugin so we can create synthesis preset assets - Adding a preset bank type so we can store a bank of presets (aka factory presets) Change 3258179 on 2017/01/15 by Seth.Weedin Duplicating input test map for some FX work Change 3258181 on 2017/01/15 by Seth.Weedin Modify skybox in test map to be dark and spooky Change 3258183 on 2017/01/15 by aaron.johnson substituted classes, changed wind speed and adjusted level lighting Change 3258190 on 2017/01/15 by aaron.johnson substituted triplet pawn and motion controller classes, enabled grabbing animations Change 3258191 on 2017/01/15 by Aaron.McLeran Getting source effects working for GDC demo - Added new synthesis editor module to create instances of user-created source effects - Added code to do source effects - Modified old design to a newer, more simpler design for calling into client code to set parameters. No longer using the complex struct reflection design and instead just pass in the uobject preset the user created. They'll then cast it to the type that has the actual settings. - Tweaks and fixes to existing dsp objects to get source effects working - Modified existing engine code to allow for playing out source effect tails - Only supporting mono and stereo assets for source effect processing. Multi-channel effect processing is overly complex for this feature though we may extend the capabilities in the future. - Fixed issue of pitching with stereo delay effect on setting first interpolated param - Moving synth/dsp stuff in synthesis plugins into appropriate public/private folders in plugin/module - Deleting some cruft files no longer needed Change 3258201 on 2017/01/15 by Seth.Weedin C++ and BP classes for managing grid cells. Initial grid mapping tests. #rb none Change 3258206 on 2017/01/15 by aaron.johnson map push, triplets interface created, debug widget placed in level Change 3258222 on 2017/01/15 by Aaron.McLeran Fixing crash when there's a null entry in the source effect chain Fixed some zippering introduced by applying volume twice. Change 3258225 on 2017/01/15 by aaron.johnson Interface changes, pawn output values wip Change 3258228 on 2017/01/15 by aaron.johnson Pawn should be outputting all correct values for Tripletsinterface Change 3258242 on 2017/01/15 by Stanley.Hayes Edge lights and Spherical Density Materials Change 3258251 on 2017/01/16 by Seth.Weedin More progress on grid FX. Add curve strength modifiers, begin hooking up interaction. #rb none Change 3258284 on 2017/01/16 by Aaron.McLeran Fixing CIS build error Surprised that MSVC allows that... Change 3258525 on 2017/01/16 by Mieszko.Zielinski Made UGameplayTask::ResourceOverlapPolicy configurable via ini files #UE4 Change 3258537 on 2017/01/16 by Lukasz.Furman fixed duplicated & undo operations not updating navigation area in nav link proxy and nav link component #ue4 Change 3258595 on 2017/01/16 by Marc.Audy Fix static analysis warning Change 3259364 on 2017/01/16 by Mieszko.Zielinski BTTask_RotateToFaceBBEntry comment spelling fix #UE4 #jira UE-40669 Change 3259683 on 2017/01/16 by dan.reynolds Updated Preset Bank System implemented in MidiSynthTestBP and 4 Preset Banks have been started Change 3260244 on 2017/01/17 by Lina.Halper #anim - optimize layer blend node to not create mask weights in run-time but in compile time. #code review: Martin.Wilson Change 3260617 on 2017/01/17 by Ori.Cohen Immediate mode spawns its own actors. Change 3260701 on 2017/01/17 by Ori.Cohen Don't bother blending physics with animation when physics is QueryOnly Change 3260796 on 2017/01/17 by Ori.Cohen EndPhysics tick will no longer be scheduled if QueryOnly is used on a ragdoll. Change 3261207 on 2017/01/17 by Ori.Cohen First iteration of contact enabling/disabling for immediate mode. Change 3262010 on 2017/01/18 by Marc.Audy Remove some autos Change 3262525 on 2017/01/18 by Lina.Halper Fix crash with required bones index not using property indexing #jira: UE-40786 Change 3263658 on 2017/01/19 by Martin.Wilson Add AnimTechDemo to dev-framework (base third person + feng mao) Change 3263684 on 2017/01/19 by Lina.Halper #anim : layer node - fix allocation change I made by mistake Change 3264523 on 2017/01/19 by Ori.Cohen Immediate mode can now add static geometry it finds in the world. Also improve contact gen by caching iteration order Change 3264701 on 2017/01/19 by Ori.Cohen Make it so that immediate mode ragdolls collide with the ground in persona.This is a bit of an editor only hack which allows immediate mode to find non-static actors Change 3264980 on 2017/01/19 by Ori.Cohen Make sure physics asset collision disabled works in immediate mode. Change 3265011 on 2017/01/19 by Ori.Cohen Added the ability to override physics asset for immediate mode Change 3265030 on 2017/01/19 by Ori.Cohen Added override gravity for immediate mode. Change 3265650 on 2017/01/20 by Benn.Gallagher NvCloth Source Change 3265652 on 2017/01/20 by Benn.Gallagher NvCloth Lib #rnx Change 3265653 on 2017/01/20 by Benn.Gallagher NvCloth Bin #rnx Change 3266195 on 2017/01/20 by Danny.Bouimad Initial ClothTest Assets for NCloth Before and after comparison TM-MultiClothTest (Under Maps>Framework>Cloth) Change 3266377 on 2017/01/20 by Marc.Audy Ensure that OrphanedDataOnly and TrashClass blueprint generated classes are correctly considered a blueprint class for disregard for GC purposes. Change 3267873 on 2017/01/23 by Jon.Nabozny Fix SceneProxy shadowing in UGeometryCacheComponent. Change 3268025 on 2017/01/23 by Benn.Gallagher IWYU change, platform PCH generation seemed to hide this one. Change 3268026 on 2017/01/23 by Benn.Gallagher Fixed LOCTEXT_NAMESPACE being inconsistently scoped in an #if block #rnx Change 3268630 on 2017/01/23 by Zak.Parrish Updating to add MIGS shooter content, as well as audio interaction Blueprints Change 3268663 on 2017/01/23 by Ori.Cohen Ragdoll animnode uses raw physics asset pointer to ensure it makes a hard reference. Change 3268811 on 2017/01/23 by Ori.Cohen Added component space sim for immediate mode Change 3269369 on 2017/01/24 by Benn.Gallagher Copying //Tasks/UE4/Dev-UEFW-11-NewClothingPipeline to Dev-Framework (//UE4/Dev-Framework) Replaced clothing with new simulation framework Change 3269417 on 2017/01/24 by danny.bouimad Minor Update to cloth map for test Change 3269420 on 2017/01/24 by Benn.Gallagher Removed APEX simulation from clothing framework (used in testing, not fully complete) Change 3269421 on 2017/01/24 by danny.bouimad Small tweaks Change 3269515 on 2017/01/24 by Lukasz.Furman enabled gameplay debugger's OnSelectionChanged event support for both PIE and SIE modes fixed GameplayAbility debugger's category not using IAbilitySystemInterface #ue4 Change 3269595 on 2017/01/24 by mason.seay Break apart physics asset for crash bug Change 3269819 on 2017/01/24 by Ori.Cohen Make the possibly kinematic actor the first actor in the immediate mode joint. This is consistent with physx vanilla solver. Change 3270364 on 2017/01/24 by Josh.Stoddard upgrade to the latest version of v-HACD: https://github.com/kmammou/v-hacd/tree/master/src/VHACD_Lib commit: 7a09f9d NOTE: only updated windows binaries mac and linux still using old binaries until they can be tested #jira UE-40124 #rb josh.stoddard Change 3271188 on 2017/01/25 by Jurre.deBaare Post-import script support #jira UEFW-80 Change 3271249 on 2017/01/25 by Thomas.Sarkanen Move soundwave-internal curve tables to advanced display Exposing it was confusing to audio people Change 3271586 on 2017/01/25 by Marc.Audy Don't rerun construction scripts twice on a level that has been hidden and reshown #jira UE-40306 Change 3272048 on 2017/01/25 by Ori.Cohen Fix for immediate mode sim when root body is the same as the root bone. Change 3272083 on 2017/01/25 by Ori.Cohen Make sure to warn when component space sim and collision are used together. Also handle it gracefully. Change 3272300 on 2017/01/25 by Ori.Cohen Fix incorrect collision generation when a shape's local pose is not identity. Change 3273195 on 2017/01/26 by Jurre.deBaare Fix for Anim import script crash in GetBonePosesForTime Change 3273204 on 2017/01/26 by Ben.Marsh Ignore PRAGMA_DISABLE_SHADOW_VARIABLE_WARNINGS and PRAGMA_ENABLE_SHADOW_VARIABLE_WARNINGS macros between include directives. Fixes CIS warning with IncludeTool. Change 3273378 on 2017/01/26 by James.Golding In AnimBP editor, call CopyNodeDataToPreviewNode when properties are edited, not just pin defaults changed Change 3273381 on 2017/01/26 by James.Golding Big refactor to PoseDriver - RBF logic now moved into its own class/file - Allow editing of transform and radial scaling per-target - Add support for different falloff functions (not just Gaussian) - Allow driving curves directly, rather than always poses - Add details customization for pose driver node - Edits to PoseDriver settings now take immediate effect, don't need to recompile Change 3273826 on 2017/01/26 by Josh.Stoddard modify VHACD to improve quality of hulls generated by convex decomposition NOTE: mac libs not included - mac editor will use legacy libs for now Change 3273902 on 2017/01/26 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3273433 Change 3274018 on 2017/01/26 by Ori.Cohen Added immediate physics preview in phat. Change 3274165 on 2017/01/26 by Ori.Cohen PhAT now depends on immediate mode plugin. Fix build #JIRA UE-41179 Change 3275001 on 2017/01/27 by Jurre.deBaare Fix for crash in Persona with Anim Modifiers Change 3275297 on 2017/01/27 by Ori.Cohen Big refactor to iterate over shapes instead of bodies (allows multiple shape per body collision) Change 3275340 on 2017/01/27 by Benn.Gallagher Fixed Paragon clothing crashes during clothing upgrade step, fixed bone mapping not getting updated on reimport with different hierarchy #jira UE-41025 #jira UE-41039 Change 3275383 on 2017/01/27 by Benn.Gallagher Blacklisted double promotion warning on ps4 NvCloth build #rnx Change 3275426 on 2017/01/27 by Benn.Gallagher Removed CUDA dependencies from NvCloth cmake files Change 3275670 on 2017/01/27 by Ori.Cohen Fix phat ragdoll in immediate mode updating sketal mesh component transform Change 3275673 on 2017/01/27 by Ori.Cohen Add position/velocity iteration to immediate mode Change 3276001 on 2017/01/27 by Alan.Noon Migrated Immediate Mode Minion Ragdoll Content to GDC AnimTech Project. Updated DefaultInput.ini none Change 3276596 on 2017/01/28 by Aaron.McLeran Removing unused #ifdef Change 3276597 on 2017/01/28 by Aaron.McLeran Getting rid of static analysis warning Change 3277354 on 2017/01/30 by Lukasz.Furman fixed custom navlink Id collisions #ue4 Change 3277356 on 2017/01/30 by Lukasz.Furman fixed comments in GameplayDebugger.h #jira UE-41103 Change 3277371 on 2017/01/30 by mason.seay Test map for spawn sound/force feedback bug. Change 3277445 on 2017/01/30 by Lukasz.Furman fixed compilation warning #ue4 Change 3277560 on 2017/01/30 by Danny.Bouimad Made checkin to Fix Crash that occured due to bad content. Change 3277567 on 2017/01/30 by Ori.Cohen Fix immediate mode crashing when joint is empty. #JIRA UE-41026 Change 3277928 on 2017/01/30 by Ori.Cohen Turn on immediate mode plugin by default Change 3278433 on 2017/01/30 by Ori.Cohen Immediate mode supports heightfield collision. Change 3278449 on 2017/01/30 by Ori.Cohen Fix immediate mode cache not being initialized properly. Change 3278787 on 2017/01/31 by James.Golding Fix CIS error in ImmediatePhysicsSimulation.cpp Change 3279303 on 2017/01/31 by mason.seay Assets for RigidBody node bug Change 3279352 on 2017/01/31 by Benn.Gallagher Fixed inertia blends on self collision cloth assets as we now only have local space simulation and these values weren't used before Change 3279377 on 2017/01/31 by Alan.Noon GDC AnimTech Demo: adjusted minion physics assets none Change 3279425 on 2017/01/31 by james.cobbett Updating QA-Physics map. Made one of the simulated physics objects more user-friendly, able to enable/disable physics on key-press now. Change 3279436 on 2017/01/31 by Benn.Gallagher Fixed inertia scales on Owen mesh Change 3279480 on 2017/01/31 by Benn.Gallagher Fixes for clothing behavior changes #jira UE-41092 Change 3279495 on 2017/01/31 by Ori.Cohen Remove unneeded cache clearing when contact pairs are not skipped, but there is no collision. Change 3279579 on 2017/01/31 by james.cobbett Added new scenario to QA-Physics map. Moving platforms (up/down, left/right) with physics objects on them. Change 3279695 on 2017/01/31 by mason.seay RigidBody node test asset Change 3280105 on 2017/01/31 by Ori.Cohen Prevent query only ragdolls from simulating if their bodysetup is marked as simulated. Also remove slow check in term body for owning components. This is not true for destructibles or immediate mode Change 3280148 on 2017/01/31 by mason.seay First round of assets for force feedback testing Change 3280860 on 2017/02/01 by James.Golding Merge CL 3280853 to Dev-Framework Fix crash with null CurrentSkeleton on AnimInstance when using Re-import button in SkelMesh Editor Change 3281172 on 2017/02/01 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3281156 Change 3281210 on 2017/02/01 by james.cobbett Updated QA-Physics map Added cube that starts off with physics enabled, then disables. Made physics toggleable on that and another cube. Change 3281211 on 2017/02/01 by James.Golding Details customization for editing PoseDriver targets list Change 3281332 on 2017/02/01 by Marc.Audy Fix bad merge Fix file types Change 3281388 on 2017/02/01 by mason.seay Updated Force Feedback asset Change 3281396 on 2017/02/01 by mason.seay moving asset Change 3281987 on 2017/02/01 by Benn.Gallagher Fixed project generation failing after main merge Change 3282047 on 2017/02/01 by Marc.Audy Fix up Target and build cs files after changes from Dev-Build Change 3282214 on 2017/02/01 by Ori.Cohen Expose radial forces to immediate mode Change 3282221 on 2017/02/01 by Alan.Noon Immediate Mode GDC demo content: development on minion anim B, refined Orbital Laser Pawn controls, tweaked laser parameters none Change 3282273 on 2017/02/01 by Ori.Cohen Fix crash when recompiling animbp of immediate mode due to null pointer. Change 3282368 on 2017/02/01 by Ori.Cohen Quick iteration on minion demo Change 3282824 on 2017/02/02 by James.Golding Fix for CIS in RBFSolver.h Change 3282829 on 2017/02/02 by James.Golding Fix CIS in PoseDriverDetails.cpp Fix list UI not refreshing after copying targets from PoseAsset Change 3282834 on 2017/02/02 by Danny.Bouimad Adding Pose driver additive assets Change 3282863 on 2017/02/02 by James.Golding Add Mambo mesh and Skeleton Change 3282892 on 2017/02/02 by James.Golding Copy Aurora (Ice) and Mambo meshes/materials/some anims from Dev-General to AnimTechDemo project in Dev-Framework Change 3283157 on 2017/02/02 by Mieszko.Zielinski Cook Orion Win64 fix #UE4 Had to change the Extent param of K2_ProjectPointToNavigation. Updated the error causing Orion BP Change 3283159 on 2017/02/02 by Marc.Audy Additional CIS fixes Change 3283179 on 2017/02/02 by Marc.Audy More CIS fixes Change 3283197 on 2017/02/02 by Jurre.deBaare Fix for issues importing Fornite geometry cache assets #fix Use actual import number of frames instead of total number of frames in the Alembic Cache Change 3283201 on 2017/02/02 by Marc.Audy Keep fixing CIS Change 3283270 on 2017/02/02 by James.Golding Merging CL 3276013 to Dev-Framework - fix issue with additive pose preview applying twice Change 3283499 on 2017/02/02 by Marc.Audy More CIS fixes Change 3283543 on 2017/02/02 by Jon.Nabozny Update comment on AActor::GetActorBounds to properly reflect ChildActorComponents aren't included in the calculation. Change 3283663 on 2017/02/02 by Ori.Cohen Fix potential null dereference in ragdoll node Change 3283757 on 2017/02/02 by Marc.Audy May fix remaining CIS issues Change 3283984 on 2017/02/02 by Marc.Audy Fix linux CIS Change 3284039 on 2017/02/02 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3283913 Change 3284067 on 2017/02/02 by Marc.Audy Fixup mistakes in converting redirects Change 3284187 on 2017/02/02 by Ori.Cohen Immediate mode works with radial force (not just radial impulse) Change 3284358 on 2017/02/02 by Ori.Cohen Update arcblade phys asset for immediate mode Change 3284667 on 2017/02/02 by Marc.Audy Arguments is an array not a string now. Fixing commented out code. Change 3284684 on 2017/02/02 by Marc.Audy Move AVIWriter out in to its own module to avoid any possible unity build issues where xwindows.h got indirectly included through the DirectShow third party library and caused FGenericWindow::IsMaximized and IsMinimized to conflict with a macro. Change 3284707 on 2017/02/02 by Marc.Audy Fix AVIWriter module compilation on Mac Change 3285012 on 2017/02/03 by Benn.Gallagher Fixes for Dx NvCloth shader warnings Change 3285016 on 2017/02/03 by Marc.Audy Fix missing include Change 3285048 on 2017/02/03 by Benn.Gallagher Fixed Persona needing a restart when changing number of clothing assets (import/delete) #jira UE-41323 Change 3285325 on 2017/02/03 by Marc.Audy Properly implement AVIWriter module Change 3285538 on 2017/02/03 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3285499 Change 3285735 on 2017/02/03 by Jon.Nabozny Add IsInAir method to UVehicleWheel. #jira UE-38369 Change 3285862 on 2017/02/03 by Aaron.McLeran UE-41435 Fixing PIE audio - Fixing PIE audio. Recent change to editor preferences from Dev-Editor branch (CL 3234495) caused all audio to be muted in PIE. Change 3285914 on 2017/02/03 by danny.bouimad RecomputeTangents Test Assets Change 3286246 on 2017/02/03 by Mieszko.Zielinski Changes to game-specific BPs containing calls to deprecated NavigationSystem functions #UE4 #jira UE-41527 #jira UE-41518 Change 3286308 on 2017/02/03 by Ori.Cohen Make sure physx trimesh scale is never too small. Fix box clamping being ignored. Fixes cook warnings for Odin. #JIRA UE-41529 Change 3286396 on 2017/02/03 by Ori.Cohen Fix CIS Change 3286479 on 2017/02/03 by Ori.Cohen Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3287421 on 2017/02/06 by James.Golding Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3286819 Change 3287427 on 2017/02/06 by James.Golding Fix PoseBlendNode to 'pass through' if no poses are activated Change 3287430 on 2017/02/06 by James.Golding - Add support to PoseDriver for evaluating source bone in the space of a different bone - Fix driven bone adding a scale of 1 - Fix posedriver values 'sticking' (reset all weights to zero each frame) - Move CopyTargetsFromPoseAsset and AutoSetTargetScales from FAnimNode_PoseDriver to UAnimGraphNode_PoseDriver (not required outside editor) - Tranlsation targets now draw larger when selected - 'Copy from pose asset' now also auto-sets radius for you - Remove spammy warnings for missing poses/curves - Add UPoseAsset::GetNumTracks and ::GetFullPose - Remove unused ExtractionContext from UPoseAsset::GetBaseAnimationPose - Remove bIncludeRefPoseAsNeutralPose option (not really useful since we no longer always normalize weights to 1.0) Change 3287496 on 2017/02/06 by Chad.Garyet fixing busted quotes around defaultvalues Change 3287569 on 2017/02/06 by Mieszko.Zielinski Orion BP fixed after deprecating NavigationSystem's BP API #Orion Change 3287595 on 2017/02/06 by Benn.Gallagher BuildPhysX.Automation: Deploying PhysX & NvCloth Win64 Win32 PS4 libs. Built for new NvCloth upgrade Change 3287598 on 2017/02/06 by Benn.Gallagher NvCloth Upgrade to 21604115 Added Linux+Mac support Change 3287710 on 2017/02/06 by Lukasz.Furman added option to disable navlink polys at the end of generated paths #ue4 Change 3287857 on 2017/02/06 by Benn.Gallagher Fixed NvCloth module files to correctly set up linux and mac hopefully Change 3287894 on 2017/02/06 by Benn.Gallagher Another fix to NvCloth build files, didn't get picked up in VS for some reason. Change 3287917 on 2017/02/06 by Lina.Halper Copy from CharacterRigging to Dev-Framework #code review:Thomas.Sarkanen, Martin.Wilson, James.Golding, Andrew.Rodham Change 3287938 on 2017/02/06 by Thomas.Sarkanen Fix crash opening a media sound wave #jira UE-41582 - Editor crashes when running Automation test Change 3287942 on 2017/02/06 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3287682 Change 3288035 on 2017/02/06 by James.Golding Remove C++ GameMode and pawn classes (replace with floating BP instead) Resave anims to remove Orion refs Add simple AnimBP and map for Mambo testing Change 3288036 on 2017/02/06 by Benn.Gallagher Fix to BuildPhysX task to trigger Mac and Linux builds properly Change 3288125 on 2017/02/06 by Ori.Cohen Change PhysXCommon back to dylib Change 3288127 on 2017/02/06 by Benn.Gallagher Fixed project file identification not working for NvCloth under XCode Change 3288156 on 2017/02/06 by Benn.Gallagher Disable "expansion-to-defined" warning in Linux NvCloth builds Change 3288159 on 2017/02/06 by Lina.Halper potential compile fix for Ocean Editor #code review:Thomas.Sarkanen Change 3288190 on 2017/02/06 by Ori.Cohen Link against static PhysXCommon for mac Change 3288200 on 2017/02/06 by Marc.Audy Fix CIS Change 3288270 on 2017/02/06 by Lina.Halper fix compile error #code review:Thomas.Sarkanen, Marc.Audy Change 3288302 on 2017/02/06 by Thomas.Sarkanen Fixed ensure when deselecting bones in anim BP editor #jira UE-41274 - Ensure when clicking in the viewport of an animation blueprint Change 3288348 on 2017/02/06 by Lina.Halper - Enabled control rig - Changed plugin name to be Control Rig Change 3288490 on 2017/02/06 by Benn.Gallagher Fixes for Mac attempting static links against NvCloth and failing to load dynamic libraries. Worked with MasonS to get Mac editor up and running. Change 3288511 on 2017/02/06 by Lina.Halper compile fix Change 3288513 on 2017/02/06 by Lina.Halper Check in content to work with Change 3288615 on 2017/02/06 by Ori.Cohen Fix skeletal mesh not simulating when using an aggregate. #JIRA UE-41593 Change 3288791 on 2017/02/06 by thomas.sarkanen Exposed transforms to cinematics so they can be animated Change 3288795 on 2017/02/06 by Ori.Cohen Fix lock warnings for physx #JIRA UE-41591 Change 3288817 on 2017/02/06 by Charles.Anderson GDC Arcblade setup tests. Change 3288825 on 2017/02/06 by Lina.Halper Fix build issue of shadow variable Change 3289058 on 2017/02/06 by Ori.Cohen Fix crash when immediate mode constraint generates 0 rows. This is a potentially temporary fix until NVIDIA replies with a better solution. #JIRA UE-41026 Change 3289348 on 2017/02/06 by Lina.Halper fix compile issue Change 3289369 on 2017/02/06 by Lina.Halper Renamed leg control to limb control and will be used for arm/feet. - changed vars. - has unused variables that will be used soon but want to check in so that i don't block content change on BaseHuman. #code review:Thomas.Sakanen Change 3289422 on 2017/02/06 by Lina.Halper Fixed IK sinking issue - or moving #code review:Thomas.Sarkanen Change 3289433 on 2017/02/06 by Lina.Halper Fixed real shadow error Change 3289485 on 2017/02/06 by Lina.Halper fixed build issue Change 3289657 on 2017/02/07 by thomas.sarkanen Added rig bone mapping to Ice's skeletal mesh Change 3289658 on 2017/02/07 by thomas.sarkanen Added ControlRig map with Ice setup to pose Change 3289662 on 2017/02/07 by Thomas.Sarkanen Fixed up static analysis warning Change 3289663 on 2017/02/07 by Thomas.Sarkanen Fixed crash when attempting to bind to skeletal mesh with already-set anim BP Anim instance may not have actually been created when binding, so dont dereference it Change 3289717 on 2017/02/07 by Benn.Gallagher Switch Linux NvCloth to static for Linux builds. Adjust lib directory to match actual directory Change 3289718 on 2017/02/07 by Benn.Gallagher BuildPhysX.Automation: Deploying NvCloth Linux_x86_64-unknown-linux-gnu libs. Change 3289744 on 2017/02/07 by Benn.Gallagher Fixed missing masses causing crash initialising clothing actors #jira UE-41599 Change 3289746 on 2017/02/07 by Danny.Bouimad Adding Some Content for JamesG he wanted some nicer looking Pose driver test files. Change 3289756 on 2017/02/07 by danny.bouimad Changing the asset for JamesG. Change 3289785 on 2017/02/07 by James.Golding Replace old PoseDrive test with Danny's new one Change 3289858 on 2017/02/07 by Lina.Halper fixed issue with undo transaction buffer Change 3289860 on 2017/02/07 by Benn.Gallagher Fixed crash after reimporting a clothing asset with the clothing config open and then changing the confg #jira UE-41655 Change 3289912 on 2017/02/07 by Thomas.Sarkanen Merging using Raven_To_Dev-Framework Originally from CLs 3249471, 3258522, 3260271, 3273791: Sequencer: More work supporting array properties more generically + fixes Change 3289962 on 2017/02/07 by James.Golding Add thickness option to DrawWireDiamond Change 3289963 on 2017/02/07 by James.Golding Add spin option to VectorInputBox Change 3289966 on 2017/02/07 by James.Golding Add weight bar chart to PoseDriver details Stop drawing pose weight text in viewport Fix position targets not drawing larger when selected Change 3290094 on 2017/02/07 by Thomas.Sarkanen Fixed typo in filename (fallout from search and replace) Change 3290119 on 2017/02/07 by Thomas.Sarkanen Manipulators can now have their IK/FK space set on them They are not drawn when the space for the chain that they control is not the same as their setting Also fixed a crash with invalid objects when reloading maps. Change 3290145 on 2017/02/07 by Thomas.Sarkanen CIS fix for fallout from Raven changes #jira UE-41670 - Mac editor fails to compile with PropertyTrackEditor errors Change 3290319 on 2017/02/07 by Marc.Audy Make sound player nodes hard reference the assets unless they are in a chain below a quality node. Change 3290484 on 2017/02/07 by Richard.Hinckley Fixing grammar in popup messages. Change 3290533 on 2017/02/07 by Marc.Audy Make GetAIController BlueprintPure #jira UE-41654 Change 3290624 on 2017/02/07 by Marc.Audy Reorder header to avoid include tool warnings Change 3290697 on 2017/02/07 by Lina.Halper - support FK manipulator being in local space - fixed FK key spamming issue for making blend weight to be not keyable - this creates conflicts with enum #code review: Thomas.Sarkanen Change 3290748 on 2017/02/07 by Ori.Cohen Touch immediate mode file to force physx re-link Change 3290807 on 2017/02/07 by Richard.Hinckley #jira UE-39891 Updates to assist in automatic documentation generation. Change 3290946 on 2017/02/07 by Lina.Halper Fix issue of notify looping. #jira: UE-31463 #Code review:Martin.Wilson Change 3291553 on 2017/02/07 by Lina.Halper Rename/move file(s) - modified mesh mapping controller window to be Control Rig Change 3291571 on 2017/02/07 by Lina.Halper added set up spine option #code review:Thomas.Sarkanen Change 3291581 on 2017/02/07 by Ori.Cohen Temporarily turn off phat immediate mode preview which crashes. Change 3291949 on 2017/02/08 by James.Golding Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3291819 Change 3291966 on 2017/02/08 by Lina.Halper Fix issue with notify looping bug #jira: UE-31463 Change 3292247 on 2017/02/08 by Marc.Audy Clean up bad merge caused by Fortnite integration to main Change 3292326 on 2017/02/08 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3292313 Change 3292409 on 2017/02/08 by Marc.Audy Resubmit FortPawn.cpp with proper code even though perforce doesn't think there is a difference since when you sync it, the contents are wrong. Change 3292481 on 2017/02/08 by Ori.Cohen Fix for convex hull cooking (from Josh.S) #JIRA UE-41656 Change 3292492 on 2017/02/08 by Mieszko.Zielinski Redone replacement of deprecated navigation system's BP functions in Fortnite BPs #Fortnite Change 3292778 on 2017/02/08 by Ori.Cohen Touch physx DDC key for new cooking. #JIRA UE-41656 [CL 3293329 by Marc Audy in Main branch]
2017-02-08 17:53:41 -05:00
GizmoLocalBounds = FBox(ForceInit);
// Hide the snap actor
if( SnapGridActor != nullptr )
{
SnapGridActor->GetRootComponent()->SetVisibility( false );
}
}
}
void UViewportWorldInteraction::SpawnTransformGizmoIfNeeded()
{
// Check if there no gizmo or if the wrong gizmo is being used
bool bSpawnNewGizmo = false;
if ( TransformGizmoActor == nullptr || TransformGizmoActor->GetClass() != TransformGizmoClass )
{
bSpawnNewGizmo = true;
}
if ( bSpawnNewGizmo )
{
// Destroy the previous gizmo
if ( TransformGizmoActor != nullptr )
{
DestroyTransientActor(TransformGizmoActor);
}
// Create the correct gizmo
const bool bWithSceneComponent = false; // We already have our own scene component
TransformGizmoActor = CastChecked<ABaseTransformGizmo>(SpawnTransientSceneActor(TransformGizmoClass, TEXT( "PivotTransformGizmo" ), bWithSceneComponent));
check( TransformGizmoActor != nullptr );
TransformGizmoActor->SetOwnerWorldInteraction( this );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if ( !IsTransformGizmoVisible() )
{
const bool bShouldBeVisible = false;
const bool bPropagateToChildren = true;
TransformGizmoActor->GetRootComponent()->SetVisibility( bShouldBeVisible, bPropagateToChildren );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
}
}
void UViewportWorldInteraction::SetTransformGizmoVisible( const bool bShouldBeVisible )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bShouldTransformGizmoBeVisible = bShouldBeVisible;
// NOTE: The actual visibility change will be applied the next tick when RefreshTransformGizmo() is called
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
bool UViewportWorldInteraction::ShouldTransformGizmoBeVisible() const
{
return bShouldTransformGizmoBeVisible;
}
bool UViewportWorldInteraction::IsTransformGizmoVisible() const
{
return ( Transformables.Num() > 0 && VI::ShowTransformGizmo->GetInt() != 0 && bShouldTransformGizmoBeVisible && !HasTransformableWithVelocityInSimulate() );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
void UViewportWorldInteraction::SetTransformGizmoScale( const float NewScale )
{
TransformGizmoScale = NewScale;
// NOTE: The actual scale change will be applied the next tick when RefreshTransformGizmo() is called
}
float UViewportWorldInteraction::GetTransformGizmoScale() const
{
return TransformGizmoScale;
}
void UViewportWorldInteraction::ApplyVelocityDamping( FVector& Velocity, const bool bVelocitySensitive )
{
const float InertialMovementZeroEpsilon = 0.01f; // @todo vreditor tweak
if ( !Velocity.IsNearlyZero( InertialMovementZeroEpsilon ) )
{
// Apply damping
if ( bVelocitySensitive )
{
const float DampenMultiplierAtLowSpeeds = LowSpeedInertiaDamping;
const float DampenMultiplierAtHighSpeeds = HighSpeedInertiaDamping;
const float SpeedForMinimalDamping = 2.5f * GetWorldScaleFactor(); // cm/frame // @todo vreditor tweak
const float SpeedBasedDampeningScalar = FMath::Clamp( Velocity.Size(), 0.0f, SpeedForMinimalDamping ) / SpeedForMinimalDamping; // @todo vreditor: Probably needs a curve applied to this to compensate for our framerate insensitivity
Velocity = Velocity * FMath::Lerp( DampenMultiplierAtLowSpeeds, DampenMultiplierAtHighSpeeds, SpeedBasedDampeningScalar ); // @todo vreditor: Frame rate sensitive damping. Make use of delta time!
}
else
{
Velocity = Velocity * 0.95f;
}
}
if ( Velocity.IsNearlyZero( InertialMovementZeroEpsilon ) )
{
Velocity = FVector::ZeroVector;
}
}
void UViewportWorldInteraction::CycleTransformGizmoCoordinateSpace()
{
const bool bGetRawValue = true;
const ECoordSystem CurrentCoordSystem = GetModeTools().GetCoordSystem( bGetRawValue );
SetTransformGizmoCoordinateSpace( CurrentCoordSystem == COORD_World ? COORD_Local : COORD_World );
}
void UViewportWorldInteraction::SetTransformGizmoCoordinateSpace( const ECoordSystem NewCoordSystem )
{
// If we are trying to enter world space but are aligning to actors, turn off aligning to actors
if (NewCoordSystem == COORD_World && AreAligningToActors())
{
if (HasCandidatesSelected())
{
SetSelectionAsCandidates();
}
GUnrealEd->Exec(GetWorld(), TEXT("VI.EnableGuides 0"));
}
GetModeTools().SetCoordSystem( NewCoordSystem );
}
ECoordSystem UViewportWorldInteraction::GetTransformGizmoCoordinateSpace() const
{
if (AreAligningToActors())
{
return COORD_Local;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
const bool bGetRawValue = false;
return GetModeTools().GetCoordSystem(bGetRawValue);
}
float UViewportWorldInteraction::GetMaxScale()
{
return VI::ScaleMax->GetFloat();
}
float UViewportWorldInteraction::GetMinScale()
{
return VI::ScaleMin->GetFloat();
}
void UViewportWorldInteraction::SetWorldToMetersScale( const float NewWorldToMetersScale, const bool bCompensateRoomWorldScale /*= false*/ )
{
check (NewWorldToMetersScale > 0);
// @todo vreditor: This is bad because we're clobbering the world settings which will be saved with the map. Instead we need to
// be able to apply an override before the scene view gets it
ENGINE_API extern float GNewWorldToMetersScale;
GNewWorldToMetersScale = NewWorldToMetersScale;
OnWorldScaleChangedEvent.Broadcast(NewWorldToMetersScale);
if (bCompensateRoomWorldScale)
{
const FVector RoomspacePivotLocation = GetRoomSpaceHeadTransform().GetLocation();
FTransform NewRoomTransform = GetRoomTransform();
CompensateRoomTransformForWorldScale(NewRoomTransform, NewWorldToMetersScale, RoomspacePivotLocation);
RoomTransformToSetOnFrame = MakeTuple( NewRoomTransform, CurrentTickNumber + 1 );
}
}
UViewportInteractor* UViewportWorldInteraction::GetOtherInteractorIntertiaContribute( UViewportInteractor* Interactor )
{
// Check to see if the other hand has any inertia to contribute
UViewportInteractor* OtherInteractorThatWasAssistingDrag = nullptr;
{
UViewportInteractor* OtherInteractor = Interactor->GetOtherInteractor();
if( OtherInteractor != nullptr )
{
FViewportInteractorData& OtherHandInteractorData = OtherInteractor->GetInteractorData();
// If the other hand isn't doing anything, but the last thing it was doing was assisting a drag, then allow it
// to contribute inertia!
if ( OtherHandInteractorData.DraggingMode == EViewportInteractionDraggingMode::Nothing && OtherHandInteractorData.bWasAssistingDrag )
{
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
if ( !OtherHandInteractorData.DragTranslationVelocity.IsNearlyZero( VI::DragTranslationVelocityStopEpsilon->GetFloat() ) )
{
OtherInteractorThatWasAssistingDrag = OtherInteractor;
}
}
}
}
return OtherInteractorThatWasAssistingDrag;
}
void UViewportWorldInteraction::DestroyActors()
{
if(TransformGizmoActor != nullptr)
{
DestroyTransientActor(TransformGizmoActor);
TransformGizmoActor = nullptr;
}
if(SnapGridActor != nullptr)
{
DestroyTransientActor(SnapGridActor);
SnapGridActor = nullptr;
SnapGridMeshComponent = nullptr;
}
if(SnapGridMID != nullptr)
{
SnapGridMID->MarkAsGarbage();
SnapGridMID = nullptr;
}
}
bool UViewportWorldInteraction::AreAligningToActors() const
{
return (VI::ActorSnap->GetInt() == 1) ? true : false;
}
bool UViewportWorldInteraction::HasCandidatesSelected()
{
return CandidateActors.Num() > 0 ? true : false;
}
void UViewportWorldInteraction::SetSelectionAsCandidates()
{
if (HasCandidatesSelected())
{
CandidateActors.Reset();
}
else if (VI::ActorSnap->GetInt() == 1)
{
TArray<TUniquePtr<FViewportTransformable>> NewTransformables;
USelection* ActorSelectionSet = GEditor->GetSelectedActors();
static TArray<UObject*> SelectedActorObjects;
SelectedActorObjects.Reset();
ActorSelectionSet->GetSelectedObjects(AActor::StaticClass(), /* Out */ SelectedActorObjects);
for (UObject* SelectedActorObject : SelectedActorObjects)
{
AActor* SelectedActor = CastChecked<AActor>(SelectedActorObject);
CandidateActors.Add(SelectedActor);
}
Deselect();
}
}
float UViewportWorldInteraction::GetCurrentDeltaTime() const
{
return CurrentDeltaTime;
}
bool UViewportWorldInteraction::ShouldSuppressExistingCursor() const
{
if (VI::ForceShowCursor->GetInt() == 1)
{
return false;
}
else
{
return bShouldSuppressCursor;
}
}
void UViewportWorldInteraction::SetForceCursor(const bool bInShouldForceCursor)
{
bShouldForceCursor = bInShouldForceCursor;
}
bool UViewportWorldInteraction::ShouldForceCursor() const
{
return true;
}
const UViewportInteractionAssetContainer& UViewportWorldInteraction::GetAssetContainer() const
{
return *AssetContainer;
}
const UViewportInteractionAssetContainer* UViewportWorldInteraction::LoadAssetContainer()
{
UViewportInteractionAssetContainer* AssetContainer = LoadObject<UViewportInteractionAssetContainer>(nullptr, UViewportWorldInteraction::AssetContainerPath);
checkf(AssetContainer, TEXT("Failed to load ViewportInteractionAssetContainer (%s). See log for reason."), UViewportWorldInteraction::AssetContainerPath);
return AssetContainer;
}
void UViewportWorldInteraction::PlaySound(USoundBase* SoundBase, const FVector& InWorldLocation, const float InVolume /*= 1.0f*/)
{
if (IsActive() && GEditor != nullptr && GEditor->CanPlayEditorSound())
{
const float Volume = InVolume*VI::SFXMultiplier->GetFloat();
UGameplayStatics::PlaySoundAtLocation(GetWorld(), SoundBase, InWorldLocation, FRotator::ZeroRotator, Volume);
}
}
void UViewportWorldInteraction::SetInVR(const bool bInVR)
{
bIsInVR = bInVR;
if (bIsInVR)
{
VI::NavigationMode->Set(0);
}
}
bool UViewportWorldInteraction::IsInVR() const
{
return bIsInVR;
}
EGizmoHandleTypes UViewportWorldInteraction::GetCurrentGizmoType() const
{
if (GizmoType.IsSet())
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
{
return GizmoType.GetValue();
}
else
{
switch( GetModeTools().GetWidgetMode() )
{
case UE::Widget::WM_TranslateRotateZ:
return EGizmoHandleTypes::All;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
case UE::Widget::WM_Translate:
return EGizmoHandleTypes::Translate;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
case UE::Widget::WM_Rotate:
return EGizmoHandleTypes::Rotate;
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
case UE::Widget::WM_Scale:
return EGizmoHandleTypes::Scale;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
}
return EGizmoHandleTypes::Translate;
}
void UViewportWorldInteraction::SetGizmoHandleType( const EGizmoHandleTypes InGizmoHandleType )
{
GizmoType.Reset();
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
switch( InGizmoHandleType )
{
case EGizmoHandleTypes::All:
GizmoType = InGizmoHandleType;
GetModeTools().SetWidgetMode( UE::Widget::WM_Translate );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
break;
case EGizmoHandleTypes::Translate:
GetModeTools().SetWidgetMode( UE::Widget::WM_Translate );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
break;
case EGizmoHandleTypes::Rotate:
GetModeTools().SetWidgetMode( UE::Widget::WM_Rotate );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
break;
case EGizmoHandleTypes::Scale:
GetModeTools().SetWidgetMode( UE::Widget::WM_Scale );
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
break;
check(0);
}
}
void UViewportWorldInteraction::SetTransformGizmoClass( const TSubclassOf<ABaseTransformGizmo>& NewTransformGizmoClass )
{
TransformGizmoClass = NewTransformGizmoClass;
}
void UViewportWorldInteraction::SetDraggedInteractable( IViewportInteractableInterface* InDraggedInteractable, UViewportInteractor* Interactor )
{
Interactor->SetDraggingMode(EViewportInteractionDraggingMode::Interactable);
DraggedInteractable = InDraggedInteractable;
if ( DraggedInteractable && DraggedInteractable->GetDragOperationComponent() )
{
DraggedInteractable->GetDragOperationComponent()->StartDragOperation();
}
}
bool UViewportWorldInteraction::IsOtherInteractorHoveringOverComponent( UViewportInteractor* Interactor, UActorComponent* Component ) const
{
bool bResult = false;
if ( Interactor && Component )
{
for ( UViewportInteractor* CurrentInteractor : Interactors )
{
if ( CurrentInteractor != Interactor && CurrentInteractor->GetLastHoverComponent() == Component )
{
bResult = true;
break;
}
}
}
return bResult;
}
void UViewportWorldInteraction::SpawnGridMeshActor()
{
// Snap grid mesh
if( SnapGridActor == nullptr )
{
const bool bWithSceneComponent = false;
SnapGridActor = SpawnTransientSceneActor<AActor>(TEXT("SnapGrid"), bWithSceneComponent);
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4279600) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4073383 by Patrick.Boutot [AJA] Set base timecode for AJA TimecodeProvider Change 4075631 by Patrick.Boutot Change icon for TimecodeSynchronizer. Update TimecodeSynchronizer with the new AJA delayed open sources. Add TimecodeProvider to TimecodeSynchronizer. Can now sync with TimecodeProvider or a master. Make sure the source are ready before viewing them. Remove PreRoll command. Change 4077328 by JeanMichel.Dignard Fixed SoftObjectPtr/Paths becoming invalid when saving a new world since it's being moved from /Temp/Untitled to its own package. #jira UEENT-1423 Change 4077338 by Rex.Hill USD plugin updated to v8.4 with python support Change 4079063 by Rex.Hill USD sdk recompiled as vs2015 targeting older version of CRT, also dependency added for PythonScriptPlugin Change 4079911 by Rex.Hill USD pyd files recompiled Change 4080058 by Rex.Hill Fix usd plugin loading, added missing libtrace.dll Change 4080376 by Matt.Hoffman Improvements to Sequence Recorder's public API to expose more functionality for third parties. Change 4084984 by Matt.Hoffman Sequence Recorder can now set a global time dilation when recording starts, optionally ignoring the dilation when recording keys. This is useful for recording objects in your scene that move too fast to track with a camera but still ending up with the same length recording in the end. #jira UESP-670 Change 4086688 by Matt.Hoffman Exposes getting and setting keys from sequencer sections via the scripting layer. Examples for how to work with Python and key data can be found in /Plugins/MovieScene/SequencerScripting/Content/Python in the form of "sequencer_examples.py" and "sequencer_key_examples.py". Documentation on how to use these examples is included in the python file. #jira UESP-547 Change 4088904 by Max.Chen Sequence Recorder: Set actor tags as unique Change 4089176 by Max.Chen Sequence Recorder: Add option to record to the target level sequence playback range length. Change 4089180 by Max.Chen Sequence Recorder: Add protection agains null movie scene sections Change 4089205 by Max.Chen Sequence Recorder: Save recorded audio files if auto save is on. #jira UESP-660 Change 4089206 by Max.Chen Sequencer: When importing fbx, if a camera is created, force mapping to be by name matching only so that other nodes in the fbx file do not get mapped onto the newly created camera. #jira UE-59347 Change 4089214 by Max.Chen Sequence Recorder: Add support for looping/rolling takes #jira UESP-658 Change 4089280 by Max.Chen Sequence Recorder: Added support to specify properties from actor classes (camera rig rail - current position on rail) Change 4093824 by Andrew.Rodham Editor: Added option to class pickers to force use of class Display Names Change 4093826 by Andrew.Rodham Removed implicit gamma to linear conversion from EXR writer - This was only implemented for exr data that was supplied as 8 bits per channel (ie. uint8), but there is no way of communicating with the Image Writer API to tell it whether you want it to do that conversion. This code is too low level to be making assumptions about what color-space the data is in. - This ensures that R8G8B8A8 render targets exported as EXR are exported as-is without any modification #jira UESP-545 Change 4093830 by Andrew.Rodham Fixed shutdown crash when destroying a media player that was still playing Change 4093831 by Andrew.Rodham Fixed exception handling in png image wrapper Change 4093833 by Andrew.Rodham Slate: Fixed not being able to set a hyperlink on notifications with unbound attributes that had explicit values set Change 4093841 by Andrew.Rodham Added a utility struct for dealing with editor actor layers from within Blueprints Change 4093867 by Andrew.Rodham Sequencer: Added the ability to implement custom capture protocols for movie scene captures - Converted capture protocol settings and instances to be single UObjects. This unifies the two concepts, and allows for Blueprint implementations. - Removed capture protocol registry since it is no longer required. - Removed FCaptureProtocolID in favor of class discovery at runtime. - Added new module "ImageWriteQueue", responsible for asynchronously managing a queue of image file write operations. - Added new capture protocol for capturing final pixels to EXR (including burn-ins) - Added a new BP function, ExportToDisk, accessible on all UTexture properties for writing texture and render target data to image files - New global BP nodes for querying movie capture status: IsCaptureInProgress, FindCaptureProtocol - Removed Flush On Draw functionality from viewports and frame grabber since it is unnecessary. #jira UESP-545 Change 4094239 by Rex.Hill Export sequence to usd #jira UESP-563 Change 4094393 by Andrew.Rodham Renamed references of 'BufferName' to 'StreamName' for user defined capture protocols Change 4094622 by Patrick.Boutot Add MediaFrameworkUtilitites plugin. Add MediaBundle. An asset that create a MediaPlayer, MediaSource, MediaTexture and MaterialInstance. Add MediaBundleActor. Can auto play a MediaBundle when click & drag in the viewport. Add the Media category in placement mode. Add flag on the MediaPlayer that prevent it from closing when PIE is started or closed. Change 4094673 by Anousack.Kitisa Created widget to display metadata as list view of tags/values. #jira UEENT-1296 Change 4094795 by Simon.Therriault MediaFrameworkUtilities - Adding default media texture for default media bundle material - Changed default material to unlit Change 4094867 by Rex.Hill Usd sequence exporter camera rotation corrected Change 4096426 by JeanLuc.Corenthin - Fixed logic of FLayoutUV::FindCharts to properly extract the list of triangles based on a mesh description. - Fixed logic in FMeshDescriptionOperations::ConverToRawMesh & FMeshDescriptionOperations::ConvertHardEdgesToSmoothGroup to take in account the fact that the arrays are sparse arrays - Fixed logic in FQuadricSimplifierMeshReduction::ReduceMeshDescription which wrongly assumed that number of vertex instances equals three times the number of triangles. - Added early-out in UMeshDescription::ComputePolygonTriangulation when perimeter has 3 vertex indices - Changed version of static mesh and mesh description - Fixed issue with mismatching attribute set when generating LOD meshes #jira UEENT-887, UE-59474, UE-59471 Change 4097101 by Patrick.Boutot Remove warning in PropertyEditorClass when trying to load the "None" class. Change 4097443 by Rex.Hill USD export bake keys Change 4097468 by Patrick.Boutot Edit and initialize the timecode provider of the editor. Change 4097479 by Anousack.Kitisa Added support for commandlet and unattended script modes to Plugin Warden. #jira UE-57333 Change 4097578 by Rex.Hill USD export tweaks Change 4098257 by Simon.Therriault GarbageMatteCaptureComponent - Adding spawned actor tracking to be able to use GarbageMatteActor spawned in editor. Change 4100072 by Jamie.Dale Updated wrapped enums to be more consistent with native Python enums - Wrapped enums now generate values that are instances of the enum type itself, containing a name and value field (like native Python enums). - Wrapped enums are now strongly typed and do not allow implicit conversion from numbers (explicit casting is available, but throws if the value is unknown). - Wrapped enum entries may be compared against numbers (even numbers that don't have valid values) via the == and != operators (like IntEnum in Python). - Wrapped enums may now be iterated (like native Python enums). - Wrapped enums now return a length based on their number of entries (like native Python enums). - ScriptName meta-data can now be used with enum entries. Change 4100255 by Patrick.Boutot [MediaBundle] Modify the base shader to support "failed texture" Change 4103838 by Simon.Therriault MR Garbage Matte Component - Adding FocalDriver interface to be able to poll focal information from outside (cinecamera). Could be updated to be event driven. Change 4115616 by Rex.Hill USD Exporter now exposed to UI Change 4116333 by Simon.Therriault MediaBundle - Updated default media bundle to include lens distortion and chromakeying - Added possibility to spawn material editor for MediaBundle inner material - Fix for inner objects flags preventing asset deletion - Fix for CloseMedia not being called when changing map Lens Distortion - Fix for not being able to generate a Identity lens displacement map Change 4117952 by Rex.Hill Expose OpenEditorForAssets to python Change 4118498 by Rex.Hill Sequencer USD export can now export properties of actors in levels Change 4118515 by Rex.Hill Update sequencer export task comment Change 4118706 by Rex.Hill Sequencer USD updates Change 4118968 by Rex.Hill Sequencer USD export now supports visibility Change 4119702 by Simon.Therriault MediaBundle - Fix crash when changing MediaBundle on Actor multiple times. - Fix crash when Undoing after placing a MediaBundle and pressing Stop then Undo. - Fixed bad reference count in MediaBundle when undo/redo of MediaBundle setting changed on MediaBundleActor - Added PostEditChange after setting MaterialProperty to fix potential propagation. Change 4120060 by Patrick.Boutot Fix typo for TimecodeProviderClassName. Add "Config required restart" Add a button to reapply the CustomTimeStep or TimecodeProvider Change 4122062 by Krzysztof.Narkowicz Fixed movie burnout fixed timestep. Engine didn't use a fixed time step due to a following bug: 1. UAutomatedLevelSequenceCapture::Initialize calls UMovieSceneCapture::Initialize. 2. UMovieSceneCapture::Initialize creates FRealTimeCaptureStrategy and calls CaptureStrategy->OnInitialize(). 3. UAutomatedLevelSequenceCapture::Initialize changes CaptureStrategy to FFixedTimeStepCaptureStrategy, but no one calls CaptureStrategy->OnInitialize(); after that and this function is required to set the fixed time step. 4. Result: movies are burned out with variable time step, causing different inconsistencies between frames, settings and HW configurations. #jira none Change 4122236 by Anousack.Kitisa Made the "Import Into Level..." File menu action follow the EditorImport flag of a SceneImportFactory. #jira UE-57612 #jira UEENT-762 Change 4122588 by Rex.Hill Sequencer Export USD lights now supported Change 4122822 by JeanMichel.Dignard Fix for UV packing FlipX. Don't flip the empty columns at the end since they are always expected to be on the right side. The same was already done for FlipY. #jira UE-56664 Change 4123009 by JeanMichel.Dignard Copied fixes from MeshUtilities LayoutUV to MeshDescription LayoutUV Change 4123517 by JeanLuc.Corenthin Fixed crash when running cooked game crash with asset imported from datasmith #jira UE-60173 Change 4124569 by Patrick.Boutot [AJA] When the CustomTimeStep & TimecodeProvider signal is lost in the editor (not in PIE), try to re-synchronize every second. Change 4126421 by Max.Chen Sequencer: Add the ability to switch the takes of all the selected shots/subsections. #jira UESP-761 Change 4133010 by Simon.Therriault MediaBundle - Made assets in the bundle visible in the content browser (different package per asset) and updated to support duplication correctly - Quick fix for MaterialDynamicInstance garbage matte parameter not going back to default value when cleared. - Added looping option on the bundle Keyer and lens materials - Renamed some parameter groups to Keyer_XX Change 4135728 by Rex.Hill MovieSceneCapture crash fix when iteration on classes defined in python Change 4135732 by Rex.Hill Sequencer scripting: expose get playback range, sub sequence get sequence Change 4135734 by Rex.Hill USD python code refactored Change 4136017 by Matt.Hoffman Fixes FrameNumber nodes tripping an ensure when using them via Blueprints and fixes FrameNumbers & friends not being properly breakable in BP. #jira UE-60188 Change 4147959 by Patrick.Boutot Media Output Architecture. Support 8bits & 10bits color. Capture the buffer as is with the correct pixel format and the corredt target size. Change 4147962 by Patrick.Boutot Remove AjaMediaViewportOutput && AjaMediaViewportOutputImpl. Refactor AjaMediaOutput to extend MediaOutput. Refactor AjaMediaGrameGrabberProtocol to use AjaMediaCapture. Create AjaMediaCapture. Change 4148395 by Rex.Hill USD python code cleanup Change 4152901 by Rex.Hill Fix crash when recompiling blueprint or script class that serializes an object reference manually Change 4152906 by Rex.Hill USD level import/export exposed to UI Change 4152956 by Rex.Hill Rename unreal_usd to usd_unreal to avoid future module name conflicts Change 4153331 by Rex.Hill Simplify USD attribute definitions Change 4155472 by Rex.Hill USD level import now handles cameras and lights Change 4155832 by Patrick.Boutot Fix Packaging for MediaFrameworkUtilities Fix MediaPlayer that crash on close when the engine is closing. Change 4156020 by Mike.Zyracki LIVE LINK Sequencer Recording and Playback #jira UESP-714 #jira UESP-715 Support for Live Link Recording/Playback with Sequencer. Basically if we see a MotionController controlled by a LiveLink Subject or a LiveLink Component on a Actor we create a LiveLinkTrack for it that will record raw sequencer data into. We currently do that at the end of recording but will investigate saving it as we record. For Playback we create a Live Link Subject per recorded track and push up interpolated data per Engine Tick on Evaluate. We need to see if we need to send out raw data but that's complicated due to the fact that sequencer time may not be sequential but random, Moved FLiveLinkTimeFrame to LiveLinkTypes so we can grab raw data. Added functions to LiveLinkClient/Subject to get raw data so we dont' need to do expensive searches. Also changed that code so that we can only save the LiveLinkData when specified. We decided to have the sequencer own saving of the live link data so we explicilty turn on saving when we start to record and then turn if off at the end. Without this it's possible to easily run out of memory while LiveLink records. In order to record LiveLinkComponents under Actors we had to change ActorRecording to record ActorComponents and not jus SceneComponents. Not sure of any drawbacks with this but it seems to work well. Had to make sure we stll keeped attach/parent/child logic when recording. Change 4158488 by Rex.Hill USD scene import/export now uses UsdLux lights Change 4158742 by Rex.Hill USD: Add test for level export and import Change 4161645 by Patrick.Boutot Update MediaRecorder to use the ImageWriteQueue. Add flag in IImageWriteQueue.Enqueue to prevent block if the queue is full. Change 4161651 by Patrick.Boutot Modify MediaCompositing to use an existing MediaPlayer Change 4161657 by Patrick.Boutot Extend the SequenceRecorder to support additional object to record from other plugins. Add SequenceRecorder for MediaPlayer. Will record every frame to disk that the MediaPlayer produce. Change 4162699 by Rex.Hill USD export sequence updates Change 4163138 by Rex.Hill USD sequence export test added Change 4163426 by Mike.Zyracki Fix for Curve Names being kept and AutoSetting Tangents on Live Link Recording Change 4165714 by Patrick.Boutot [MediaCapture] Remove color box that tell the status of the MediaCapture. Add MediaCapture's name and use an image to represent the status. Use a ScrollBox around the "preview" output. Can select any actors. Only show the selectable camera grid when there is more than one camera. Change 4166652 by Rex.Hill Expose SetMobility to scripting Change 4167292 by Mike.Zyracki Make sure we call Finalize Evaluation when closing or deleting the Sequencer. This will make sure TearDown is called on sections which fixes issues with LiveLink Sources not getting deleted and probably also issues with MovieScenePlayers not getting released correctly. Also includes addition to show the SubjectName next to the Sequencer Source in the LiveLinkClient UI. Change 4170578 by Rex.Hill PackageTools exposed to scripting Change 4170619 by Rex.Hill Fix ReversePolygonFacing crash Change 4170621 by Rex.Hill USD mesh import can now be given list of individual meshes Change 4172495 by Matt.Hoffman Fixes some flipped logic in Sequencer Media Track that was preventing it from working as expected. Slightly simplifies the logic on setting up movie data, and ensures that the external movie player has a callback registered so that SeekTo calls will work. Makes it so that you can specify your own sound component with an external media player as a media player can have multiple sound components listening to it. Adds support for flagging the media player to loop to help cue some media sources like EXR to handle loop points better. #jira None Change 4173387 by Jon.Nabozny Bookmark usability and extensibility improvements Change 4173755 by Rex.Hill PackageTools namespace deprecation Change 4181799 by Patrick.Boutot Fix precesion error when importing a camera switcher in sequencer #jira UE-61212 Change 4184435 by Patrick.Boutot Only show the MediaCapture tab spawner in the level editor. Make sure the Material used to draw the render target is GCed. Change 4195803 by Patrick.Boutot Warn user if the AJA CustomTimeStep is used with VSync enabled. Change 4195866 by Patrick.Boutot Remove mention of CharBGR10A2 in AJA. The feature is not yet ready. Change 4196059 by Rex.Hill Fix linux compile due to a .cpp including BookMarkBase.h instead of BookmarkBase.h Change 4196380 by Patrick.Boutot MediaCapture capture the backbuffer when the Viewport don't use an internal texture. #jira UE-61601 Change 4199378 by Patrick.Boutot For MediaFramework, add support for 10bits RGB texture Change 4199380 by Patrick.Boutot [AJA] Add support for 10bits RGB texture in input Fix interlaced format that wasn't using the proper Stride value. Change 4200359 by Jamie.Dale Renamed some "K2_" prefixed functions for Python Change 4203016 by Max.Chen Sequencer: Add movie scene locking/read only. Fixed a few bugs with locked sections - shouldn't be able to create or move keys on locked sections #jira UESP-867 Change 4203018 by Max.Chen Sequencer: Test for movie scene read only before calling modify/transactions. #jira UESP-867 Change 4203622 by Simon.Therriault Bringing Aja MediaOutput MediaMode fix from Release 4.20 Change 4204895 by Rex.Hill Expose several file path functions to scripting Change 4206747 by Rex.Hill USD level import and export updates Change 4206783 by Rex.Hill USD updates Change 4207021 by Rex.Hill USD, fix rotation on level import when there is non-uniform scale Change 4207414 by Rex.Hill USD import static mesh material improvements Change 4209733 by Patrick.Boutot Change the log time to use the current frame Timecode #jira UEENT-1107 Change 4209738 by Patrick.Boutot Option to automatically try to reopen the MediaSource again if an error is detected Change 4210385 by Max.Chen Sequencer: Fix CurrentShot LocalTime computation by using sequence time in playback resolution to compute the local shot time. Also, fixed the burnin asset so that CurrentShotLocalTime is hooked up to ShotFrame instead of MasterTime. This fixes a bug where the burnin's {ShotFrame} is not reporting the local shot frame number. #jira UE-61728 Change 4219824 by Patrick.Boutot Use the correct EditorCondition for property MaxNumAncillaryFrameBuffe Change 4220706 by Louise.Rasmussen Sequencer: Syncronizes Sections using Source Timecode Relative to the first Selected Section #JIRA UESP-826 Change 4220708 by Louise.Rasmussen Sequencer: Adds SourceTimecode option to the Render Movie Settings Burn In #JIRA UESP-826 Change 4226970 by Patrick.Boutot Add a Timecode widget, TimecodeProvider widget and a TimecodeProvider Tab Change 4227333 by Rex.Hill USD Sequencer export now supports deltas Change 4227455 by Matt.Hoffman Adds support to the Audio Mixer Submix to pause and resume a recording. #jira UESEQ-77 Change 4230963 by Patrick.Boutot Make the namespace an import option Change 4234208 by Jon.Nabozny Fixed crash when 5 or more LiveLink sources were connected at the same time Change 4234273 by Jon.Nabozny Add methods in FApp to get the current Timecode FrameRate. Change 4237170 by Simon.Therriault MediaCapture Fix for MediaCapture panel not working in PIE Change 4243758 by Andrew.Rodham It's now possible to resolve pixel data from a render target whose texture resource is still pending creation Change 4244790 by Matt.Hoffman This adds experimental support to Sequencer's Render to Movie for exporting audio via rendering a second pass. This requires the new audio mixer (launch editor with "-audiomixer") and currently supports exporting to .wav. The second pass disables rendering in the Viewport and disables capturing frames during this pass which removes the overhead caused by rendering the scene. Complex scenes still evaluate the sequence which may impact performance in complex situations (such as the Fortnite Launch Trailer). Current Limitations: Requires the new audio mixer ("-audiomixer") The second pass must acheive real time framerates. The audio engine is only built to handle real time situations (due to the high precision needed, gotten via the platform clock) so any drops in engine framerate during the second pass will cause a desync of the audio (as there will be more samples captured than frames of video). The editor has significant overhead which often prevents achieving consistent real-time rates. Using "Capture in New Process" alleviates this issue, even without closing the Editor. Audio has been enabled for both image capture and audio capture passes, which means stuttery audio now plays back during image capture. Attempts to alleviate this issue ended up conflicting with some editor code that forces the audio multiplier to 1.0 each Tick(), so audio has to play on both image and audio passes. Forces background audio (otherwise your output audio wav will be blank!) when app is not in focus, though users should leave the app in focus for best performance. #jira UESEQ-77, UESP-669 Change 4246443 by Simon.Tourangeau Remove Beta flag from nDisplay plugin #jira UEENT-1716 Change 4246480 by Simon.Tourangeau Fix nDisplay plugin icon #jira UEENT-1715 Change 4246571 by Simon.Tourangeau Merging Lauren's VR Editor fixes 4085915 Gamma correction fixes for VR Mode Content Browser icons and camera previews 4087955 Adding a third looping option to the Sequencer Radial Menu. Selecting the Looping option now cycles through No Looping > Loop All > Loop Range 4089914 Adding set start/end range buttons to radial menu 4090502 Fixing sequencer looping not being set correctly 4092824 Cameras are now visible in VR Mode - interim implementation until Game Mode works entirely 4095161 Fix for opening a sequence blocking level editor tab drag and drop 4096999 Making a VR Edit show flags mode that is similar to Game Mode but without the Game flag set to true, does hide billboards. Camera hide/show behavior is now correct. 4097286 Placing cameras now only summons the preview panel once you release 4100941 New spawn location for camera preview window (in front and to the side, on whichever side matches your UI hand) 4102732 Hiding VR editor elements from camera preview 4103378 Added camera burnin text on preview windows as well. 4103466 Fixes for camera text 4103779 Fix for the actor previews not unpinning when entering VR mode. 4105722 Adding support for multiple viewport previews in VR mode, and not creating a new viewport interaction if one already exists when getting it. 4106982 Any dockable window can now be placed in the world. 4107298 Fix for crash when closing multiple camera previews 4107426 Fix for crash when connecting node with no texture set 4136343 UI windows docked "to the world" no longer scale with you and stay the size they are docked at. 4136345 Settings for tweaking VR mode movement 4147473 Fix for controllers not showing up 4147734 Sequencer scrubbing will now pause when removing your thumb from a Vive touchpad 4171489 Added external UI panel support to VREditor module. Created an example camera-adjusting UI 4186392 Second fix for sequencer scrubbing on the radial menu Change 4247984 by Jamie.Dale Fixed potential memory corruption caused by Python glue code generation #jira UE-62397 Change 4255471 by Anousack.Kitisa Added functionalities to add/insert/remove UV channel from a StaticMesh accessible through the StaticMeshEditor and scripting. #jira UEENT-1592 #jira UEENT-1597 #jira UEENT-1660 Change 4256323 by Anousack.Kitisa Added Polygon Selection Mode by smoothing group in the MeshEditor. #jira UEENT-1594 Change 4258012 by Homam.Bahnassi Extending UVEdit material function to support mirroring. #jira UE-57306 Change 4258231 by Jamie.Dale Fixed GetHostName failing to convert UTF-8 data correctly Change 4258579 by Jamie.Dale Ensure that packages re-created after deleting their only asset are marked as fully loaded Change 4258652 by Jamie.Dale Added script exposed method to convert an Unreal relative path to absolute Change 4259124 by Patrick.Boutot For MediaBundle, show or hide the failed texture on console. #jira UE-61672 Change 4259264 by Jamie.Dale Show an error if trying to use ExecutePythonScript without Python enabled #jira UE-62318 Change 4259451 by Jamie.Dale No longer use stale subtitles in dialogue waves #jira UE-61500 Change 4259511 by Jamie.Dale Fix crash when passing None as the class for find/load_asset #jira UE-62130 Change 4259542 by Patrick.Boutot Can select the TimecodeSynchronizer from the Toolbar menu. Add option to show it in the toolbar. Can be defaulted by user/machine. Change 4259582 by Patrick.Boutot Hide Edit & Paste from PropertyMenuAssetPicker Change 4260760 by Max.Chen Sequencer: Fix dereferencing null pointer - CameraNode Change 4260895 by Jamie.Dale Changing localization target settings now updates the gather INI files immediately Change 4262166 by Patrick.Boutot Add support for MediaSourceProxy and MediaOutputProxy. Change 4262535 by Andrew.Rodham Sequencer: Added a method for user-defined capture protocols to resolve a buffer and pass it directly to a bound delegate handler Originating source CL#4261391 Change 4262669 by Patrick.Boutot Add MediaProfile. It let the user select their media sources and media outputs by machine by user. Change 4264577 by Patrick.Boutot Change the type of FMediaFrameworkCaptureCameraViewportCameraOutputInfo.LockedCameraActors to LazyObject to enable cross level reference. #jira UE-62438 Include dependence to settings Change 4265750 by JeanLuc.Corenthin Fix array's size issues with MeshDescription utility functions #jira UEENT-1574 Change 4268181 by Patrick.Boutot Mark LockedCameraActors as deprecated. [CL 4279869 by JeanMichel Dignard in Main branch]
2018-08-13 12:29:41 -04:00
SnapGridActor->bIsEditorOnlyActor = true;
SnapGridMeshComponent = NewObject<UStaticMeshComponent>( SnapGridActor );
SnapGridMeshComponent->MarkAsEditorOnlySubobject();
SnapGridActor->AddOwnedComponent( SnapGridMeshComponent );
SnapGridActor->SetRootComponent( SnapGridMeshComponent );
SnapGridMeshComponent->RegisterComponent();
UStaticMesh* GridMesh = AssetContainer->GridMesh;
check( GridMesh != nullptr );
SnapGridMeshComponent->SetStaticMesh( GridMesh );
SnapGridMeshComponent->SetMobility( EComponentMobility::Movable );
SnapGridMeshComponent->SetCollisionEnabled( ECollisionEnabled::NoCollision );
UMaterialInterface* GridMaterial = AssetContainer->GridMaterial;
check( GridMaterial != nullptr );
SnapGridMID = UMaterialInstanceDynamic::Create( GridMaterial, GetTransientPackage() );
check( SnapGridMID != nullptr );
SnapGridMeshComponent->SetMaterial( 0, SnapGridMID );
// The grid starts off hidden
SnapGridMeshComponent->SetVisibility( false );
}
}
FVector UViewportWorldInteraction::CalculateAverageLocationOfTransformables()
{
FVector Result = FVector::ZeroVector;
for( TUniquePtr<FViewportTransformable>& TransformablePtr : Transformables )
{
Result += TransformablePtr.Get()->GetTransform().GetLocation();
}
Result /= Transformables.Num();
return Result;
}
FLinearColor UViewportWorldInteraction::GetColor(const EColors Color, const float Multiplier /*= 1.f*/) const
{
return Colors[ (int32)Color ] * Multiplier;
}
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00
void UViewportWorldInteraction::AddMouseCursorInteractor()
{
if( ++DefaultMouseCursorInteractorRefCount == 1 )
{
// Add a mouse cursor
DefaultMouseCursorInteractor = NewObject<UMouseCursorInteractor>();
DefaultMouseCursorInteractor->Init();
this->AddInteractor( DefaultMouseCursorInteractor );
}
}
void UViewportWorldInteraction::ReleaseMouseCursorInteractor()
{
if( --DefaultMouseCursorInteractorRefCount == 0 )
{
DefaultMouseCursorInteractorRefCount = 0;
// Remove mouse cursor
this->RemoveInteractor( DefaultMouseCursorInteractor );
DefaultMouseCursorInteractor = nullptr;
}
else
{
check( DefaultMouseCursorInteractorRefCount >= 0 );
}
}
FVector UViewportWorldInteraction::FindTransformGizmoAlignPoint(const FTransform& GizmoStartTransform, const FTransform& DesiredGizmoTransform, const bool bShouldConstrainMovement, FVector ConstraintAxes)
{
struct Local
{
static TArray<FVector> FindLocalSnapPoints(const FBox InBox)
{
TArray<FVector> PotentialSnapPoints;
FVector BoxCenter;
FVector BoxExtents;
InBox.GetCenterAndExtents(BoxCenter, BoxExtents);
FVector PotentialSnapPoint = FVector::ZeroVector;
// Potential snap points are:
// The center of each face
for (int32 X = -1; X < 2; ++X)
{
PotentialSnapPoint[0] = X*BoxExtents[0];
PotentialSnapPoints.AddUnique(PotentialSnapPoint);
// The center of each edge
for (int32 Y = -1; Y < 2; ++Y)
{
PotentialSnapPoint[1] = Y*BoxExtents[1];
PotentialSnapPoints.AddUnique(PotentialSnapPoint);
// Each corner
for (int32 Z = -1; Z < 2; ++Z)
{
PotentialSnapPoint[2] = Z*BoxExtents[2];
PotentialSnapPoints.AddUnique(PotentialSnapPoint);
}
}
}
return PotentialSnapPoints;
}
};
TArray<FGuideData> PotentialGizmoGuides;
// Get all the potential snap points on the transform gizmo at the desired location
const TArray<FVector> DesiredGizmoLocalGizmoSnapPoints = Local::FindLocalSnapPoints(GizmoLocalBounds);
DrawBoxBrackets(GizmoLocalBounds, DesiredGizmoTransform, FLinearColor::Yellow);
// Don't let the guide lines be shorter than the local bounding box extent in any direction.
// This helps when objects are close together
FVector GizmoLocalBoundsExtents;
FVector GizmoLocalBoundsCenter;
GizmoLocalBounds.GetCenterAndExtents(GizmoLocalBoundsCenter, GizmoLocalBoundsExtents);
const FVector MinGuideLength = GizmoLocalBoundsExtents - GizmoLocalBoundsCenter;
if(bShouldConstrainMovement)
{
ConstraintAxes = GizmoStartTransform.InverseTransformVector(ConstraintAxes);
}
// Our snap distances are some percentage of the transform gizmo's dimensions
const float AdjustedSnapDistance = (VI::ForceSnapDistance->GetFloat() / 100.0f) * 2.0f * (MinGuideLength.GetAbsMax());
int32 NumberOfMatchesNeeded = 0;
if (bShouldConstrainMovement)
{
for (int32 PointAxis = 0; PointAxis < 3; ++PointAxis)
{
if (!FMath::IsNearlyZero(ConstraintAxes[PointAxis], FVector::FReal(0.0001)))
{
NumberOfMatchesNeeded++;
}
}
}
else
{
NumberOfMatchesNeeded = 3;
}
TArray<const AActor*> UsingCandidateActors;
if (HasCandidatesSelected())
{
for (const AActor* SelectedCandidateActor : CandidateActors)
{
// Don't align to yourself, the entire world, or any actors hidden in the editor
if (SelectedCandidateActor != nullptr
&& !SelectedCandidateActor->IsSelected()
&& SelectedCandidateActor != GetWorld()->GetDefaultBrush()
&& SelectedCandidateActor->IsHiddenEd() == false
&& !SelectedCandidateActor->IsEditorOnly()
&& SelectedCandidateActor->GetRootComponent() != nullptr
&& !SelectedCandidateActor->GetRootComponent()->IsEditorOnly())
{
UsingCandidateActors.Add(SelectedCandidateActor);
const FBox LocalActorBoundingBox = SelectedCandidateActor->CalculateComponentsBoundingBoxInLocalSpace();
DrawBoxBrackets(LocalActorBoundingBox, SelectedCandidateActor->GetTransform(), FLinearColor::Blue);
}
}
}
else
{
// Find all possible candidates for alignment
// TODO: add the world grid
// TODO: remove anything it might not make sense to align to
const float CompareDistance = VI::AlignCandidateDistance->GetFloat() * MinGuideLength.GetAbsMax();
const FVector Start = DesiredGizmoTransform.GetLocation();
const FVector End = DesiredGizmoTransform.GetLocation();
TArray<FOverlapResult> OutOverlaps;
bool const bHit = GetWorld()->OverlapMultiByChannel(OutOverlaps, Start, FQuat::Identity, ECC_Visibility, FCollisionShape::MakeSphere(CompareDistance));
if (bHit)
{
for (FOverlapResult OverlapResult : OutOverlaps)
{
const AActor* PossibleCandidateActor = OverlapResult.OverlapObjectHandle.FetchActor();
// Don't align to yourself, the entire world, or any actors hidden in the editor
if (PossibleCandidateActor != nullptr
&& !PossibleCandidateActor->IsSelected()
&& PossibleCandidateActor != GetWorld()->GetDefaultBrush()
&& PossibleCandidateActor->IsHiddenEd() == false
&& !PossibleCandidateActor->IsEditorOnly()
&& PossibleCandidateActor->GetRootComponent() != nullptr
&& !PossibleCandidateActor->GetRootComponent()->IsEditorOnly())
{
{
// Check if our candidate actor is close enough (comparison multiplier * maximum dimension of actor)
if (
(DesiredGizmoTransform.GetLocation() - PossibleCandidateActor->GetActorLocation()).GetAbsMin() <= CompareDistance)
{
UsingCandidateActors.Add(PossibleCandidateActor);
}
}
}
}
}
}
for (const AActor* CandidateActor : UsingCandidateActors)
{
// Get the gizmo space snap points for the stationary candidate actor
const FBox LocalActorBox = CandidateActor->CalculateComponentsBoundingBoxInLocalSpace();
const TArray<FVector> LocalCandidateSnapPoints = Local::FindLocalSnapPoints(LocalActorBox);
// Set up the initial guide information for X, Y, and Z guide line
FGuideData InitialGuideHelper;
InitialGuideHelper.AlignedActor = CandidateActor;
InitialGuideHelper.LocalOffset = InitialGuideHelper.SnapPoint = InitialGuideHelper.GuideStart = InitialGuideHelper.GuideEnd = FVector::ZeroVector;
InitialGuideHelper.GuideColor = FLinearColor::Black.ToFColor(/*bSRGB=*/ true);
InitialGuideHelper.DrawAlpha = 1.0f;
InitialGuideHelper.GuideLength = 10000000.0f;
for (const FVector& LocalCandidateSnapPoint : LocalCandidateSnapPoints)
{
FVector WorldCandidateSnapPoint = CandidateActor->ActorToWorld().TransformPosition(LocalCandidateSnapPoint);
FVector DesiredGizmoLocalCandidateSnapPoint = DesiredGizmoTransform.InverseTransformPosition(WorldCandidateSnapPoint);
// Check it against each moving snap point
for (const FVector& DesiredGizmoLocalGizmoSnapPoint : DesiredGizmoLocalGizmoSnapPoints)
{
FVector WorldGizmoSnapPoint = DesiredGizmoTransform.TransformPosition(DesiredGizmoLocalGizmoSnapPoint);
int32 NumberOfMatchingAxes = 0;
FVector DesiredGizmoLocalOffset = FVector::ZeroVector;
for (int32 PointAxis = 0; PointAxis < 3; ++PointAxis)
{
// If we are within the snap distance and can snap along that axis
if (FMath::Abs(DesiredGizmoLocalCandidateSnapPoint[PointAxis] - DesiredGizmoLocalGizmoSnapPoint[PointAxis]) <= AdjustedSnapDistance &&
(!FMath::IsNearlyZero(ConstraintAxes[PointAxis], (FVector::FReal)0.0001) ||
!bShouldConstrainMovement ))
{
NumberOfMatchingAxes++;
DesiredGizmoLocalOffset[PointAxis] = DesiredGizmoLocalCandidateSnapPoint[PointAxis] - DesiredGizmoLocalGizmoSnapPoint[PointAxis];
}
}
if (NumberOfMatchingAxes >= NumberOfMatchesNeeded)
{
FVector DesiredGizmoLocalGuideStart = DesiredGizmoLocalGizmoSnapPoint + DesiredGizmoLocalOffset;
// Transform the goal location into world space
const FVector WorldGuideStart = DesiredGizmoTransform.TransformPosition( DesiredGizmoLocalGuideStart );
InitialGuideHelper.LocalOffset = DesiredGizmoLocalOffset;
InitialGuideHelper.GuideLength = (WorldCandidateSnapPoint - WorldGuideStart).Size();
InitialGuideHelper.GuideStart = WorldGuideStart;
InitialGuideHelper.GuideEnd = WorldCandidateSnapPoint;
InitialGuideHelper.SnapPoint = WorldGizmoSnapPoint;
InitialGuideHelper.GuideColor = FLinearColor::Yellow.ToFColor(/*bSRGB=*/ true);
PotentialGizmoGuides.Add(InitialGuideHelper);
}
}
}
}
// Now find the best guide from all available point combinations
FGuideData AlignedGuide;
bool bFoundAlignedTransform = false;
float AlignedDeltaSize = 10000000.0f;
for (FGuideData PotentialGizmoGuide : PotentialGizmoGuides)
{
const float OffsetSize = PotentialGizmoGuide.LocalOffset.Size();
// Keep finding the guide with the shortest offset size
if (OffsetSize < AlignedDeltaSize && !FMath::IsNearlyZero(OffsetSize))
{
bFoundAlignedTransform = true;
AlignedGuide = PotentialGizmoGuide;
AlignedDeltaSize = OffsetSize;
}
}
FVector LastBestAlignedLocationOffset = FVector::ZeroVector;
if (bFoundAlignedTransform)
{
LastBestAlignedLocationOffset = GizmoStartTransform.InverseTransformPosition(AlignedGuide.GuideStart) - GizmoStartTransform.InverseTransformPosition(AlignedGuide.SnapPoint);
}
return LastBestAlignedLocationOffset;
}
void UViewportWorldInteraction::AddActorToExcludeFromHitTests( AActor* ActorToExcludeFromHitTests )
{
ActorsToExcludeFromHitTest.Add( ActorToExcludeFromHitTests );
// Remove expired entries
for( int32 ActorIndex = 0; ActorIndex < ActorsToExcludeFromHitTest.Num(); ++ActorIndex )
{
if( !ActorsToExcludeFromHitTest[ ActorIndex ].IsValid() )
{
ActorsToExcludeFromHitTest.RemoveAtSwap( ActorIndex-- );
}
}
}
void UViewportWorldInteraction::DrawBoxBrackets(const FBox InActor, const FTransform LocalToWorld, const FLinearColor BracketColor)
{
struct Local
{
static void GetBoundingVectors(const FBox LocalBox, FVector& OutVectorMin, FVector& OutVectorMax)
{
OutVectorMin = FVector(BIG_NUMBER);
OutVectorMax = FVector(-BIG_NUMBER);
// MinVector
OutVectorMin.X = FMath::Min<float>(LocalBox.Min.X, OutVectorMin.X);
OutVectorMin.Y = FMath::Min<float>(LocalBox.Min.Y, OutVectorMin.Y);
OutVectorMin.Z = FMath::Min<float>(LocalBox.Min.Z, OutVectorMin.Z);
// MaxVector
OutVectorMax.X = FMath::Max<float>(LocalBox.Max.X, OutVectorMax.X);
OutVectorMax.Y = FMath::Max<float>(LocalBox.Max.Y, OutVectorMax.Y);
OutVectorMax.Z = FMath::Max<float>(LocalBox.Max.Z, OutVectorMax.Z);
}
};
const FColor GROUP_COLOR = BracketColor.ToFColor(/*bSRGB=*/ true);
FVector MinVector;
FVector MaxVector;
Local::GetBoundingVectors(InActor, MinVector, MaxVector);
// Create a bracket offset to determine the length of our corner axises
const float BracketOffset = FVector::Dist(MinVector, MaxVector) * 0.1f;
// Calculate bracket corners based on min/max vectors
TArray<FVector> BracketCorners;
// Bottom Corners
BracketCorners.Add(FVector(MinVector.X, MinVector.Y, MinVector.Z));
BracketCorners.Add(FVector(MinVector.X, MaxVector.Y, MinVector.Z));
BracketCorners.Add(FVector(MaxVector.X, MaxVector.Y, MinVector.Z));
BracketCorners.Add(FVector(MaxVector.X, MinVector.Y, MinVector.Z));
// Top Corners
BracketCorners.Add(FVector(MinVector.X, MinVector.Y, MaxVector.Z));
BracketCorners.Add(FVector(MinVector.X, MaxVector.Y, MaxVector.Z));
BracketCorners.Add(FVector(MaxVector.X, MaxVector.Y, MaxVector.Z));
BracketCorners.Add(FVector(MaxVector.X, MinVector.Y, MaxVector.Z));
for (int32 BracketCornerIndex = 0; BracketCornerIndex < BracketCorners.Num(); ++BracketCornerIndex)
{
// Direction corner axis should be pointing based on min/max
const FVector CORNER = BracketCorners[BracketCornerIndex];
const int32 DIR_X = CORNER.X == MaxVector.X ? -1 : 1;
const int32 DIR_Y = CORNER.Y == MaxVector.Y ? -1 : 1;
const int32 DIR_Z = CORNER.Z == MaxVector.Z ? -1 : 1;
const FVector LocalBracketX = FVector(CORNER.X + (BracketOffset * DIR_X), CORNER.Y, CORNER.Z);
const FVector LocalBracketY = FVector(CORNER.X, CORNER.Y + (BracketOffset * DIR_Y), CORNER.Z);
const FVector LocalBracketZ = FVector(CORNER.X, CORNER.Y, CORNER.Z + (BracketOffset * DIR_Z));
const FVector WorldCorner = LocalToWorld.TransformPosition(CORNER);
const FVector WorldBracketX = LocalToWorld.TransformPosition(LocalBracketX);
const FVector WorldBracketY = LocalToWorld.TransformPosition(LocalBracketY);
const FVector WorldBracketZ = LocalToWorld.TransformPosition(LocalBracketZ);
DrawDebugLine(GetWorld(), WorldCorner, WorldBracketX, GROUP_COLOR, false, -1.0f, 1.0f, 2.0f);
DrawDebugLine(GetWorld(), WorldCorner, WorldBracketY, GROUP_COLOR, false, -1.0f, 1.0f, 2.0f);
DrawDebugLine(GetWorld(), WorldCorner, WorldBracketZ, GROUP_COLOR, false, -1.0f, 1.0f, 2.0f);
}
}
void UViewportWorldInteraction::CompensateRoomTransformForWorldScale(FTransform& InOutRoomTransform, const float InNewWorldToMetersScale, const FVector& InRoomPivotLocation)
{
const float OldWorldToMetersScale = GetWorld()->GetWorldSettings()->WorldToMeters;
// Because the tracking space size has changed, but our head position within that space relative to the origin
// of the room is the same (before scaling), we need to offset our location within the tracking space to compensate.
// This makes the user feel like their head and hands remain in the same location.
const FVector WorldSpacePivotLocation = InOutRoomTransform.TransformPosition(InRoomPivotLocation);
const FVector NewRoomSpacePivotLocation = (InRoomPivotLocation / OldWorldToMetersScale) * InNewWorldToMetersScale;
const FVector NewWorldSpacePivotLocation = InOutRoomTransform.TransformPosition(NewRoomSpacePivotLocation);
const FVector WorldSpacePivotDelta = (NewWorldSpacePivotLocation - WorldSpacePivotLocation);
const FVector NewWorldSpaceRoomLocation = InOutRoomTransform.GetLocation() - WorldSpacePivotDelta;
InOutRoomTransform.SetLocation(NewWorldSpaceRoomLocation);
}
bool UViewportWorldInteraction::HasTransformableWithVelocityInSimulate() const
{
bool bResult = false;
// Only check if we are in simulate and if the world of this extension is actually the world simulating.
if (GEditor->bIsSimulatingInEditor && GetWorld() == GEditor->PlayWorld)
{
for (const TUniquePtr<FViewportTransformable>& TransformablePtr : Transformables)
{
const FViewportTransformable& Transformable = *TransformablePtr;
if (!Transformable.GetLinearVelocity().IsNearlyZero(1.0f))
{
bResult = true;
break;
}
}
}
return bResult;
}
FEditorModeTools& UViewportWorldInteraction::GetModeTools() const
{
return DefaultOptionalViewportClient == nullptr ? GLevelEditorModeTools() : *DefaultOptionalViewportClient->GetModeTools();
}
FVector UViewportWorldInteraction::SnapLocation(const bool bLocalSpaceSnapping, const FVector& DesiredGizmoLocation, const FTransform &GizmoStartTransform, const FVector SnapGridBase, const bool bShouldConstrainMovement, const FVector AlignAxes)
{
bool bTransformableAlignmentUsed = false;
FVector SnappedGizmoLocation = DesiredGizmoLocation;
const FVector GizmoSpaceDesiredGizmoLocation = GizmoStartTransform.InverseTransformPosition( DesiredGizmoLocation );
if ((VI::ActorSnap->GetInt() == 1) && bLocalSpaceSnapping && ViewportTransformer->CanAlignToActors() == true)
{
FTransform DesiredGizmoTransform = GizmoStartTransform;
DesiredGizmoTransform.SetLocation( DesiredGizmoLocation );
FVector LocationOffset = FindTransformGizmoAlignPoint(GizmoStartTransform, DesiredGizmoTransform, bShouldConstrainMovement, AlignAxes);
if (!LocationOffset.IsZero())
{
bTransformableAlignmentUsed = true;
const FVector GizmoSpaceSnappedGizmoLocation = GizmoSpaceDesiredGizmoLocation + LocationOffset;
SnappedGizmoLocation = GizmoStartTransform.TransformPosition( GizmoSpaceSnappedGizmoLocation );
}
}
if (FSnappingUtils::IsSnapToGridEnabled() && !bTransformableAlignmentUsed)
{
// Snap in local space, if we need to
if (bLocalSpaceSnapping)
{
FVector GizmoSpaceSnappedGizmoLocation = GizmoSpaceDesiredGizmoLocation;
FSnappingUtils::SnapPointToGrid(GizmoSpaceSnappedGizmoLocation, SnapGridBase);
SnappedGizmoLocation = GizmoStartTransform.TransformPosition(GizmoSpaceSnappedGizmoLocation);
}
else
{
FSnappingUtils::SnapPointToGrid(SnappedGizmoLocation, SnapGridBase);
}
}
return SnappedGizmoLocation;
}
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4279600) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4073383 by Patrick.Boutot [AJA] Set base timecode for AJA TimecodeProvider Change 4075631 by Patrick.Boutot Change icon for TimecodeSynchronizer. Update TimecodeSynchronizer with the new AJA delayed open sources. Add TimecodeProvider to TimecodeSynchronizer. Can now sync with TimecodeProvider or a master. Make sure the source are ready before viewing them. Remove PreRoll command. Change 4077328 by JeanMichel.Dignard Fixed SoftObjectPtr/Paths becoming invalid when saving a new world since it's being moved from /Temp/Untitled to its own package. #jira UEENT-1423 Change 4077338 by Rex.Hill USD plugin updated to v8.4 with python support Change 4079063 by Rex.Hill USD sdk recompiled as vs2015 targeting older version of CRT, also dependency added for PythonScriptPlugin Change 4079911 by Rex.Hill USD pyd files recompiled Change 4080058 by Rex.Hill Fix usd plugin loading, added missing libtrace.dll Change 4080376 by Matt.Hoffman Improvements to Sequence Recorder's public API to expose more functionality for third parties. Change 4084984 by Matt.Hoffman Sequence Recorder can now set a global time dilation when recording starts, optionally ignoring the dilation when recording keys. This is useful for recording objects in your scene that move too fast to track with a camera but still ending up with the same length recording in the end. #jira UESP-670 Change 4086688 by Matt.Hoffman Exposes getting and setting keys from sequencer sections via the scripting layer. Examples for how to work with Python and key data can be found in /Plugins/MovieScene/SequencerScripting/Content/Python in the form of "sequencer_examples.py" and "sequencer_key_examples.py". Documentation on how to use these examples is included in the python file. #jira UESP-547 Change 4088904 by Max.Chen Sequence Recorder: Set actor tags as unique Change 4089176 by Max.Chen Sequence Recorder: Add option to record to the target level sequence playback range length. Change 4089180 by Max.Chen Sequence Recorder: Add protection agains null movie scene sections Change 4089205 by Max.Chen Sequence Recorder: Save recorded audio files if auto save is on. #jira UESP-660 Change 4089206 by Max.Chen Sequencer: When importing fbx, if a camera is created, force mapping to be by name matching only so that other nodes in the fbx file do not get mapped onto the newly created camera. #jira UE-59347 Change 4089214 by Max.Chen Sequence Recorder: Add support for looping/rolling takes #jira UESP-658 Change 4089280 by Max.Chen Sequence Recorder: Added support to specify properties from actor classes (camera rig rail - current position on rail) Change 4093824 by Andrew.Rodham Editor: Added option to class pickers to force use of class Display Names Change 4093826 by Andrew.Rodham Removed implicit gamma to linear conversion from EXR writer - This was only implemented for exr data that was supplied as 8 bits per channel (ie. uint8), but there is no way of communicating with the Image Writer API to tell it whether you want it to do that conversion. This code is too low level to be making assumptions about what color-space the data is in. - This ensures that R8G8B8A8 render targets exported as EXR are exported as-is without any modification #jira UESP-545 Change 4093830 by Andrew.Rodham Fixed shutdown crash when destroying a media player that was still playing Change 4093831 by Andrew.Rodham Fixed exception handling in png image wrapper Change 4093833 by Andrew.Rodham Slate: Fixed not being able to set a hyperlink on notifications with unbound attributes that had explicit values set Change 4093841 by Andrew.Rodham Added a utility struct for dealing with editor actor layers from within Blueprints Change 4093867 by Andrew.Rodham Sequencer: Added the ability to implement custom capture protocols for movie scene captures - Converted capture protocol settings and instances to be single UObjects. This unifies the two concepts, and allows for Blueprint implementations. - Removed capture protocol registry since it is no longer required. - Removed FCaptureProtocolID in favor of class discovery at runtime. - Added new module "ImageWriteQueue", responsible for asynchronously managing a queue of image file write operations. - Added new capture protocol for capturing final pixels to EXR (including burn-ins) - Added a new BP function, ExportToDisk, accessible on all UTexture properties for writing texture and render target data to image files - New global BP nodes for querying movie capture status: IsCaptureInProgress, FindCaptureProtocol - Removed Flush On Draw functionality from viewports and frame grabber since it is unnecessary. #jira UESP-545 Change 4094239 by Rex.Hill Export sequence to usd #jira UESP-563 Change 4094393 by Andrew.Rodham Renamed references of 'BufferName' to 'StreamName' for user defined capture protocols Change 4094622 by Patrick.Boutot Add MediaFrameworkUtilitites plugin. Add MediaBundle. An asset that create a MediaPlayer, MediaSource, MediaTexture and MaterialInstance. Add MediaBundleActor. Can auto play a MediaBundle when click & drag in the viewport. Add the Media category in placement mode. Add flag on the MediaPlayer that prevent it from closing when PIE is started or closed. Change 4094673 by Anousack.Kitisa Created widget to display metadata as list view of tags/values. #jira UEENT-1296 Change 4094795 by Simon.Therriault MediaFrameworkUtilities - Adding default media texture for default media bundle material - Changed default material to unlit Change 4094867 by Rex.Hill Usd sequence exporter camera rotation corrected Change 4096426 by JeanLuc.Corenthin - Fixed logic of FLayoutUV::FindCharts to properly extract the list of triangles based on a mesh description. - Fixed logic in FMeshDescriptionOperations::ConverToRawMesh & FMeshDescriptionOperations::ConvertHardEdgesToSmoothGroup to take in account the fact that the arrays are sparse arrays - Fixed logic in FQuadricSimplifierMeshReduction::ReduceMeshDescription which wrongly assumed that number of vertex instances equals three times the number of triangles. - Added early-out in UMeshDescription::ComputePolygonTriangulation when perimeter has 3 vertex indices - Changed version of static mesh and mesh description - Fixed issue with mismatching attribute set when generating LOD meshes #jira UEENT-887, UE-59474, UE-59471 Change 4097101 by Patrick.Boutot Remove warning in PropertyEditorClass when trying to load the "None" class. Change 4097443 by Rex.Hill USD export bake keys Change 4097468 by Patrick.Boutot Edit and initialize the timecode provider of the editor. Change 4097479 by Anousack.Kitisa Added support for commandlet and unattended script modes to Plugin Warden. #jira UE-57333 Change 4097578 by Rex.Hill USD export tweaks Change 4098257 by Simon.Therriault GarbageMatteCaptureComponent - Adding spawned actor tracking to be able to use GarbageMatteActor spawned in editor. Change 4100072 by Jamie.Dale Updated wrapped enums to be more consistent with native Python enums - Wrapped enums now generate values that are instances of the enum type itself, containing a name and value field (like native Python enums). - Wrapped enums are now strongly typed and do not allow implicit conversion from numbers (explicit casting is available, but throws if the value is unknown). - Wrapped enum entries may be compared against numbers (even numbers that don't have valid values) via the == and != operators (like IntEnum in Python). - Wrapped enums may now be iterated (like native Python enums). - Wrapped enums now return a length based on their number of entries (like native Python enums). - ScriptName meta-data can now be used with enum entries. Change 4100255 by Patrick.Boutot [MediaBundle] Modify the base shader to support "failed texture" Change 4103838 by Simon.Therriault MR Garbage Matte Component - Adding FocalDriver interface to be able to poll focal information from outside (cinecamera). Could be updated to be event driven. Change 4115616 by Rex.Hill USD Exporter now exposed to UI Change 4116333 by Simon.Therriault MediaBundle - Updated default media bundle to include lens distortion and chromakeying - Added possibility to spawn material editor for MediaBundle inner material - Fix for inner objects flags preventing asset deletion - Fix for CloseMedia not being called when changing map Lens Distortion - Fix for not being able to generate a Identity lens displacement map Change 4117952 by Rex.Hill Expose OpenEditorForAssets to python Change 4118498 by Rex.Hill Sequencer USD export can now export properties of actors in levels Change 4118515 by Rex.Hill Update sequencer export task comment Change 4118706 by Rex.Hill Sequencer USD updates Change 4118968 by Rex.Hill Sequencer USD export now supports visibility Change 4119702 by Simon.Therriault MediaBundle - Fix crash when changing MediaBundle on Actor multiple times. - Fix crash when Undoing after placing a MediaBundle and pressing Stop then Undo. - Fixed bad reference count in MediaBundle when undo/redo of MediaBundle setting changed on MediaBundleActor - Added PostEditChange after setting MaterialProperty to fix potential propagation. Change 4120060 by Patrick.Boutot Fix typo for TimecodeProviderClassName. Add "Config required restart" Add a button to reapply the CustomTimeStep or TimecodeProvider Change 4122062 by Krzysztof.Narkowicz Fixed movie burnout fixed timestep. Engine didn't use a fixed time step due to a following bug: 1. UAutomatedLevelSequenceCapture::Initialize calls UMovieSceneCapture::Initialize. 2. UMovieSceneCapture::Initialize creates FRealTimeCaptureStrategy and calls CaptureStrategy->OnInitialize(). 3. UAutomatedLevelSequenceCapture::Initialize changes CaptureStrategy to FFixedTimeStepCaptureStrategy, but no one calls CaptureStrategy->OnInitialize(); after that and this function is required to set the fixed time step. 4. Result: movies are burned out with variable time step, causing different inconsistencies between frames, settings and HW configurations. #jira none Change 4122236 by Anousack.Kitisa Made the "Import Into Level..." File menu action follow the EditorImport flag of a SceneImportFactory. #jira UE-57612 #jira UEENT-762 Change 4122588 by Rex.Hill Sequencer Export USD lights now supported Change 4122822 by JeanMichel.Dignard Fix for UV packing FlipX. Don't flip the empty columns at the end since they are always expected to be on the right side. The same was already done for FlipY. #jira UE-56664 Change 4123009 by JeanMichel.Dignard Copied fixes from MeshUtilities LayoutUV to MeshDescription LayoutUV Change 4123517 by JeanLuc.Corenthin Fixed crash when running cooked game crash with asset imported from datasmith #jira UE-60173 Change 4124569 by Patrick.Boutot [AJA] When the CustomTimeStep & TimecodeProvider signal is lost in the editor (not in PIE), try to re-synchronize every second. Change 4126421 by Max.Chen Sequencer: Add the ability to switch the takes of all the selected shots/subsections. #jira UESP-761 Change 4133010 by Simon.Therriault MediaBundle - Made assets in the bundle visible in the content browser (different package per asset) and updated to support duplication correctly - Quick fix for MaterialDynamicInstance garbage matte parameter not going back to default value when cleared. - Added looping option on the bundle Keyer and lens materials - Renamed some parameter groups to Keyer_XX Change 4135728 by Rex.Hill MovieSceneCapture crash fix when iteration on classes defined in python Change 4135732 by Rex.Hill Sequencer scripting: expose get playback range, sub sequence get sequence Change 4135734 by Rex.Hill USD python code refactored Change 4136017 by Matt.Hoffman Fixes FrameNumber nodes tripping an ensure when using them via Blueprints and fixes FrameNumbers & friends not being properly breakable in BP. #jira UE-60188 Change 4147959 by Patrick.Boutot Media Output Architecture. Support 8bits & 10bits color. Capture the buffer as is with the correct pixel format and the corredt target size. Change 4147962 by Patrick.Boutot Remove AjaMediaViewportOutput && AjaMediaViewportOutputImpl. Refactor AjaMediaOutput to extend MediaOutput. Refactor AjaMediaGrameGrabberProtocol to use AjaMediaCapture. Create AjaMediaCapture. Change 4148395 by Rex.Hill USD python code cleanup Change 4152901 by Rex.Hill Fix crash when recompiling blueprint or script class that serializes an object reference manually Change 4152906 by Rex.Hill USD level import/export exposed to UI Change 4152956 by Rex.Hill Rename unreal_usd to usd_unreal to avoid future module name conflicts Change 4153331 by Rex.Hill Simplify USD attribute definitions Change 4155472 by Rex.Hill USD level import now handles cameras and lights Change 4155832 by Patrick.Boutot Fix Packaging for MediaFrameworkUtilities Fix MediaPlayer that crash on close when the engine is closing. Change 4156020 by Mike.Zyracki LIVE LINK Sequencer Recording and Playback #jira UESP-714 #jira UESP-715 Support for Live Link Recording/Playback with Sequencer. Basically if we see a MotionController controlled by a LiveLink Subject or a LiveLink Component on a Actor we create a LiveLinkTrack for it that will record raw sequencer data into. We currently do that at the end of recording but will investigate saving it as we record. For Playback we create a Live Link Subject per recorded track and push up interpolated data per Engine Tick on Evaluate. We need to see if we need to send out raw data but that's complicated due to the fact that sequencer time may not be sequential but random, Moved FLiveLinkTimeFrame to LiveLinkTypes so we can grab raw data. Added functions to LiveLinkClient/Subject to get raw data so we dont' need to do expensive searches. Also changed that code so that we can only save the LiveLinkData when specified. We decided to have the sequencer own saving of the live link data so we explicilty turn on saving when we start to record and then turn if off at the end. Without this it's possible to easily run out of memory while LiveLink records. In order to record LiveLinkComponents under Actors we had to change ActorRecording to record ActorComponents and not jus SceneComponents. Not sure of any drawbacks with this but it seems to work well. Had to make sure we stll keeped attach/parent/child logic when recording. Change 4158488 by Rex.Hill USD scene import/export now uses UsdLux lights Change 4158742 by Rex.Hill USD: Add test for level export and import Change 4161645 by Patrick.Boutot Update MediaRecorder to use the ImageWriteQueue. Add flag in IImageWriteQueue.Enqueue to prevent block if the queue is full. Change 4161651 by Patrick.Boutot Modify MediaCompositing to use an existing MediaPlayer Change 4161657 by Patrick.Boutot Extend the SequenceRecorder to support additional object to record from other plugins. Add SequenceRecorder for MediaPlayer. Will record every frame to disk that the MediaPlayer produce. Change 4162699 by Rex.Hill USD export sequence updates Change 4163138 by Rex.Hill USD sequence export test added Change 4163426 by Mike.Zyracki Fix for Curve Names being kept and AutoSetting Tangents on Live Link Recording Change 4165714 by Patrick.Boutot [MediaCapture] Remove color box that tell the status of the MediaCapture. Add MediaCapture's name and use an image to represent the status. Use a ScrollBox around the "preview" output. Can select any actors. Only show the selectable camera grid when there is more than one camera. Change 4166652 by Rex.Hill Expose SetMobility to scripting Change 4167292 by Mike.Zyracki Make sure we call Finalize Evaluation when closing or deleting the Sequencer. This will make sure TearDown is called on sections which fixes issues with LiveLink Sources not getting deleted and probably also issues with MovieScenePlayers not getting released correctly. Also includes addition to show the SubjectName next to the Sequencer Source in the LiveLinkClient UI. Change 4170578 by Rex.Hill PackageTools exposed to scripting Change 4170619 by Rex.Hill Fix ReversePolygonFacing crash Change 4170621 by Rex.Hill USD mesh import can now be given list of individual meshes Change 4172495 by Matt.Hoffman Fixes some flipped logic in Sequencer Media Track that was preventing it from working as expected. Slightly simplifies the logic on setting up movie data, and ensures that the external movie player has a callback registered so that SeekTo calls will work. Makes it so that you can specify your own sound component with an external media player as a media player can have multiple sound components listening to it. Adds support for flagging the media player to loop to help cue some media sources like EXR to handle loop points better. #jira None Change 4173387 by Jon.Nabozny Bookmark usability and extensibility improvements Change 4173755 by Rex.Hill PackageTools namespace deprecation Change 4181799 by Patrick.Boutot Fix precesion error when importing a camera switcher in sequencer #jira UE-61212 Change 4184435 by Patrick.Boutot Only show the MediaCapture tab spawner in the level editor. Make sure the Material used to draw the render target is GCed. Change 4195803 by Patrick.Boutot Warn user if the AJA CustomTimeStep is used with VSync enabled. Change 4195866 by Patrick.Boutot Remove mention of CharBGR10A2 in AJA. The feature is not yet ready. Change 4196059 by Rex.Hill Fix linux compile due to a .cpp including BookMarkBase.h instead of BookmarkBase.h Change 4196380 by Patrick.Boutot MediaCapture capture the backbuffer when the Viewport don't use an internal texture. #jira UE-61601 Change 4199378 by Patrick.Boutot For MediaFramework, add support for 10bits RGB texture Change 4199380 by Patrick.Boutot [AJA] Add support for 10bits RGB texture in input Fix interlaced format that wasn't using the proper Stride value. Change 4200359 by Jamie.Dale Renamed some "K2_" prefixed functions for Python Change 4203016 by Max.Chen Sequencer: Add movie scene locking/read only. Fixed a few bugs with locked sections - shouldn't be able to create or move keys on locked sections #jira UESP-867 Change 4203018 by Max.Chen Sequencer: Test for movie scene read only before calling modify/transactions. #jira UESP-867 Change 4203622 by Simon.Therriault Bringing Aja MediaOutput MediaMode fix from Release 4.20 Change 4204895 by Rex.Hill Expose several file path functions to scripting Change 4206747 by Rex.Hill USD level import and export updates Change 4206783 by Rex.Hill USD updates Change 4207021 by Rex.Hill USD, fix rotation on level import when there is non-uniform scale Change 4207414 by Rex.Hill USD import static mesh material improvements Change 4209733 by Patrick.Boutot Change the log time to use the current frame Timecode #jira UEENT-1107 Change 4209738 by Patrick.Boutot Option to automatically try to reopen the MediaSource again if an error is detected Change 4210385 by Max.Chen Sequencer: Fix CurrentShot LocalTime computation by using sequence time in playback resolution to compute the local shot time. Also, fixed the burnin asset so that CurrentShotLocalTime is hooked up to ShotFrame instead of MasterTime. This fixes a bug where the burnin's {ShotFrame} is not reporting the local shot frame number. #jira UE-61728 Change 4219824 by Patrick.Boutot Use the correct EditorCondition for property MaxNumAncillaryFrameBuffe Change 4220706 by Louise.Rasmussen Sequencer: Syncronizes Sections using Source Timecode Relative to the first Selected Section #JIRA UESP-826 Change 4220708 by Louise.Rasmussen Sequencer: Adds SourceTimecode option to the Render Movie Settings Burn In #JIRA UESP-826 Change 4226970 by Patrick.Boutot Add a Timecode widget, TimecodeProvider widget and a TimecodeProvider Tab Change 4227333 by Rex.Hill USD Sequencer export now supports deltas Change 4227455 by Matt.Hoffman Adds support to the Audio Mixer Submix to pause and resume a recording. #jira UESEQ-77 Change 4230963 by Patrick.Boutot Make the namespace an import option Change 4234208 by Jon.Nabozny Fixed crash when 5 or more LiveLink sources were connected at the same time Change 4234273 by Jon.Nabozny Add methods in FApp to get the current Timecode FrameRate. Change 4237170 by Simon.Therriault MediaCapture Fix for MediaCapture panel not working in PIE Change 4243758 by Andrew.Rodham It's now possible to resolve pixel data from a render target whose texture resource is still pending creation Change 4244790 by Matt.Hoffman This adds experimental support to Sequencer's Render to Movie for exporting audio via rendering a second pass. This requires the new audio mixer (launch editor with "-audiomixer") and currently supports exporting to .wav. The second pass disables rendering in the Viewport and disables capturing frames during this pass which removes the overhead caused by rendering the scene. Complex scenes still evaluate the sequence which may impact performance in complex situations (such as the Fortnite Launch Trailer). Current Limitations: Requires the new audio mixer ("-audiomixer") The second pass must acheive real time framerates. The audio engine is only built to handle real time situations (due to the high precision needed, gotten via the platform clock) so any drops in engine framerate during the second pass will cause a desync of the audio (as there will be more samples captured than frames of video). The editor has significant overhead which often prevents achieving consistent real-time rates. Using "Capture in New Process" alleviates this issue, even without closing the Editor. Audio has been enabled for both image capture and audio capture passes, which means stuttery audio now plays back during image capture. Attempts to alleviate this issue ended up conflicting with some editor code that forces the audio multiplier to 1.0 each Tick(), so audio has to play on both image and audio passes. Forces background audio (otherwise your output audio wav will be blank!) when app is not in focus, though users should leave the app in focus for best performance. #jira UESEQ-77, UESP-669 Change 4246443 by Simon.Tourangeau Remove Beta flag from nDisplay plugin #jira UEENT-1716 Change 4246480 by Simon.Tourangeau Fix nDisplay plugin icon #jira UEENT-1715 Change 4246571 by Simon.Tourangeau Merging Lauren's VR Editor fixes 4085915 Gamma correction fixes for VR Mode Content Browser icons and camera previews 4087955 Adding a third looping option to the Sequencer Radial Menu. Selecting the Looping option now cycles through No Looping > Loop All > Loop Range 4089914 Adding set start/end range buttons to radial menu 4090502 Fixing sequencer looping not being set correctly 4092824 Cameras are now visible in VR Mode - interim implementation until Game Mode works entirely 4095161 Fix for opening a sequence blocking level editor tab drag and drop 4096999 Making a VR Edit show flags mode that is similar to Game Mode but without the Game flag set to true, does hide billboards. Camera hide/show behavior is now correct. 4097286 Placing cameras now only summons the preview panel once you release 4100941 New spawn location for camera preview window (in front and to the side, on whichever side matches your UI hand) 4102732 Hiding VR editor elements from camera preview 4103378 Added camera burnin text on preview windows as well. 4103466 Fixes for camera text 4103779 Fix for the actor previews not unpinning when entering VR mode. 4105722 Adding support for multiple viewport previews in VR mode, and not creating a new viewport interaction if one already exists when getting it. 4106982 Any dockable window can now be placed in the world. 4107298 Fix for crash when closing multiple camera previews 4107426 Fix for crash when connecting node with no texture set 4136343 UI windows docked "to the world" no longer scale with you and stay the size they are docked at. 4136345 Settings for tweaking VR mode movement 4147473 Fix for controllers not showing up 4147734 Sequencer scrubbing will now pause when removing your thumb from a Vive touchpad 4171489 Added external UI panel support to VREditor module. Created an example camera-adjusting UI 4186392 Second fix for sequencer scrubbing on the radial menu Change 4247984 by Jamie.Dale Fixed potential memory corruption caused by Python glue code generation #jira UE-62397 Change 4255471 by Anousack.Kitisa Added functionalities to add/insert/remove UV channel from a StaticMesh accessible through the StaticMeshEditor and scripting. #jira UEENT-1592 #jira UEENT-1597 #jira UEENT-1660 Change 4256323 by Anousack.Kitisa Added Polygon Selection Mode by smoothing group in the MeshEditor. #jira UEENT-1594 Change 4258012 by Homam.Bahnassi Extending UVEdit material function to support mirroring. #jira UE-57306 Change 4258231 by Jamie.Dale Fixed GetHostName failing to convert UTF-8 data correctly Change 4258579 by Jamie.Dale Ensure that packages re-created after deleting their only asset are marked as fully loaded Change 4258652 by Jamie.Dale Added script exposed method to convert an Unreal relative path to absolute Change 4259124 by Patrick.Boutot For MediaBundle, show or hide the failed texture on console. #jira UE-61672 Change 4259264 by Jamie.Dale Show an error if trying to use ExecutePythonScript without Python enabled #jira UE-62318 Change 4259451 by Jamie.Dale No longer use stale subtitles in dialogue waves #jira UE-61500 Change 4259511 by Jamie.Dale Fix crash when passing None as the class for find/load_asset #jira UE-62130 Change 4259542 by Patrick.Boutot Can select the TimecodeSynchronizer from the Toolbar menu. Add option to show it in the toolbar. Can be defaulted by user/machine. Change 4259582 by Patrick.Boutot Hide Edit & Paste from PropertyMenuAssetPicker Change 4260760 by Max.Chen Sequencer: Fix dereferencing null pointer - CameraNode Change 4260895 by Jamie.Dale Changing localization target settings now updates the gather INI files immediately Change 4262166 by Patrick.Boutot Add support for MediaSourceProxy and MediaOutputProxy. Change 4262535 by Andrew.Rodham Sequencer: Added a method for user-defined capture protocols to resolve a buffer and pass it directly to a bound delegate handler Originating source CL#4261391 Change 4262669 by Patrick.Boutot Add MediaProfile. It let the user select their media sources and media outputs by machine by user. Change 4264577 by Patrick.Boutot Change the type of FMediaFrameworkCaptureCameraViewportCameraOutputInfo.LockedCameraActors to LazyObject to enable cross level reference. #jira UE-62438 Include dependence to settings Change 4265750 by JeanLuc.Corenthin Fix array's size issues with MeshDescription utility functions #jira UEENT-1574 Change 4268181 by Patrick.Boutot Mark LockedCameraActors as deprecated. [CL 4279869 by JeanMichel Dignard in Main branch]
2018-08-13 12:29:41 -04:00
void UViewportWorldInteraction::UseLegacyInteractions()
{
if (DefaultMouseCursorInteractorRefCount == 1)
{
this->ReleaseMouseCursorInteractor();
}
if (DefaultOptionalViewportClient != nullptr)
{
DefaultOptionalViewportClient->ShowWidget(true);
}
for (UViewportInteractor* Interactor : Interactors)
{
Interactor->Shutdown();
Interactor->MarkAsGarbage();
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4279600) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4073383 by Patrick.Boutot [AJA] Set base timecode for AJA TimecodeProvider Change 4075631 by Patrick.Boutot Change icon for TimecodeSynchronizer. Update TimecodeSynchronizer with the new AJA delayed open sources. Add TimecodeProvider to TimecodeSynchronizer. Can now sync with TimecodeProvider or a master. Make sure the source are ready before viewing them. Remove PreRoll command. Change 4077328 by JeanMichel.Dignard Fixed SoftObjectPtr/Paths becoming invalid when saving a new world since it's being moved from /Temp/Untitled to its own package. #jira UEENT-1423 Change 4077338 by Rex.Hill USD plugin updated to v8.4 with python support Change 4079063 by Rex.Hill USD sdk recompiled as vs2015 targeting older version of CRT, also dependency added for PythonScriptPlugin Change 4079911 by Rex.Hill USD pyd files recompiled Change 4080058 by Rex.Hill Fix usd plugin loading, added missing libtrace.dll Change 4080376 by Matt.Hoffman Improvements to Sequence Recorder's public API to expose more functionality for third parties. Change 4084984 by Matt.Hoffman Sequence Recorder can now set a global time dilation when recording starts, optionally ignoring the dilation when recording keys. This is useful for recording objects in your scene that move too fast to track with a camera but still ending up with the same length recording in the end. #jira UESP-670 Change 4086688 by Matt.Hoffman Exposes getting and setting keys from sequencer sections via the scripting layer. Examples for how to work with Python and key data can be found in /Plugins/MovieScene/SequencerScripting/Content/Python in the form of "sequencer_examples.py" and "sequencer_key_examples.py". Documentation on how to use these examples is included in the python file. #jira UESP-547 Change 4088904 by Max.Chen Sequence Recorder: Set actor tags as unique Change 4089176 by Max.Chen Sequence Recorder: Add option to record to the target level sequence playback range length. Change 4089180 by Max.Chen Sequence Recorder: Add protection agains null movie scene sections Change 4089205 by Max.Chen Sequence Recorder: Save recorded audio files if auto save is on. #jira UESP-660 Change 4089206 by Max.Chen Sequencer: When importing fbx, if a camera is created, force mapping to be by name matching only so that other nodes in the fbx file do not get mapped onto the newly created camera. #jira UE-59347 Change 4089214 by Max.Chen Sequence Recorder: Add support for looping/rolling takes #jira UESP-658 Change 4089280 by Max.Chen Sequence Recorder: Added support to specify properties from actor classes (camera rig rail - current position on rail) Change 4093824 by Andrew.Rodham Editor: Added option to class pickers to force use of class Display Names Change 4093826 by Andrew.Rodham Removed implicit gamma to linear conversion from EXR writer - This was only implemented for exr data that was supplied as 8 bits per channel (ie. uint8), but there is no way of communicating with the Image Writer API to tell it whether you want it to do that conversion. This code is too low level to be making assumptions about what color-space the data is in. - This ensures that R8G8B8A8 render targets exported as EXR are exported as-is without any modification #jira UESP-545 Change 4093830 by Andrew.Rodham Fixed shutdown crash when destroying a media player that was still playing Change 4093831 by Andrew.Rodham Fixed exception handling in png image wrapper Change 4093833 by Andrew.Rodham Slate: Fixed not being able to set a hyperlink on notifications with unbound attributes that had explicit values set Change 4093841 by Andrew.Rodham Added a utility struct for dealing with editor actor layers from within Blueprints Change 4093867 by Andrew.Rodham Sequencer: Added the ability to implement custom capture protocols for movie scene captures - Converted capture protocol settings and instances to be single UObjects. This unifies the two concepts, and allows for Blueprint implementations. - Removed capture protocol registry since it is no longer required. - Removed FCaptureProtocolID in favor of class discovery at runtime. - Added new module "ImageWriteQueue", responsible for asynchronously managing a queue of image file write operations. - Added new capture protocol for capturing final pixels to EXR (including burn-ins) - Added a new BP function, ExportToDisk, accessible on all UTexture properties for writing texture and render target data to image files - New global BP nodes for querying movie capture status: IsCaptureInProgress, FindCaptureProtocol - Removed Flush On Draw functionality from viewports and frame grabber since it is unnecessary. #jira UESP-545 Change 4094239 by Rex.Hill Export sequence to usd #jira UESP-563 Change 4094393 by Andrew.Rodham Renamed references of 'BufferName' to 'StreamName' for user defined capture protocols Change 4094622 by Patrick.Boutot Add MediaFrameworkUtilitites plugin. Add MediaBundle. An asset that create a MediaPlayer, MediaSource, MediaTexture and MaterialInstance. Add MediaBundleActor. Can auto play a MediaBundle when click & drag in the viewport. Add the Media category in placement mode. Add flag on the MediaPlayer that prevent it from closing when PIE is started or closed. Change 4094673 by Anousack.Kitisa Created widget to display metadata as list view of tags/values. #jira UEENT-1296 Change 4094795 by Simon.Therriault MediaFrameworkUtilities - Adding default media texture for default media bundle material - Changed default material to unlit Change 4094867 by Rex.Hill Usd sequence exporter camera rotation corrected Change 4096426 by JeanLuc.Corenthin - Fixed logic of FLayoutUV::FindCharts to properly extract the list of triangles based on a mesh description. - Fixed logic in FMeshDescriptionOperations::ConverToRawMesh & FMeshDescriptionOperations::ConvertHardEdgesToSmoothGroup to take in account the fact that the arrays are sparse arrays - Fixed logic in FQuadricSimplifierMeshReduction::ReduceMeshDescription which wrongly assumed that number of vertex instances equals three times the number of triangles. - Added early-out in UMeshDescription::ComputePolygonTriangulation when perimeter has 3 vertex indices - Changed version of static mesh and mesh description - Fixed issue with mismatching attribute set when generating LOD meshes #jira UEENT-887, UE-59474, UE-59471 Change 4097101 by Patrick.Boutot Remove warning in PropertyEditorClass when trying to load the "None" class. Change 4097443 by Rex.Hill USD export bake keys Change 4097468 by Patrick.Boutot Edit and initialize the timecode provider of the editor. Change 4097479 by Anousack.Kitisa Added support for commandlet and unattended script modes to Plugin Warden. #jira UE-57333 Change 4097578 by Rex.Hill USD export tweaks Change 4098257 by Simon.Therriault GarbageMatteCaptureComponent - Adding spawned actor tracking to be able to use GarbageMatteActor spawned in editor. Change 4100072 by Jamie.Dale Updated wrapped enums to be more consistent with native Python enums - Wrapped enums now generate values that are instances of the enum type itself, containing a name and value field (like native Python enums). - Wrapped enums are now strongly typed and do not allow implicit conversion from numbers (explicit casting is available, but throws if the value is unknown). - Wrapped enum entries may be compared against numbers (even numbers that don't have valid values) via the == and != operators (like IntEnum in Python). - Wrapped enums may now be iterated (like native Python enums). - Wrapped enums now return a length based on their number of entries (like native Python enums). - ScriptName meta-data can now be used with enum entries. Change 4100255 by Patrick.Boutot [MediaBundle] Modify the base shader to support "failed texture" Change 4103838 by Simon.Therriault MR Garbage Matte Component - Adding FocalDriver interface to be able to poll focal information from outside (cinecamera). Could be updated to be event driven. Change 4115616 by Rex.Hill USD Exporter now exposed to UI Change 4116333 by Simon.Therriault MediaBundle - Updated default media bundle to include lens distortion and chromakeying - Added possibility to spawn material editor for MediaBundle inner material - Fix for inner objects flags preventing asset deletion - Fix for CloseMedia not being called when changing map Lens Distortion - Fix for not being able to generate a Identity lens displacement map Change 4117952 by Rex.Hill Expose OpenEditorForAssets to python Change 4118498 by Rex.Hill Sequencer USD export can now export properties of actors in levels Change 4118515 by Rex.Hill Update sequencer export task comment Change 4118706 by Rex.Hill Sequencer USD updates Change 4118968 by Rex.Hill Sequencer USD export now supports visibility Change 4119702 by Simon.Therriault MediaBundle - Fix crash when changing MediaBundle on Actor multiple times. - Fix crash when Undoing after placing a MediaBundle and pressing Stop then Undo. - Fixed bad reference count in MediaBundle when undo/redo of MediaBundle setting changed on MediaBundleActor - Added PostEditChange after setting MaterialProperty to fix potential propagation. Change 4120060 by Patrick.Boutot Fix typo for TimecodeProviderClassName. Add "Config required restart" Add a button to reapply the CustomTimeStep or TimecodeProvider Change 4122062 by Krzysztof.Narkowicz Fixed movie burnout fixed timestep. Engine didn't use a fixed time step due to a following bug: 1. UAutomatedLevelSequenceCapture::Initialize calls UMovieSceneCapture::Initialize. 2. UMovieSceneCapture::Initialize creates FRealTimeCaptureStrategy and calls CaptureStrategy->OnInitialize(). 3. UAutomatedLevelSequenceCapture::Initialize changes CaptureStrategy to FFixedTimeStepCaptureStrategy, but no one calls CaptureStrategy->OnInitialize(); after that and this function is required to set the fixed time step. 4. Result: movies are burned out with variable time step, causing different inconsistencies between frames, settings and HW configurations. #jira none Change 4122236 by Anousack.Kitisa Made the "Import Into Level..." File menu action follow the EditorImport flag of a SceneImportFactory. #jira UE-57612 #jira UEENT-762 Change 4122588 by Rex.Hill Sequencer Export USD lights now supported Change 4122822 by JeanMichel.Dignard Fix for UV packing FlipX. Don't flip the empty columns at the end since they are always expected to be on the right side. The same was already done for FlipY. #jira UE-56664 Change 4123009 by JeanMichel.Dignard Copied fixes from MeshUtilities LayoutUV to MeshDescription LayoutUV Change 4123517 by JeanLuc.Corenthin Fixed crash when running cooked game crash with asset imported from datasmith #jira UE-60173 Change 4124569 by Patrick.Boutot [AJA] When the CustomTimeStep & TimecodeProvider signal is lost in the editor (not in PIE), try to re-synchronize every second. Change 4126421 by Max.Chen Sequencer: Add the ability to switch the takes of all the selected shots/subsections. #jira UESP-761 Change 4133010 by Simon.Therriault MediaBundle - Made assets in the bundle visible in the content browser (different package per asset) and updated to support duplication correctly - Quick fix for MaterialDynamicInstance garbage matte parameter not going back to default value when cleared. - Added looping option on the bundle Keyer and lens materials - Renamed some parameter groups to Keyer_XX Change 4135728 by Rex.Hill MovieSceneCapture crash fix when iteration on classes defined in python Change 4135732 by Rex.Hill Sequencer scripting: expose get playback range, sub sequence get sequence Change 4135734 by Rex.Hill USD python code refactored Change 4136017 by Matt.Hoffman Fixes FrameNumber nodes tripping an ensure when using them via Blueprints and fixes FrameNumbers & friends not being properly breakable in BP. #jira UE-60188 Change 4147959 by Patrick.Boutot Media Output Architecture. Support 8bits & 10bits color. Capture the buffer as is with the correct pixel format and the corredt target size. Change 4147962 by Patrick.Boutot Remove AjaMediaViewportOutput && AjaMediaViewportOutputImpl. Refactor AjaMediaOutput to extend MediaOutput. Refactor AjaMediaGrameGrabberProtocol to use AjaMediaCapture. Create AjaMediaCapture. Change 4148395 by Rex.Hill USD python code cleanup Change 4152901 by Rex.Hill Fix crash when recompiling blueprint or script class that serializes an object reference manually Change 4152906 by Rex.Hill USD level import/export exposed to UI Change 4152956 by Rex.Hill Rename unreal_usd to usd_unreal to avoid future module name conflicts Change 4153331 by Rex.Hill Simplify USD attribute definitions Change 4155472 by Rex.Hill USD level import now handles cameras and lights Change 4155832 by Patrick.Boutot Fix Packaging for MediaFrameworkUtilities Fix MediaPlayer that crash on close when the engine is closing. Change 4156020 by Mike.Zyracki LIVE LINK Sequencer Recording and Playback #jira UESP-714 #jira UESP-715 Support for Live Link Recording/Playback with Sequencer. Basically if we see a MotionController controlled by a LiveLink Subject or a LiveLink Component on a Actor we create a LiveLinkTrack for it that will record raw sequencer data into. We currently do that at the end of recording but will investigate saving it as we record. For Playback we create a Live Link Subject per recorded track and push up interpolated data per Engine Tick on Evaluate. We need to see if we need to send out raw data but that's complicated due to the fact that sequencer time may not be sequential but random, Moved FLiveLinkTimeFrame to LiveLinkTypes so we can grab raw data. Added functions to LiveLinkClient/Subject to get raw data so we dont' need to do expensive searches. Also changed that code so that we can only save the LiveLinkData when specified. We decided to have the sequencer own saving of the live link data so we explicilty turn on saving when we start to record and then turn if off at the end. Without this it's possible to easily run out of memory while LiveLink records. In order to record LiveLinkComponents under Actors we had to change ActorRecording to record ActorComponents and not jus SceneComponents. Not sure of any drawbacks with this but it seems to work well. Had to make sure we stll keeped attach/parent/child logic when recording. Change 4158488 by Rex.Hill USD scene import/export now uses UsdLux lights Change 4158742 by Rex.Hill USD: Add test for level export and import Change 4161645 by Patrick.Boutot Update MediaRecorder to use the ImageWriteQueue. Add flag in IImageWriteQueue.Enqueue to prevent block if the queue is full. Change 4161651 by Patrick.Boutot Modify MediaCompositing to use an existing MediaPlayer Change 4161657 by Patrick.Boutot Extend the SequenceRecorder to support additional object to record from other plugins. Add SequenceRecorder for MediaPlayer. Will record every frame to disk that the MediaPlayer produce. Change 4162699 by Rex.Hill USD export sequence updates Change 4163138 by Rex.Hill USD sequence export test added Change 4163426 by Mike.Zyracki Fix for Curve Names being kept and AutoSetting Tangents on Live Link Recording Change 4165714 by Patrick.Boutot [MediaCapture] Remove color box that tell the status of the MediaCapture. Add MediaCapture's name and use an image to represent the status. Use a ScrollBox around the "preview" output. Can select any actors. Only show the selectable camera grid when there is more than one camera. Change 4166652 by Rex.Hill Expose SetMobility to scripting Change 4167292 by Mike.Zyracki Make sure we call Finalize Evaluation when closing or deleting the Sequencer. This will make sure TearDown is called on sections which fixes issues with LiveLink Sources not getting deleted and probably also issues with MovieScenePlayers not getting released correctly. Also includes addition to show the SubjectName next to the Sequencer Source in the LiveLinkClient UI. Change 4170578 by Rex.Hill PackageTools exposed to scripting Change 4170619 by Rex.Hill Fix ReversePolygonFacing crash Change 4170621 by Rex.Hill USD mesh import can now be given list of individual meshes Change 4172495 by Matt.Hoffman Fixes some flipped logic in Sequencer Media Track that was preventing it from working as expected. Slightly simplifies the logic on setting up movie data, and ensures that the external movie player has a callback registered so that SeekTo calls will work. Makes it so that you can specify your own sound component with an external media player as a media player can have multiple sound components listening to it. Adds support for flagging the media player to loop to help cue some media sources like EXR to handle loop points better. #jira None Change 4173387 by Jon.Nabozny Bookmark usability and extensibility improvements Change 4173755 by Rex.Hill PackageTools namespace deprecation Change 4181799 by Patrick.Boutot Fix precesion error when importing a camera switcher in sequencer #jira UE-61212 Change 4184435 by Patrick.Boutot Only show the MediaCapture tab spawner in the level editor. Make sure the Material used to draw the render target is GCed. Change 4195803 by Patrick.Boutot Warn user if the AJA CustomTimeStep is used with VSync enabled. Change 4195866 by Patrick.Boutot Remove mention of CharBGR10A2 in AJA. The feature is not yet ready. Change 4196059 by Rex.Hill Fix linux compile due to a .cpp including BookMarkBase.h instead of BookmarkBase.h Change 4196380 by Patrick.Boutot MediaCapture capture the backbuffer when the Viewport don't use an internal texture. #jira UE-61601 Change 4199378 by Patrick.Boutot For MediaFramework, add support for 10bits RGB texture Change 4199380 by Patrick.Boutot [AJA] Add support for 10bits RGB texture in input Fix interlaced format that wasn't using the proper Stride value. Change 4200359 by Jamie.Dale Renamed some "K2_" prefixed functions for Python Change 4203016 by Max.Chen Sequencer: Add movie scene locking/read only. Fixed a few bugs with locked sections - shouldn't be able to create or move keys on locked sections #jira UESP-867 Change 4203018 by Max.Chen Sequencer: Test for movie scene read only before calling modify/transactions. #jira UESP-867 Change 4203622 by Simon.Therriault Bringing Aja MediaOutput MediaMode fix from Release 4.20 Change 4204895 by Rex.Hill Expose several file path functions to scripting Change 4206747 by Rex.Hill USD level import and export updates Change 4206783 by Rex.Hill USD updates Change 4207021 by Rex.Hill USD, fix rotation on level import when there is non-uniform scale Change 4207414 by Rex.Hill USD import static mesh material improvements Change 4209733 by Patrick.Boutot Change the log time to use the current frame Timecode #jira UEENT-1107 Change 4209738 by Patrick.Boutot Option to automatically try to reopen the MediaSource again if an error is detected Change 4210385 by Max.Chen Sequencer: Fix CurrentShot LocalTime computation by using sequence time in playback resolution to compute the local shot time. Also, fixed the burnin asset so that CurrentShotLocalTime is hooked up to ShotFrame instead of MasterTime. This fixes a bug where the burnin's {ShotFrame} is not reporting the local shot frame number. #jira UE-61728 Change 4219824 by Patrick.Boutot Use the correct EditorCondition for property MaxNumAncillaryFrameBuffe Change 4220706 by Louise.Rasmussen Sequencer: Syncronizes Sections using Source Timecode Relative to the first Selected Section #JIRA UESP-826 Change 4220708 by Louise.Rasmussen Sequencer: Adds SourceTimecode option to the Render Movie Settings Burn In #JIRA UESP-826 Change 4226970 by Patrick.Boutot Add a Timecode widget, TimecodeProvider widget and a TimecodeProvider Tab Change 4227333 by Rex.Hill USD Sequencer export now supports deltas Change 4227455 by Matt.Hoffman Adds support to the Audio Mixer Submix to pause and resume a recording. #jira UESEQ-77 Change 4230963 by Patrick.Boutot Make the namespace an import option Change 4234208 by Jon.Nabozny Fixed crash when 5 or more LiveLink sources were connected at the same time Change 4234273 by Jon.Nabozny Add methods in FApp to get the current Timecode FrameRate. Change 4237170 by Simon.Therriault MediaCapture Fix for MediaCapture panel not working in PIE Change 4243758 by Andrew.Rodham It's now possible to resolve pixel data from a render target whose texture resource is still pending creation Change 4244790 by Matt.Hoffman This adds experimental support to Sequencer's Render to Movie for exporting audio via rendering a second pass. This requires the new audio mixer (launch editor with "-audiomixer") and currently supports exporting to .wav. The second pass disables rendering in the Viewport and disables capturing frames during this pass which removes the overhead caused by rendering the scene. Complex scenes still evaluate the sequence which may impact performance in complex situations (such as the Fortnite Launch Trailer). Current Limitations: Requires the new audio mixer ("-audiomixer") The second pass must acheive real time framerates. The audio engine is only built to handle real time situations (due to the high precision needed, gotten via the platform clock) so any drops in engine framerate during the second pass will cause a desync of the audio (as there will be more samples captured than frames of video). The editor has significant overhead which often prevents achieving consistent real-time rates. Using "Capture in New Process" alleviates this issue, even without closing the Editor. Audio has been enabled for both image capture and audio capture passes, which means stuttery audio now plays back during image capture. Attempts to alleviate this issue ended up conflicting with some editor code that forces the audio multiplier to 1.0 each Tick(), so audio has to play on both image and audio passes. Forces background audio (otherwise your output audio wav will be blank!) when app is not in focus, though users should leave the app in focus for best performance. #jira UESEQ-77, UESP-669 Change 4246443 by Simon.Tourangeau Remove Beta flag from nDisplay plugin #jira UEENT-1716 Change 4246480 by Simon.Tourangeau Fix nDisplay plugin icon #jira UEENT-1715 Change 4246571 by Simon.Tourangeau Merging Lauren's VR Editor fixes 4085915 Gamma correction fixes for VR Mode Content Browser icons and camera previews 4087955 Adding a third looping option to the Sequencer Radial Menu. Selecting the Looping option now cycles through No Looping > Loop All > Loop Range 4089914 Adding set start/end range buttons to radial menu 4090502 Fixing sequencer looping not being set correctly 4092824 Cameras are now visible in VR Mode - interim implementation until Game Mode works entirely 4095161 Fix for opening a sequence blocking level editor tab drag and drop 4096999 Making a VR Edit show flags mode that is similar to Game Mode but without the Game flag set to true, does hide billboards. Camera hide/show behavior is now correct. 4097286 Placing cameras now only summons the preview panel once you release 4100941 New spawn location for camera preview window (in front and to the side, on whichever side matches your UI hand) 4102732 Hiding VR editor elements from camera preview 4103378 Added camera burnin text on preview windows as well. 4103466 Fixes for camera text 4103779 Fix for the actor previews not unpinning when entering VR mode. 4105722 Adding support for multiple viewport previews in VR mode, and not creating a new viewport interaction if one already exists when getting it. 4106982 Any dockable window can now be placed in the world. 4107298 Fix for crash when closing multiple camera previews 4107426 Fix for crash when connecting node with no texture set 4136343 UI windows docked "to the world" no longer scale with you and stay the size they are docked at. 4136345 Settings for tweaking VR mode movement 4147473 Fix for controllers not showing up 4147734 Sequencer scrubbing will now pause when removing your thumb from a Vive touchpad 4171489 Added external UI panel support to VREditor module. Created an example camera-adjusting UI 4186392 Second fix for sequencer scrubbing on the radial menu Change 4247984 by Jamie.Dale Fixed potential memory corruption caused by Python glue code generation #jira UE-62397 Change 4255471 by Anousack.Kitisa Added functionalities to add/insert/remove UV channel from a StaticMesh accessible through the StaticMeshEditor and scripting. #jira UEENT-1592 #jira UEENT-1597 #jira UEENT-1660 Change 4256323 by Anousack.Kitisa Added Polygon Selection Mode by smoothing group in the MeshEditor. #jira UEENT-1594 Change 4258012 by Homam.Bahnassi Extending UVEdit material function to support mirroring. #jira UE-57306 Change 4258231 by Jamie.Dale Fixed GetHostName failing to convert UTF-8 data correctly Change 4258579 by Jamie.Dale Ensure that packages re-created after deleting their only asset are marked as fully loaded Change 4258652 by Jamie.Dale Added script exposed method to convert an Unreal relative path to absolute Change 4259124 by Patrick.Boutot For MediaBundle, show or hide the failed texture on console. #jira UE-61672 Change 4259264 by Jamie.Dale Show an error if trying to use ExecutePythonScript without Python enabled #jira UE-62318 Change 4259451 by Jamie.Dale No longer use stale subtitles in dialogue waves #jira UE-61500 Change 4259511 by Jamie.Dale Fix crash when passing None as the class for find/load_asset #jira UE-62130 Change 4259542 by Patrick.Boutot Can select the TimecodeSynchronizer from the Toolbar menu. Add option to show it in the toolbar. Can be defaulted by user/machine. Change 4259582 by Patrick.Boutot Hide Edit & Paste from PropertyMenuAssetPicker Change 4260760 by Max.Chen Sequencer: Fix dereferencing null pointer - CameraNode Change 4260895 by Jamie.Dale Changing localization target settings now updates the gather INI files immediately Change 4262166 by Patrick.Boutot Add support for MediaSourceProxy and MediaOutputProxy. Change 4262535 by Andrew.Rodham Sequencer: Added a method for user-defined capture protocols to resolve a buffer and pass it directly to a bound delegate handler Originating source CL#4261391 Change 4262669 by Patrick.Boutot Add MediaProfile. It let the user select their media sources and media outputs by machine by user. Change 4264577 by Patrick.Boutot Change the type of FMediaFrameworkCaptureCameraViewportCameraOutputInfo.LockedCameraActors to LazyObject to enable cross level reference. #jira UE-62438 Include dependence to settings Change 4265750 by JeanLuc.Corenthin Fix array's size issues with MeshDescription utility functions #jira UEENT-1574 Change 4268181 by Patrick.Boutot Mark LockedCameraActors as deprecated. [CL 4279869 by JeanMichel Dignard in Main branch]
2018-08-13 12:29:41 -04:00
}
Interactors.Empty();
Transformables.Empty();
Colors.Empty();
OnHoverUpdateEvent.Clear();
OnPreviewInputActionEvent.Clear();
OnInputActionEvent.Clear();
OnKeyInputEvent.Clear();
OnAxisInputEvent.Clear();
OnStopDraggingEvent.Clear();
TransformGizmoActor = nullptr;
SnapGridActor = nullptr;
SnapGridMeshComponent = nullptr;
SnapGridMID = nullptr;
DraggedInteractable = nullptr;
if (ViewportTransformer != nullptr)
{
ViewportTransformer->Shutdown();
ViewportTransformer = nullptr;
}
AssetContainer = nullptr;
GizmoType.Reset();
// Remove the input pre-processor
if (InputProcessor.IsValid())
{
FSlateApplication::Get().UnregisterInputPreProcessor(InputProcessor);
InputProcessor.Reset();
}
USelection::SelectionChangedEvent.RemoveAll(this);
}
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
void UViewportWorldInteraction::UseVWInteractions()
{
// Add colors
InitColors();
// Setup the asset container.
AssetContainer = LoadAssetContainer();
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
if (DefaultMouseCursorInteractorRefCount == 0)
{
this->AddMouseCursorInteractor();
}
if (DefaultOptionalViewportClient != nullptr)
{
DefaultOptionalViewportClient->ShowWidget(false);
}
// Start with the default transformer
SetTransformer(nullptr);
// Spawn the transform gizmo
SpawnTransformGizmoIfNeeded();
const bool bShouldBeVisible = false;
const bool bPropagateToChildren = true;
TransformGizmoActor->GetRootComponent()->SetVisibility(bShouldBeVisible, bPropagateToChildren);
// Create and add the input pre-processor to the slate application.
if (!InputProcessor.IsValid())
{
InputProcessor = MakeShareable(new FViewportInteractionInputProcessor(this));
FSlateApplication::Get().RegisterInputPreProcessor(InputProcessor);
}
// Pretend that actor selection changed, so that our gizmo refreshes right away based on which objects are selected
GEditor->NoteSelectionChange();
GEditor->SelectNone(true, true, false);
CurrentTickNumber = 0;
}
#undef LOCTEXT_NAMESPACE
ViewportInteraction refactoring; miscellaneous VREditor improvements - 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]
2017-01-03 14:38:17 -05:00