Commit Graph

41 Commits

Author SHA1 Message Date
Lauren Barnes
d935df8223 Minor update to how the default modes icon is pulled in
#jira UE-112199
#rb Brooke.Hubert
#preflight 609ea4c49ef36f000184ace1

[CL 16332040 by Lauren Barnes in ue5-main branch]
2021-05-14 13:45:42 -04:00
halfdan ingvarsson
6f64873888 Add opt-in support for {Add,Remove}ViewportOverlayWidget to FAssetEditorToolkit derived editors.
Add implementation for it in the skeletal mesh editor.

#jira none
#rb brooke.hubert, louise.rasmussen
#preflight 609ae9244cb9400001cbe879

[CL 16305022 by halfdan ingvarsson in ue5-main branch]
2021-05-12 16:02:22 -04:00
brooke hubert
5df00b6c31 Asset Placement mode and its tools use a context object from ITF to access typed element common actions and the selection set.
#Jira UE-110554
#preflight 6092d76f93d92d00018dcb74
#rb jamie.dale
#fyi christina.tempelaarl

[CL 16211739 by brooke hubert in ue5-main branch]
2021-05-05 15:22:49 -04:00
jamie dale
ef31a91045 Removed finalizer from FTypedElementViewportInteractionCustomization::GetElementsToMove
This was to optimize selecting groups, but we've handled this case elsewhere by just skipping the group logic if the group is already in the list of things that we've processed. This applies that approach to getting the elements to move.

#rb Brooke.Hubert

#ROBOMERGE-SOURCE: CL 15890607 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15890762 by jamie dale in ue5-main branch]
2021-04-01 12:41:54 -04:00
brooke hubert
331cf852b7 Add virtual destructors to IToolkit and IToolkitHost.
#Jira none
#rb jamie.dale

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

[CL 15684094 by brooke hubert in ue5-main branch]
2021-03-11 21:31:26 -04:00
jamie dale
668850b187 Moved TypedElementCommonActions into Engine
This means it can also be used by the InteractiveToolsFramework, and makes sense as the type has Engine dependencies in its API

#rb Brooke.Hubert
#rnx

#ROBOMERGE-SOURCE: CL 15668129 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v779-15635321)

[CL 15668794 by jamie dale in ue5-main branch]
2021-03-10 15:25:20 -04:00
brooke hubert
7499017917 Single place tool places static meshes as ISMs when ISM element handles are enabled.
Also fixed a bug where the ISM component was not rebuilding render data when using the placement subsystem.

#Jira UE-109265
#rb jamie.dale

#ROBOMERGE-SOURCE: CL 15528418 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15528424 by brooke hubert in ue5-main branch]
2021-02-25 10:59:38 -04:00
jamie dale
c922ceb04e Optimized GetElementsToMove for large group actors
Each group actor is now only enumerated once at the end, rather than once for each selected actor within a group

#jira UE-108343
#rb Brooke.Hubert

#ROBOMERGE-SOURCE: CL 15475127 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15475131 by jamie dale in ue5-main branch]
2021-02-19 15:51:43 -04:00
brooke hubert
17f0e31526 Placement Mode Single place tool improvements:
* Tweak after placement in world and local space using standard level editor gizmos.
* Removed Single place tool settings. Since we're using the TRS gizmos, these settings are unnecessary.
* Moved cycle through palette to shift + right click to match other viewport functions (i.e. cycling static mesh previews).
* Placement mode now inherits from default ed mode, so we will get the new gizmos as they come online.
* Fixed a bug in the select tool where the input was never making it back to the viewport for handling.
* Fixed a bug in the ITF Editor hooks where the mouse capture was incorrectly reporting and eating the input from the viewport.

#Jira UE-107395
[at]jamie.dale

#ROBOMERGE-SOURCE: CL 15464701 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15466468 by brooke hubert in ue5-main branch]
2021-02-18 20:47:20 -04:00
brooke hubert
f670759821 Placement Single tool improvements:
* Preview actor to visualize placement.
* Ctrl + click to rotate to another item in the palette and regenerate rotation and scale.
* Configurable normal axis alignment.

Also fixed a crash on exiting the mode due to lingering mode toolkit references in the level editor.

#Jira UE-107395
[at]jamie.dale [at]chris.gagnon

#ROBOMERGE-SOURCE: CL 15449338 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15454762 by brooke hubert in ue5-main branch]
2021-02-18 13:43:48 -04:00
jamie dale
4088d266a9 Added support for deferred typed element destruction
This defers the actual destruction of the element until the end of the frame (or until UTypedElementRegistry::ProcessDeferredElementsToDestroy is called), or until GC runs (unless auto-GC destruction has been disabled).

This avoids firing the assert about dangling references that can be caused by transient typed elements lingering on the stack during an operation that leads to a typed element being destroyed.

#rb Brooke.Hubert, Chris.Gagnon
#rnx

#ROBOMERGE-SOURCE: CL 15371449 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15371457 by jamie dale in ue5-main branch]
2021-02-09 18:25:54 -04:00
louise rasmussen
75b78dbb8e Pathway for Toolkits to add Viewport Overlay Widgets
#JIRA UETOOL-2865
#rb matt.kuhlenschmidt

#ROBOMERGE-SOURCE: CL 15322928 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15322953 by louise rasmussen in ue5-main branch]
2021-02-04 17:51:49 -04:00
Jamie Dale
38a52472be Added support for deleting typed elements from a world
#rb Brooke.Hubert

[CL 15265153 by Jamie Dale in ue5-main branch]
2021-01-31 11:46:45 -04:00
brooke hubert
6eb892af36 Modes can be toggled in the level editor toolbox at runtime.
#Jira UE-107423
#rb lauren.barnes

[CL 15261947 by brooke hubert in ue5-main branch]
2021-01-29 13:59:36 -04:00
Jamie Dale
3e06018cf5 Renamed TypedElementInterfaces to TypedElementRuntime and moved UTypedElementSelectionSet to it
This lets UTypedElementSelectionSet (which has minimal dependencies) to be used by the Engine and InteractiveToolsFramework modules

#rb Brooke.Hubert

[CL 15219316 by Jamie Dale in ue5-main branch]
2021-01-27 14:25:08 -04:00
Jamie Dale
3f3e0e7a67 Updated actor property editing to be typed element based
SActorDetails now operates on a given UTypedElementSelectionSet (removing its dependence on the global selection), and also operates based on the list of selected top-level elements rather than the selected actors.

UTypedElementDetailsInterface provides the interface needed for an element to be used with the details panel, with ITypedElementDetailsObject being the underlying glue object.
The ITypedElementDetailsObject instance will exist as long as the details panel is using it, so gives a lifetime to potentially synthesized UObject instances that are created purely for editing (eg, on instances).

This change removes almost all direct use of UpdateFloatingPropertyWindowsFromActorList, with only a single use-case in the reference viewer remaining.
Most code was already using UpdateFloatingPropertyWindows anyway, which now emits an extra OnElementSelectionChanged event in addition to its previous OnActorSelectionChanged event.
UpdateFloatingPropertyWindowsFromActorList now only emits an OnOverridePropertyEditorSelection event and no longer emits an OnActorSelectionChanged event.
SActorDetails is updated from both OnElementSelectionChanged and OnOverridePropertyEditorSelection, with the OnActorSelectionChanged event remaining for backwards compatability with existing code.

#jira
#rb Chris.Gagnon, Brooke.Hubert

[CL 15037524 by Jamie Dale in ue5-main branch]
2021-01-11 11:14:52 -04:00
Jamie Dale
5160047ddd Added SetSelection helper to UTypedElementSelectionSet
This is equivalent to calling ClearSelection then SelectElements, but happens in a single batch.

#rb Brooke.Hubert

[CL 14891193 by Jamie Dale in ue5-main branch]
2020-12-09 15:57:48 -04:00
brooke hubert
6a2f66594f Non-unity build fix.
#rnx
#Jira UE-104162
#rb trivial

[CL 14871346 by brooke hubert in ue5-main branch]
2020-12-07 13:38:37 -04:00
brooke hubert
94e5cdb545 Initial Placement Factory and Subsystem APIs.
# FActorFactoryAssetProxy uses the placement subsystem first to try to place a new actor.
# Existing UActorFactory implementations added to the subsystem and hooked up to the placement API

#Jira UE-98159
#Jira UE-98161
#review-14836149
#rb chris.gagnon jamie.dale

[CL 14847312 by brooke hubert in ue5-main branch]
2020-12-03 14:49:26 -04:00
Jamie Dale
2eba45e383 Ported viewport drag-duplication to use typed elements
This involved splitting and converting several UUnrealEdEngine functions to no longer operate on or manipulate the current selection set:
 - edactCopySelected:
   - Split into CopyComponents and CopyActors, which take an array of components and actors to copy rather than use the selection state.
   - Breaking: If a DestinationData is provided, it is now used *instead of* the clipboard rather than *as well as* the clipboard.
     - In practice nothing seemed to rely on this old method, and in fact some places stashed and restored the clipboard data to workaround it!
 - edactPasteSelected:
   - Split into PasteComponents and PasteActors, which now returns an array of components or actors that were pasted rather than make them the active selection.
   - Note: PasteActors does still update the selection via FactoryCreateText, but we restore it again afterwards.
 - edactDuplicateSelected:
   - Split into DuplicateComponents and DuplicateActors, which take an array of components or actors to duplicate, and also returns an array of components or actors that were created.

The "edact" versions still use and update the selection state when calling into the internal functions, but the typed element layer does not, and handles duplication via UEngineElementsLibrary::DuplicateElements and UTypedElementWorldInterface, with the level editor viewport handling updating the selection state afterwards.

#rb Brooke.Hubert, Chris.Gagnon

[CL 14838341 by Jamie Dale in ue5-main branch]
2020-12-02 16:08:03 -04:00
Jamie Dale
c54ffb854e Ported the actor snap/align functions to use typed elements internally
The following options from the actor viewport menu are now elemenent based:
 - Snap/Align (excluding layers)
 - Delta Transform
 - Mirror X/Y/Z

#rb Brooke.Hubert

[CL 14830849 by Jamie Dale in ue5-main branch]
2020-12-01 16:57:10 -04:00
Jamie Dale
08b036dc97 Remove redundant include
#rb Brooke.Hubert
#rnx

[CL 14828930 by Jamie Dale in ue5-main branch]
2020-12-01 12:46:54 -04:00
Jamie Dale
ca08dfb897 Removed GLevelEditorModeTools use from typed element interface implementations
#rb Brooke.Hubert
#rnx

[CL 14828542 by Jamie Dale in ue5-main branch]
2020-12-01 12:05:35 -04:00
Jamie Dale
5e11829221 Fixed incorrect interface signature
#rb none
#rnx

[CL 14818390 by Jamie Dale in ue5-main branch]
2020-11-28 14:50:45 -04:00
Jamie Dale
d43516f6bc Fixed valid selection changes failing to transact for undo/redo
#rb none
#rnx

[CL 14817263 by Jamie Dale in ue5-main branch]
2020-11-27 10:36:37 -04:00