Commit Graph

52 Commits

Author SHA1 Message Date
zach rammell
99738c0f68 Refactor persona editor modes/mode manager to use ITF context objects for persona-only interfaces instead of static casting
#rb brooke.hubert Thomas.Sarkanen
#jira UE-143249
#preflight 628549709e72602f6ab62b3b

[CL 20282438 by zach rammell in ue5-main branch]
2022-05-19 12:34:51 -04: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
ryan schmidt
a577850802 EditorFramework: shut down Mode-level ToolsContext before clearing the Toolkit, so that if a Tool is still active, it has a chance to clean up
#rb brooke.hubert
#rnx
#jira UE-127662
#preflight 6152398c7e55410001c7ce77

#ushell-cherrypick of 17646694 by Ryan.Schmidt

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17670385 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17670401 by ryan schmidt in ue5-release-engine-test branch]
2021-09-29 20:12:25 -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
brooke hubert
a75d16b85f Revert UEdMode.cpp changes from revisions 24 and 25. The undo of revision 24 did not put the file back in the same state it was in prior to the rolled back change.
#Jira none
#rb lauren.barnes
#preflight 61252f40ec82960001558be9

#ROBOMERGE-SOURCE: CL 17291300 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17291311 by brooke hubert in ue5-release-engine-test branch]
2021-08-24 15:09:22 -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
mike zyracki
7c7b993a27 Revert UEDMode change, require valid toolkit to register tool.
[FYI] brooke.hubert
#jira na
#rb na

#ROBOMERGE-SOURCE: CL 16598081 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16598094 by mike zyracki in ue5-release-engine-test branch]
2021-06-08 20:23:30 -04:00
mike zyracki
a99a7d4386 Alllow tools with no toolkits to register. This is needed for our motion trail edit mode, which works with conjuction with the control rig edit mode, so that it can still recieve input and handle tracking.
#jira UE-105293
#rb lauren.barnes

#ROBOMERGE-SOURCE: CL 16596393 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16596403 by mike zyracki in ue5-release-engine-test branch]
2021-06-08 19:09:02 -04:00
brooke hubert
718572f53c Fixed an issue with deferred deletion and toggling editor modes that caused the non-integrated toolkit palettes to linger while the mode was getting cleaned up on tick.
#Jira none
#preflight 60646c0d78a2e10001dfe3fe
#rb lauren.barnes louise.rasmussen
#fyi jeanmichel.dignard

[CL 15874563 by brooke hubert in ue5-main branch]
2021-03-31 09:51:38 -04:00
brooke hubert
b7a9e11206 Split legacy viewport input handling from UEdMode.
Move potentially duplicated work (like bracket draws) to the mode manager. Input and drawing of mode specifics should be handled going forward by ITF tools and gizmos in the modes.

#rnx
#preflight 605c1a397f873d0001c5c66a
#Jira UE-103651
#rb lauren.barnes

[CL 15851576 by brooke hubert in ue5-main branch]
2021-03-29 11:32:25 -04:00
semion piskarev
a298e2f288 Made UEdMode disallow tool startup in PIE and SIE by default, and made that behavior subclass-configurable.
#rb Ryan.Schmidt, Brooke.Hubert
#jira UE-109360
#rnx

#ROBOMERGE-SOURCE: CL 15801810 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)

[CL 15808006 by semion piskarev in ue5-main branch]
2021-03-24 16:38:43 -04:00
brooke hubert
d11973e38c Fixing dropped undo transactions and fly mode wonkiness in viewports with the ITF tools contexts.
The tracking transactions were not happening at the right times, so the tools context had special considerations for some viewport interactions, but not all. This was causing some scale, rotate, and translate operations in the viewport to be lost when the tools context would evaluate the right mouse button behavior for fly mode.

This rearranges how the tracking transaction makes it to the tools context from the viewport, and splits the tools context processing of mouse tracking away from the mode manager, so that the ordering of mouse processing can be maintained by the viewport, instead of the tools context having to maintain knowledge of the viewport.

#Jira UE-110273
#rb ryan.schmidt lauren.barnes jamie.dale

#ROBOMERGE-SOURCE: CL 15676489 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v781-15675533)

[CL 15676508 by brooke hubert in ue5-main branch]
2021-03-11 10:50:57 -04:00
brooke hubert
fc8073297d UEdMode uses element selection set and handles to do additional actor processing.
#Jira none
#review-15360110
#rb jamie.dale

[CL 15404000 by brooke hubert in ue5-main branch]
2021-02-14 15:29:11 -04:00
brooke hubert
977b0ca009 Move InteractiveToolsContext calls to mode manager from UEdMode.
#Jira none
#rb lauren.barnes

[CL 15265565 by brooke hubert in ue5-main branch]
2021-01-31 16:26:47 -04:00
semion piskarev
64e8ddd97d MeshModelingTools: Fix tool icon not being unhighlighted on tool accept after CL 14809785. Also removing IsToolBuilderActive function since we plan to not use that anymore.
#rb Brooke.Hubert
#jira none
#rnx

[CL 14891733 by semion piskarev in ue5-main branch]
2020-12-09 16:32:39 -04:00
brooke hubert
1cde48799c Initial Asset Palette, selection, and single place tool functioning in placement mode.
# Removed "reapply settings" since this was a tool that was specific to UFoliageType data blueprint changes being reapplied to already placed foliage.

#Jira UE-98160
#rb chris.gagnon jamie.dale

[CL 14878986 by brooke hubert in ue5-main branch]
2020-12-08 11:27:52 -04:00
brooke hubert
4d0acde989 Exiting a mode will unregister tools before removing the callbacks for tool start/end.
#Jira UE-99633
#rb semion.piskarev lauren.barnes

[CL 14828805 by brooke hubert in ue5-main branch]
2020-12-01 12:32:21 -04:00
brooke hubert
f2fc9763f5 UEdModes are no longer draw helpers, which will prevent double drawing of the grid when the default mode is active in a viewport.
# The level editor viewport client relies on its draw helper instead of individual modes' draw helpers, but mode managers and FEdModes retain their draw helpers for legacy reasons.

#Jira UE-102113
#rb chris.gagnon

[CL 14649186 by brooke hubert in ue5-main branch]
2020-11-03 19:36:13 -04:00
brooke hubert
6c684877b2 Created a default implementation for property widget and legacy gizmos to aid in transition from FEdMode to UEdModes.
Updated default ed mode to UEdMode using the legacy interfaces.

#Jira UE-97665
#rb lauren.barnes

[CL 14628583 by brooke hubert in ue5-main branch]
2020-11-02 11:48:42 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
Zousar Shaker
77d13185b7 Copying //UE5/Dev-Cooker@14539516 to Main (//UE5/Main)
[CL 14539954 by Zousar Shaker in ue5-main branch]
2020-10-21 17:56:05 -04:00
brooke hubert
d4c157384c Initial Creation of Asset Placement Mode UI for tools and commands.
# Added a save and load config on the settings class for UEdMode so mode wide settings would be sticky between runs.
# Removed FString refs in some functions so they could be bound using UObject delegate methods.

#rnx
#Jira UE-98157
#review-14449500
#rb lauren.barnes

[CL 14451570 by brooke hubert in ue5-main branch]
2020-10-08 18:56:55 -04:00
michael daum
6d663c6489 InteractiveToolsFramework: Add render query information to tell if a viewport is hovered and/or focused
#rb ryan.schmidt
#rb tyson.brochu

[CL 14345629 by michael daum in ue5-main branch]
2020-09-18 09:25:18 -04:00
brooke hubert
e85ae49f14 The EditorToolsContext is now owned by the mode manager.
Updated Mesh Paint, geometry, arch gen, hair lab, and sample editor modes to reflect changes to the tools context ownership.

#Jira UE-96448
#rb lauren.barnes michael.daum
#fyi ryan.schmidt simon.barsky jack.greasley
#review-14189762
#review-14189796
#review-14189767
#review-14189774
#review-14189785

[CL 14247116 by brooke hubert in ue5-main branch]
2020-09-02 15:43:58 -04:00
brooke hubert
b9e0b76eb6 Backing out CL 14222239. Property widgets were inadvertently affected by the change.
#rnx
#Jira UE-97665
#fyi chris.gagnon michal.valient

[CL 14227530 by brooke hubert in ue5-main branch]
2020-09-01 10:23:07 -04:00