Commit Graph

148 Commits

Author SHA1 Message Date
benoit gadreau
7c004866a5 New TRS Gizmo updates
- arcball rotation: the rotation is computed using a spherical+hyperbolic projection (see code for more explanation)
    - indirect manipulation via MMB: hit parts are stored per mode then are used to drive the proper drag function
    - defered drag function: in order to avoid notifications storm, the drag functions can be applied on tick instead using a pending function
    - a single default TRS gizmo is now created when needed (instead of creating several thru selection changed or when the gizmo manager was ticking) and its visibility is set based on rules

TODO
    - UEditorInteractiveGizmoManager is now closer to UInteractiveGizmoManager so I don't think we need ActiveEditorGizmos, CachedGizmoMap, etc. that are not used anymore. This should be cleaned in another CL
    - UEditorTransformGizmo::OnGizmoTransformBegin should set the current axis (needed for some modes, including IKRig) but this is disabled for now has there are some side effects with dragging (this will be treated in another CL)


#jira UE-152973
#jira UE-161236
#rb brooke.hubert zach.rammell

[CL 27751789 by benoit gadreau in ue5-main branch]
2023-09-11 09:54:48 -04:00
semion piskarev
1cb159c34b Editor: Add ability to check if given mode is the only active mode.
#rb Brooke.Hubert
#preflight 646b81e54422ba05f4f9e1c3

[CL 25566278 by semion piskarev in ue5-main branch]
2023-05-22 12:46:51 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
patrick enfedaque
f72fc9c2ea FEditorModeTools::DeactivateAllModes: Fix Toolkit leak
#rb karen.jirak
#preflight skip
#rnx

[CL 25283315 by patrick enfedaque in ue5-main branch]
2023-05-01 09:47:24 -04:00
karen jirak
4b0cf67ca6 Fixes Mode switching can be inconsistent and editor modes submenu is sometimes not present.
#jira UE-183713
#jira UE-183469
#rb Brooke.Hubert
#preflight 644849fdd07064cbaedb7b55

[CL 25192948 by karen jirak in ue5-main branch]
2023-04-25 20:09:14 -04:00
christopher waters
0d5b23e2e3 Adding includes to prepare for a header dependency cleanup.
#preflight 63b5e0bfff7b9ad7030f0f81

[CL 23581920 by christopher waters in ue5-main branch]
2023-01-04 17:07:40 -05:00
henrik karlsson
fa90b399a4 Added includes for future change. This changelist only contains added #include and a couple of empty placeholder files
Tested compiling fortnite, unrealeditor, lyra, qagame with non-unity/pch

#preflight 63635997876630122adeab9f
#rb none

[CL 22958990 by henrik karlsson in ue5-main branch]
2022-11-03 14:18:47 -04:00
brooke hubert
5ba56cd7d3 Fix a crash in modes and mode manager when iterating over all objects and attempting to get the world.
# Although there aren't references left to the object, iterating over all the things will return the thing. Flagging as garbage seems a lot testier of a change for fixing the 5.1 crash with varied lifettime of the mode and mode manager contexts, so merely tracking it and reporting the correct world here.

#rnx
#Jira UE-168159
#rb lauren.barnes, zach.rammell
#preflight 6356f2ff3d41a4455a628b31
#lockdown jeanmichel.dignard

[CL 22787075 by brooke hubert in ue5-main branch]
2022-10-26 15:31:06 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
dave jones2
c166fadeee UE-160860 - Fix UnrealEd Module truncation warnings
Part 1 of N

#jira UE-160860
#preflight 6331d582b20e73a0983f88cd
#rb andrew.davidson

[CL 22217608 by dave jones2 in ue5-main branch]
2022-09-27 23:50:36 -04:00
patrick enfedaque
cde5081686 Fix SubsystemCollection ownership:
- Refactor FSubsystemCollectionBase so it doesn't subclass FGCObject anymore
- FSubsystemCollection now subclasses FGCObject (to preserve backward compatibility and to be used outside of UObject owners)
- FObjectSubsystemCollection now used by UWorld/UEditorEngine/UEngine/ULocalPlayer/UGameInstance to control lifetime of their Subsystems
- Remove usage of TUniqueObj as FObjectSubsystemCollection no longer inherits FGCObject.

#rb dave.belanger, jeanfrancois.dube
#preflight 62cef611471a2c288622922a

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 21089411 via CL 21089412 via CL 21089415
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21096239 by patrick enfedaque in ue5-main branch]
2022-07-14 15:19:42 -04:00
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -04:00
brooke hubert
c26a6ff719 Fix a crash in the mode manager when some mode's exit sequence accidentally calls enter on itself.
#preflight 625f35673b5b2e3f1a9cc9cb
#Jira UE-145760
#rb lauren.barnes
#lockdown jeanmichel.dignard

#ROBOMERGE-AUTHOR: brooke.hubert
#ROBOMERGE-SOURCE: CL 19843196 in //UE5/Release-5.0/... via CL 19849703
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19853263 by brooke hubert in ue5-main branch]
2022-04-21 14:41:18 -04:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
patrick enfedaque
03bb3a2f2a - Prevent 'Save Current Level As' through editor modes
- Avoid adding newly saved level if RemoveLevelFromWorld fails

#rb richard.malo, brooke.hubert
#preflight 61e1ae58076be0fc4e15ea77

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 18620036 in //UE5/Release-5.0/... via CL 18620344 via CL 18620779
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18621059 by patrick enfedaque in ue5-main branch]
2022-01-14 14:01:23 -05:00
brooke hubert
46a1aedcaf Rename function on mode manager to prevent naming confusion with deactivate/delete.
#Jira none
#rb trivial
#preflight 61e099ab250b9537f781a347

#ROBOMERGE-AUTHOR: brooke.hubert
#ROBOMERGE-SOURCE: CL 18605637 in //UE5/Release-5.0/... via CL 18605667 via CL 18605696
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18605713 by brooke hubert in ue5-main branch]
2022-01-13 16:49:43 -05:00
tyson brochu
e33f9f308e Static Mesh Editor: prompt user to Accept/Cancel current modeling tool (if any) when shutting down SME
#jira UE-137979
#rnx
#preflight 61e06ba3797757aace83aeec

#ROBOMERGE-AUTHOR: tyson.brochu
#ROBOMERGE-SOURCE: CL 18600116 in //UE5/Release-5.0/... via CL 18600130 via CL 18600156
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18600178 by tyson brochu in ue5-main branch]
2022-01-13 13:39:41 -05:00
julien stjean
23596ba9c7 Fixed code that depends on the selection order without a proper normalization of the selection set.
#jira UE-132003
#preflight 61b0d8b1c17a9a154abfe810
#rb Brooke.Hubert

#ROBOMERGE-AUTHOR: julien.stjean
#ROBOMERGE-SOURCE: CL 18431233 in //UE5/Release-5.0/... via CL 18435330
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18435562 by julien stjean in ue5-release-engine-test branch]
2021-12-10 17:48:48 -05:00
patrick enfedaque
77435048b2 EditorMode:
- Guard against legacy mode getting GCed while Deactivating modes
- ForEachMode iterates over array copy in case original array is modified while iterating
- New IsSelectionDisallowed virtual allows mode to refuse selection of actor regardless of other modes

#rb brooke.hubert, lauren.barnes, julien.stjean

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 18311266 in //UE5/Release-5.0/... via CL 18311467
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18311589 by patrick enfedaque in ue5-release-engine-test branch]
2021-11-29 12:07:42 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
christina tempelaarl
8a43e6f448 Fix local rotation bug that occurs on static mesh instances within a hierarchy of transformations (e.g. attached to an actor).
#jira UE-127114
#rb brooke.hubert
#preflight 6148bc06ee16e2000160e7bb

#ROBOMERGE-AUTHOR: christina.tempelaarl
#ROBOMERGE-SOURCE: CL 17585622 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[bot1]: main

[CL 17585629 by christina tempelaarl in ue5-release-engine-test branch]
2021-09-21 14:11:20 -04:00
ryan schmidt
55e4644fd1 Add support for UEdMode-level InteractiveToolsContext which exists at the same time as the existing ModeManager-level ITC.
- rename UEdModeInteractiveToolsContext to UEditorInteractiveToolsContext, made all functions virtual so they can be customized for the new Editor/EdMode implementations where necessary
- add UModeManagerInteractiveToolsContext and UEdModeInteractiveToolsContext subclasses. Most functionality stays in the base class. Mouse-handling functions that manipulate the InputRouter move to ModeManagerITC.
- EdModeITC now is initialized based on a ModeManagerITC, and shares it's InputRouter
- ModeManagerITC creates the child EdModeITCs, forwards Tick/Render/DrawHUD calls
- FEditorModeTools now creates a ModeManagerITC

- Add EToolsContextScope enum, with options for Editor and EdMode ToolsContext
- UEdMode::Enter() now creates a child EdModeITC via new EditorITC::CreateNewChildEdModeToolsContext() function above, in addition to storing reference to the ModeManagerITC. Internal code updated to handle both ITCs.
- The EdModeITC is shut down on ::Exit() and unregistered from the EditorITC parent
- UEdMode ITC access functions (GetToolsContext, GetToolManager, RegisterTool) now take an optional Scope argument
- UEdMode::GetDefaultToolScope() allows EdModes to define default scope for the entire mode, defaults to Editor scope

- removed unused CanStartTool()/etc wrapper functions from FModeToolkit, they were not being called
- FModeToolkit::Init() now listens to events from both the ModeManagerITC and EdModeITC, delete cleans them both up
- FModeToolkit::OnToolStarted() checks both ITCs to see which one owns the new Tool

- updated all EdModes that were directly accessing the UEdMode::ToolsContext member, replaced with calls to GetToolsContext() / GetToolManager() APIs
- updated ModelingToolsEditorMode to use EdMode ToolScope

#rb brooke.hubert
#rnx
#jira none
#preflight 6140cc1130c00d0001dc4b9e

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17510176 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17510201 by ryan schmidt in ue5-release-engine-test branch]
2021-09-14 17:11:13 -04:00
julien stjean
9af8446874 Changed the TypedElementInterface to use UInterfaces instead of an object base api.
#jira UETOOL-4054
#preflight 6132413c1a52e20001dce90d
#rb Jamie.Dale

#ROBOMERGE-SOURCE: CL 17424653 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17424661 by julien stjean in ue5-release-engine-test branch]
2021-09-03 14:18:34 -04:00
lauren barnes
5bd8c74d4e FAssetEditorModeUILayer now serves as a layer between a given asset editor and the mode toolkits, so that the mode toolkits can request UI panels and the asset editor determines where they are located in the asset editor layout. The first implementation is in the level editor, and all default mode UI has been moved to FModeToolkit.
#jira UETOOL-3555
#preflight 61143dbf9c7bb10001f080b3
#rb Matt.Kuhlenschmidt

#ROBOMERGE-SOURCE: CL 17152278 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17152291 by lauren barnes in ue5-release-engine-test branch]
2021-08-12 10:54:54 -04:00
brooke hubert
c785e9cef0 Fix local space gizmos not working with static mesh instance selections.
#Jira none
#preflight 61119c1a0d783d0001c97b46
#rb jamie.dale

#ROBOMERGE-SOURCE: CL 17118074 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17118092 by brooke hubert in ue5-release-engine-test branch]
2021-08-10 12:18:52 -04:00