Commit Graph

42 Commits

Author SHA1 Message Date
brooke hubert
0d7a7d4e5d Placement tools use hit proxies to determine objects inside of brush radius instead of world sweeps.
Static mesh instances are only hooked up editor side via hit proxies, and won't register in a sweep since it only deals with limited types.

#preflight 60ccd086be81e80001e90434
#Jira UETOOL-3724
#rb jamie.dale
#fyi basil.pesin

[CL 16763208 by brooke hubert in ue5-main branch]
2021-06-23 17:43:35 -04:00
Jamie Dale
2c21b4c695 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

[CL 16705229 by Jamie Dale in ue5-main branch]
2021-06-17 11:19:23 -04:00
brooke hubert
ead250879d Updated the placement palette to use SAssetDropTarget, so that it will get UX styling improvements to asset drag/drop hover state.
#preflight 60bf8bc55bc96f0001c3361b
#Jira UETOOL-3674
#b jamie.dale
#fyi lauren.barnes

[CL 16588954 by brooke hubert in ue5-main branch]
2021-06-08 12:59:17 -04:00
aurel cordonnier
e31ae6ee1f Fix CIS no unity errors
#rb trivial

[CL 16390334 by aurel cordonnier in ue5-main branch]
2021-05-19 14:53:17 -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
brooke hubert
e72fe9112d Asset Placement mode - fixed foliage placed static meshes not selecting correctly with brush based selection, and not showing up as a valid selection for enabling tools in the mode.
#Jira none
#preflight 608c48a7fb6d0f0001e379c4
#rb @jamie.dale
#fyi jeanmichel.dignard

[CL 16199775 by brooke hubert in ue5-main branch]
2021-05-04 17:42:39 -04:00
brooke hubert
c914d02a7d Fix a crash in the asset placement mode when changing active modes.
#Jira none
#preflight 606371814293a10001a961c5
#rb lauren.barnes
#fyi jeanmichel.dignard

[CL 15873776 by brooke hubert in ue5-main branch]
2021-03-31 08:32:56 -04:00
louise rasmussen
934b055932 Adds AssetPlacementMode Icon and Updates Style to use Macors
#rb brooke.hubert, matt.kuhlenschmidt
#preflight 606353b8f4abbf00013b9313

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

[CL 15864996 by louise rasmussen in ue5-main branch]
2021-03-30 13:37:06 -04:00
brooke hubert
4c9ee12f3a Mirror content browser selection as palette in placement mode.
#Jira UE-109549
#rb jamie.dale

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

[CL 15658290 by brooke hubert in ue5-main branch]
2021-03-09 15:48:44 -04:00
brooke hubert
c3dd003208 Dragging after placement now allows for scale and rotate.
Added an option to prevent auto selection after placement for more rapid placing.

#Jira UE-109548
#rb jamie.dale

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

[CL 15570975 by brooke hubert in ue5-main branch]
2021-03-02 13:31:36 -04:00
jamie dale
5fe914f2da Added runtime options for controlling typed element features
UE_TYPED_ELEMENT_HAS_REFTRACKING is now compiled in to Debug and Development builds, and is controlled at runtime by the "TypedElements.EnableReferenceTracking" CVar. This can be queried in code via FTypedElementReferences::ReferenceTrackingEnabled.

UE_ENABLE_SMINSTANCE_ELEMENTS has been removed, and is controlled at runtime by the "TypedElements.EnableSMInstanceElements" CVar. This can be queried in code via SMInstanceElementDataUtil::SMInstanceElementsEnabled.

#rb Brooke.Hubert

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

[CL 15541563 by jamie dale in ue5-main branch]
2021-02-26 15:00:15 -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
brooke hubert
7b14b3dcf5 Placement mode - replace palette using shift + drag&drop of assets from CB.
Also hooked up a clear all items from palette command, and removed some stale combo box functions.

#Jira UE-107394
#rb jamie.dale

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

[CL 15504138 by brooke hubert in ue5-main branch]
2021-02-23 15:27:02 -04:00
brooke hubert
3c55f7dd93 Hooked up remaining placement tool settings (world offset, local offset, negative scaling, negative rotation).
Disabled ISM placement in single place tool, since single selection of ISM is not hooked up yet.

#Jira UE-107395
#rb jamie.dale

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

[CL 15493396 by brooke hubert in ue5-main branch]
2021-02-22 16:14:49 -04:00
brooke hubert
4ca0cef3a4 Fix non-unity compile error
#rnx
#Jira UE-109087
#rb trivial

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

[CL 15490888 by brooke hubert in ue5-main branch]
2021-02-22 12:54:24 -04:00
brooke hubert
9b0d46bced Non-unity compile fix.
#rnx
#Jira UE-109097
#rb trivial

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

[CL 15490873 by brooke hubert in ue5-main branch]
2021-02-22 12:53:35 -04:00
brooke hubert
93c0740f20 Turn off undo/redo tracking for switching between tools in placement mode.
This was causing a crash when undoing due to the selection set being cleared on tool enter, and it felt bad to be in a different tool than I last selected after undoing.

#Jira none
#rb jamie.dale

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

[CL 15476259 by brooke hubert in ue5-main branch]
2021-02-19 16:52:56 -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
brooke hubert
6eaec5234e Move shared settings object to mode subsystem.
Add additional single placement settings.

#Jira UE-107395
#rb [at]jamie.dale

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

[CL 15454206 by brooke hubert in ue5-main branch]
2021-02-18 13:11:17 -04:00
brooke hubert
0038308029 UX pass on placement mode and initial pass on new placement settings. Removal of concept of "selection" with new palette UX.
#Jira UE-107395
#rb lauren.barnes jamie.dale

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

[CL 15399799 by brooke hubert in ue5-main branch]
2021-02-12 18:31:09 -04:00
benn gallagher
8eb387d3d5 - ProceduralFoliageVolume: Crash Fix related to indexing in new AISMPartitionActor
- Fix Painting Crash with AverageNormal option
- Avoid Copy of BodyInstance properties on registered components

#rb jeanfrancois.dube

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

[CL 15383261 by benn gallagher in ue5-main branch]
2021-02-10 19:51:36 -04:00
brooke hubert
3cbecdf380 Disable Fill tool in placement mode.
# The implementation of this is backlogged due to bookkeeping information for arbitrary (non-foliage) types.
#Jira UE-107090
#rb jamie.dale

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

[CL 15370082 by brooke hubert in ue5-main branch]
2021-02-09 16:25:38 -04:00
brooke hubert
8ffd9728b7 Fix a crash when swapping to list view for palette, and reposition the palette to the bottom of the mode toolbox.
#Jira none
#rb lauren.barnes

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

[CL 15369082 by brooke hubert in ue5-main branch]
2021-02-09 15:11:24 -04:00
patrick enfedaque
ab4b109157 Procedural Foliage: Average Normal + Fix non deterministic ZOffset
#rb richard.malo
[FYI] jakob.keudel

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

[CL 15368904 by patrick enfedaque in ue5-main branch]
2021-02-09 15:02:08 -04:00