Commit Graph

67 Commits

Author SHA1 Message Date
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
5b46ca629b Fix a crash when changing layout or viewport type in Level editor viewports and running various exec commands that used typed element common actions.
#preflight 625f1a14fd255ad9e2ee4664
#Jira UE-149401
#rb lauren.barnes
#lockdown jeanmichel.dignard, cristina.riveron

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

[CL 19855245 by brooke hubert in ue5-main branch]
2022-04-21 16:28:19 -04:00
daren cheng
99592a0721 Widget Tool Palette Prototype.
Add Marquee & create widget tools.
Add framework for widget-based tools.

#preflight 62202c37123d7a7f69141278
#jira UETOOL-4564 UETOOL-4565
#rb Vincent.Gauthier

[CL 19248542 by daren cheng in ue5-main branch]
2022-03-03 14:01:42 -05:00
brooke hubert
e6db027123 Fix issue where the supplied actor factory was not making it through to the actor spawn in placement subsystem
#preflight 61e79b383778a195ded1f463
#Jira UE-139202
#rb julien.stjean

#ROBOMERGE-AUTHOR: brooke.hubert
#ROBOMERGE-SOURCE: CL 18661572 in //UE5/Release-5.0/... via CL 18661601 via CL 18661627
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18661657 by brooke hubert in ue5-main branch]
2022-01-19 13:50:04 -05:00
halfdan ingvarsson
b4171fa9e9 Fixes for non-unity builds.
#jira none
#preflight 61e78729f35b35a70f17ffcd

#ROBOMERGE-AUTHOR: halfdan.ingvarsson
#ROBOMERGE-SOURCE: CL 18654726 in //UE5/Release-5.0/... via CL 18654735 via CL 18654738
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18654744 by halfdan ingvarsson in ue5-main branch]
2022-01-18 22:56:16 -05:00
brooke hubert
40ee769f95 Properly hook up instance client manager in placement mode.
This fixes duplication crash.

#preflight 61ddb7fd0134bb26f3bdd989
#Jira UE-131054
#rb julien.stjean

#ROBOMERGE-AUTHOR: brooke.hubert
#ROBOMERGE-SOURCE: CL 18589986 in //UE5/Release-5.0/... via CL 18589994 via CL 18589996
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18590008 by brooke hubert in ue5-main branch]
2022-01-12 16:49:49 -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
julien stjean
6f120bb052 Fixing the SMInstanceElements rotating differently to an offseted pivot then a normal actor or component.
The issue was that weren't using the same pivot  and the same quaternion math for the rotation.

#jira UE-130496
#brooke.hubert
#preflight 61a83b83ad6629a51eac6537

#ROBOMERGE-AUTHOR: julien.stjean
#ROBOMERGE-SOURCE: CL 18349318 in //UE5/Release-5.0/... via CL 18349329
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18350076 by julien stjean in ue5-release-engine-test branch]
2021-12-02 02:13:23 -05:00
lauren barnes
8ffecdf82c Adding a delegate for mode toolkits to do any UI shutdown that depends on the mode UI layer. Small fix to completely unregister known tabs in the mode UI layer.
#jira none
[FYI] Mike.Zyracki

#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 18328063 in //UE5/Release-5.0/... via CL 18328072
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18328083 by lauren barnes in ue5-release-engine-test branch]
2021-11-30 13:46:09 -05:00
mark lintott
9fab055f48 Non-Unity build fixes
#rb none
#jira none
#preflight 61a630a713434551d78661f5

#ROBOMERGE-AUTHOR: mark.lintott
#ROBOMERGE-SOURCE: CL 18324460 in //UE5/Release-5.0/... via CL 18324468
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18324492 by mark lintott in ue5-release-engine-test branch]
2021-11-30 09:46:34 -05:00
semion piskarev
5268d458d2 Add ability to get status bar name from IToolkitHost interface. The mode UI layer classes now get their status bar name from their toolkit host.
#rb Lauren.Barnes, Rinat.Abdrashitov
#rnx
#jira none
#preflight 619c085f974d7d572675945b

#ROBOMERGE-AUTHOR: semion.piskarev
#ROBOMERGE-SOURCE: CL 18263637 in //UE5/Release-5.0/... via CL 18263645
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18263652 by semion piskarev in ue5-release-engine-test branch]
2021-11-22 16:50:41 -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
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
brooke hubert
82a6a0003f Add ability for placement palette items to have a custom settings object from the placement factory, and add a details panel to the mode for editing the settings object.
#preflight 613264d517a8610001fa6050
#Jira UETOOL-3790
#rb julien.stjean

#ROBOMERGE-AUTHOR: brooke.hubert
#ROBOMERGE-SOURCE: CL 17472632 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17472652 by brooke hubert in ue5-release-engine-test branch]
2021-09-09 11:16:10 -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
brooke hubert
a60ba51741 Mode UI layer will set the icon if one is provided to the minor tab info, or fallback on the default for the workspace category if one was not provided.
#preflight 612e3f1fb6b29c0001ebc06c
#Jira none
#rb lauren.barnes

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

[CL 17369756 by brooke hubert in ue5-release-engine-test branch]
2021-08-31 12:11:44 -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
aa2de405e8 Editor static mesh factory uses placement partition actor instead of foliage partition actor.
#Jira UETOOL-3787
#preflight 6113d6650d783d00011b6ce9
#rb jamie.dale jeanfrancois.dube

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

[CL 17152023 by brooke hubert in ue5-release-engine-test branch]
2021-08-12 10:30:30 -04:00
zach rammell
1c5e438e41 Extend viewport focusing to work with typed elements
#jira UETOOL-3744
#rb [at]brooke.hubert
#preflight 61144bdcb2dc4b00015438c5

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

[CL 17145336 by zach rammell in ue5-release-engine-test branch]
2021-08-11 21:16:26 -04:00
jamie dale
6e412af28b Fixed incorrect comment
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 17059694 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v850-17047176)

[CL 17059716 by jamie dale in ue5-release-engine-test branch]
2021-08-04 17:02:08 -04:00
jamie dale
afa943050c Converted UTypedElementList to no longer be a UObject
Storing typed elements in UObjects can easily lead to reference leaks if the elements aren't cleared prior to the UObject being left pending GC. This actually made UTypedElementList tricky to use, as you had to remember to manually empty it when you'd finished with it to avoid reference leaks, and we've had several cases now where that was done incorrectly.

To address this issue, we've moved element lists back to being a normal C++ class, FTypedElementList. However, unlike the original version of FTypedElementList (which was itself a UStruct), this version is always heap-allocated and referenced via a TSharedPtr/TSharedRef.

This gives us a nice middle-ground of a well defined lifetime (ie, no lingering references prior to GC) while still being efficient to pass around, including for scripting APIs via FTypedElementListProxy (which just wraps the TSharedPtr in a UStruct).

The downside of this approach is that we need to wrap the FTypedElementList functions that we want to expose to the scripting API (see UTypedElementListLibrary), however that is a far more reasonable burden than requring every user of the typed element framework to know and understand that UTypedElementList had to be manually cleared to avoid potentially hard to find reference leaks (especially if via leaked via scripting APIs).

The core of this change is to TypedElementList.h/.cpp, with TypedElementListFwd.h existing to forward declare the pointer types, and TypedElementListProxy.h and TypedElementListLibrary.h existing to declare the proxy type and wrapped functions used for scripting APIs. TypedElementSelectionInterface.h (and its implementations) provide an example of using FTypedElementListProxy within a scripting API, and the rest of the change is mostly just fallout to transform const UTypedElementList* to FTypedElementListConstRef and UTypedElementList* to FTypedElementListRef.

#rb Brooke.Hubert
#preflight 60d2720c634cd100016c804b

#ROBOMERGE-SOURCE: CL 16776547 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16776582 by jamie dale in ue5-release-engine-test branch]
2021-06-24 14:31:49 -04:00
jamie dale
a2c2b50c07 Provided an interface to query element parent<->child hierarchy information and used it to unify selection normalization
Previously we relied on element implementations to know what their parent or child elements might be, and to deal with them correctly in the following cases:
 1) When "normalising" a selection to be safe for operations like a move or delete, eg) removing elements that are children of other selected elements.
 2) When deleting an element, also ensuring that any implicitly destroyed child elements were deselected, eg) deleting an ISM component that has selected static mesh instances.

This approach hurts the modularity of the elements themselves, as it requires that the element implementations have intrinsic knowledge of any other child (or parent) element types that may exist, and to deal with them accordingly when needed. As a concrete example, an ISM component may have child elements in the form of static mesh instance elements, however the generic component element type does not (and should not) directly know that static mesh instance elements exist.

To address this issue, we've added a new interface, UTypedElementHierarchyInterface, which can be used to provide information about the logical parent<->child hierarchy information of elements. This is implemented as follows for our current element types:
 - Actor:
   - GetParentElement returns an invalid element handle.
   - GetChildElements returns the element handles of any components on the actor.
 - Component:
   - GetParentElement returns its owner actor element handle.
   - GetChildElements returns nothing by default, but UActorComponent::GetComponentChildElements may be overridden to control this behavior.
     - eg) UInstancedStaticMeshComponent overrides it to return its static mesh instance element handles.
 - SMInstance:
   - GetParentElement returns its owner ISM component element handle.
   - GetChildElements returns nothing.

Now the problems listed above can be solved by using this interface instead of relying on the element implementations:
 1) Selection normalization is now handled by UTypedElementSelectionSet, replacing the previous duplicate implementations of UTypedElementCommonActions and UTypedElementViewportInteraction.
 2) UTypedElementSelectionSet will now walk and also update the selection state of child elements, when asked to via the FTypedElementSelectionOptions.

Breaking Changes:
 - UTypedElementCommonActions::GetElementsForAction and UTypedElementViewportInteraction::GetSelectedElementsToMove have been removed, in favor of using the selection normalization functions of UTypedElementSelectionSet.
   - Note: You may still favor using FLevelEditorViewportClient::GetElementsToManipulate, as it will have removed normalized elements that also cannot be moved by a gizmo.
 - UTypedElementCommonActions::DeleteElements and UTypedElementCommonActions::DuplicateElements have been removed, as these functions operated on an unnormalized selection and could be unsafe. UTypedElementCommonActions::DeleteNormalizedElements and UTypedElementCommonActions::DuplicateNormalizedElements should be used instead.
 - AGroupActor::ForEachActorInGroup and AGroupActor::ForEachMovableActorInGroup now take a second AGroupActor* argument in their callback.

#rb Brooke.Hubert
#preflight 60ca33a678c3b00001e8f5df

#ROBOMERGE-SOURCE: CL 16705229 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16705233 by jamie dale in ue5-release-engine-test branch]
2021-06-17 11:19:53 -04:00
Jamie Dale
2b4fd7e927 Ensure GizmoManipulationStarted and GizmoManipulationStopped are called in pairs
The editor viewport would previously skip the GizmoManipulationStopped call if nothing had actually moved, but this causes an imbalance in the APIs which call NotifyMovementStarted and NotifyMovementEnded.

GizmoManipulationStopped is now always called, but with an extra argument saying if anything actually moved.

#rb Brooke.Hubert
#preflight 60aeb2de1db8a70001cbe077

[CL 16537833 by Jamie Dale in ue5-main branch]
2021-06-02 15:11:28 -04:00
lauren barnes
5a9fc981d2 Minor update to how the default modes icon is pulled in
#jira UE-112199
#rb Brooke.Hubert
#preflight 609ea4c49ef36f000184ace1

#ROBOMERGE-SOURCE: CL 16332040 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16332136 by lauren barnes in ue5-release-engine-test branch]
2021-05-14 13:52:57 -04:00