Commit Graph

91 Commits

Author SHA1 Message Date
kiaran ritchie
17585f4a38 Minor changes to BaseBrushTool, added ability to disable brush adjustment input, and removed platform specific header.
#rb ryan.schmidt
#JIRA https://jira.it.epicgames.com/browse/UE-183079
#preflight https://horde.devtools.epicgames.com/job/646d2ccd64351d76f349e26a

[CL 25590791 by kiaran ritchie in ue5-main branch]
2023-05-23 17:23:06 -04:00
kiaran ritchie
8b1da6298e Adding ability to adjust brush size and strength while click-dragging with B hotkey pressed.
#rb halfdan.ingvarsson
#JIRA https://jira.it.epicgames.com/browse/UE-183079
#preflight
#preflight 646d10141134ffac703ed612

[CL 25588550 by kiaran ritchie in ue5-main branch]
2023-05-23 15:22:34 -04:00
kiaran ritchie
6e44e257d7 Removed code that should not have made it into last change (25500261) due to shelving incident.
#rb trivial
#JIRA none
#preflight

[CL 25500552 by kiaran ritchie in ue5-main branch]
2023-05-16 19:49:12 -04:00
kiaran ritchie
e6d62a49db Added ability to disable base brush tool. Added toggle to skin paint tool while in selection mode.
#rb halfdan.ingvarsson
#JIRA none
#preflight https://horde.devtools.epicgames.com/job/64640cb84404e3cdd2833e1e

[CL 25500261 by kiaran ritchie in ue5-main branch]
2023-05-16 19:33:41 -04:00
semion piskarev
582964265a MeshModelingTools: Harden tool targets against underlying objects being replaced via blueprints and/or garbage collected.
#rb Lonnie.Li, Jimmy.Andrews
#jira UE-184401
#preflight 64525c58743c256cd692d59e

[CL 25334286 by semion piskarev in ue5-main branch]
2023-05-04 09:51:24 -04:00
ryan schmidt
96d47b526d InteractiveToolsFramework: add UInteractiveToolManager::bInToolShutdown flag, set during DeactivateToolInternal and use in DeactivateTool() to prevent tool shutdown from being called while tool is actively shutting down. This can occur if higher-level Mode calls shutdown on (eg) editor delegates, which might be fired by a shutdown that is actively ocurring.
#rb jimmy.andrews
#preflight 64430297b14f1faacf30fcaf

[CL 25175466 by ryan schmidt in ue5-main branch]
2023-04-24 23:20:54 -04:00
benoit gadreau
c58b1167bf Skeleton Mesh Editing tool: multi selection + transform gizmo
- multiselection: bones can be multi-selected (using shift/ctrl) so that they can be bulk edited
    - bones can be transformed individually (unlike in the level editor where the last selected element's transform is used as pivot)
    - added USkeletalMeshGizmoContextObject to manage gizmo wrappers for skeletal mesh tools
    - gizmo: re-used the transform gizmo work done with several fixes/improvements so that they can be used in other contexts
        - UTransformGizmo can be used without TransformGizmoSource, most of the infos can be retrieved from the IToolsContextQueriesAPI
        - UTransformGizmo can be passed an external StateTarget to handle transaction externally
        - UTransformGizmo fixed rotations going in the wrong direction when dragging

#jira UE-183454
#jira UE-183453
#rb kiaran.ritchie
#preflight 643d63df8e01968448cf53db

[CL 25085825 by benoit gadreau in ue5-main branch]
2023-04-18 10:17:27 -04:00
jimmy andrews
5337719d2e Fix vox offset tool issues:
- Warn about artifacts on meshes with open boundaries
 - Fix some settings not being saved/restored
 - Fix transaction name on undo/redo not matching the tool name

Also: Make the asset warning for base interactive tool only clear the tool's display message if it set a display message when it was last called, so that it is less likely to clear unrelated display messages when called with no warning to display.

#jira UE-180838
#jira UE-180758
#jira UE-180838
#rb rinat.abdrashitov
#preflight 641be32f25389270b7300ae4

[CL 24783364 by jimmy andrews in ue5-main branch]
2023-03-24 14:05:46 -04:00
ryan schmidt
dfefd74ece ToolsFramework: add ray-distance test for rectangle border segments in UGizmoRectangleComponent::LineTraceComponent(), to make hit-testing of combined-gizmo plane-translate and scaling handles more consistent with axis-translate/rotate handles. Previously the cursor could be over the scaling handle line segments w/o a hit being registered.
#rb rinat.abdrashitov
#preflight 641c98d1c44ce895fc50bd55

[CL 24771450 by ryan schmidt in ue5-main branch]
2023-03-23 20:47:41 -04:00
semion piskarev
c777312de7 InteractiveToolsFramework: Fix click drag behaviors passing bogus world ray to their targets when a modifier key is pressed during a drag.
#rb Jimmy.Andrews
#jira UE-175199
#preflight 63e6660326382d011476915f

[CL 24135376 by semion piskarev in ue5-main branch]
2023-02-11 11:39:21 -05:00
nathan mitchell
e3e02771a5 InteractiveToolsFramework: Adjust how the CombinedTransformGizmo handles the scale axis handles in cases where only two axes are requested. The old approach had the handles react to the camera direction at all times, causing issues in the UV Editor and inconsistent orientations of the handles relative to the plane in the case of only two axes. The new approach only is reactive to the camera in cases of one or three axes and locks the handles into a single plane if exactly two axes are configured in the gizmo.
#rb Jimmy.Andrews
#preflight 63e168bd14326f9a408e4888
#jira UE-157771

[CL 24043013 by nathan mitchell in ue5-main branch]
2023-02-06 19:59:58 -05:00
semion piskarev
8fd50edb61 InteractiveToolsFramework: Add a couple ensures to transform proxy begin/end change calls to avoid crashes in misuse.
#rb Jimmy.Andrews
#preflight 63ce9d9a3a03cb0bbff021cc

[CL 23815891 by semion piskarev in ue5-main branch]
2023-01-23 12:48:56 -05:00
semion piskarev
f18d6198cc MeshModelingTools: Add gizmo numerical UI.
- Added FTransformGizmoDataBinder which allows for gizmos to be bound to vectors such that the vectors are updated when the gizmo changes, and the gizmo is updated from vectors when asked. This should make it easy-ish to create displays of gizmos.
- Used the data binder in STransformGizmoNumericalUIOverlay, an overlay containing a draggable numerical UI panel for gizmos. Note that currently all changes, including typing, intentionally go down a gizmo drag path, meaning that they trigger the begin/end transform edit sequence calls, to make the tools treat them as a gizmo drag (in part because some tools might otherwise assume that a gizmo update is from an undo transaction or some other path that is special-cased).
- Added some slate things to ModelingEditorUI to support the numerical UI, in particular a viewport draggable box, and a widget that emits a tick delegate.
- Added some delegates to gizmo context object and combined transform gizmos to allow things to bind/unbind to/from them appropriately.

#rb Ryan.Schmidt
#preflight 63ce97ebf2318350a2f3a6c4

[CL 23815889 by semion piskarev in ue5-main branch]
2023-01-23 12:48:47 -05:00
ryan schmidt
336fd94df8 ToolsFramework: fix issue where toggling a modifier key could result in a mouse capture starting
#preflight 63ca2c805471dab5d5524f4f
#rb none

[CL 23791495 by ryan schmidt in ue5-main branch]
2023-01-20 11:49:29 -05:00
nathan mitchell
2a80a7febe InteractiveToolsFramework: Adds new helper methods to determine count ActorComponents that match TargetRequirements and an additional test predicate for specialized scenarios. Additionally adds a couple of helper methods to test for Volume components and component classes that support UVs. This is to fix the issues surrounding the UV modeling tools that shouldn't be viable for Volume type targets.
#rb Ryan.Schmidt
#preflight 639b914e2540a78d2702f8d8
#jira UE-169112

[CL 23533564 by nathan mitchell in ue5-main branch]
2022-12-15 18:17:12 -05:00
ryan schmidt
aab78a868d ToolsFramework: Support optional Relative translation snapping (in World & Local coordinates) in CombinedTransformGizmo while still optionally supporting Absolute translation snapping in World coordinates. Previously only supported Absolute snapping in World coordinates. Relative is now the default, similar to standard UE gizmo.
- moved most functions defined in ParameterToTransformAdapters.h header into a new cpp to simplify debugging/etc
- UGizmoAxisTranslationParameterSource and UGizmoPlaneTranslationParameterSource now support optional constraints on the translation Delta
- CombinedTransformGizmo now has PositionAxisDeltaSnapFunction that, when in 'relative' mode, snaps the translation Deltas to increments via those constraints
- Added CombinedTransformGizmo::RelativeTranslationSnapping which controls relative vs absolute translation snapping, and can fetch value from ToolsContext
- Also added rotation-angle-delta constraint support UGizmoAxisRotationParameterSource and switched the gizmo to explicitly snap angle-deltas instead of trying to snap to "world rotation grid"
- Moved SnapToIncrement function to UE::Geometry namespace (in VectorUtil.h) and cleaned up a bit of duplicate code in UModelingSceneSnappingManager left over from pre-GeometryCore times

- Added FToolContextSnappingConfiguration::bEnableAbsoluteWorldSnapping, EdModeInteractiveToolsContext:: bEnableAbsoluteWorldSnapping and bits to hook this up
- Added UModelingToolsEditorModeSettings::bEnableAbsoluteWorldSnapping which stores this setting globally, but currently it is not serialized to config file, resets to default (Relative) on Editor restart
- Toolkit exposes toggle in the Selection toolbar menus

#rb none
#preflight 639b4036680483bcb1c33869

[CL 23532642 by ryan schmidt in ue5-main branch]
2022-12-15 17:03:36 -05:00
ryan schmidt
d63161bb02 ToolsFramework: allow InputRouter to update the modifier-key states on active mouse capture when the modifier-keys change but the mouse hasn't moved
#preflight 639746a1c16855964d3e685e
#rb none

[CL 23480137 by ryan schmidt in ue5-main branch]
2022-12-12 13:41:02 -05:00
ryan schmidt
bbd0ec3468 ToolsFramework: Hid various internal tools framework Actors from placement and blueprinting. Added some markup to various InteractiveTool UProperties to prevent them from ever being serialized, for incoming Blueprintable Tools.
remove unnecessary EToolShutdownType predeclaration from BaseToolkit.h, this was added a long time to ago when the type was referenced in this header, but that code was moved w/o removing the predecl
#rb none
#preflight 638e0c36c0652bbec2ea161b

[CL 23394677 by ryan schmidt in ue5-main branch]
2022-12-05 13:19:53 -05:00
ryan schmidt
ceb63e8e4a Modeling Mode: evolution of Mesh Selection system.
UModelingSelectionInteraction now supports concept of a "drag mode" that allows for drawing a marquee, brush-style interaction, etc. Added support for Marquee drawing but actual selection based on the marquee is not implemented yet.
ModelingToolsEditorMode now registers selector factories for Volumes and Static Meshes. Creating selectors for these types is dynamically configurable via new UProperties.
Added mesh-selection-specific UPathSelectionInteraction which provides a simple continuous-select-while-dragging interaction
Added a viewport overlay toolbar for mesh selection, supports changing selection mode, drag mode, selectable object types.
Viewport overlay toolbar also exposes a "quick settings" flyout for changing various modeling mode settings
Added URectangleMarqueeInteraction which is a simplified variant of URectangleMarqueeMechanic that does not require a Tool and doesn't create it's own InputBehavior
USingleClickOrDragInputBehavior now supports changing Drag target
Added a few placeholder icons

#rb none
#preflight 6389351bb36822f1c3540259

[CL 23372864 by ryan schmidt in ue5-main branch]
2022-12-02 10:25:26 -05:00
ryan schmidt
74b3c229b3 ModelingMode: Mesh Element Selection system evolution.
Refactor most of FDynamicMeshSelector into FDynamicMeshSelectorBase, FDynamicMeshSelector is now a subclass.
Move the DynamicMeshTransformer from cpp to FBasicDynamicMeshSelectionTransformer in header.
Add FVolumeSelector and FStaticMeshSelector which are derived from FBaseDynamicMeshSelector.
Add ability to filter selection queries/edits by TopologyID in FGeometrySelectionEditor. This is necesary for polygroup and polygroup-edge selections as their encoding includes an arbitrary TriangleID paired w/ the TopologyID.
UGeometrySelectionManager now manages this TopologyID filtering on selection editors it creates/updates
Add concept of "Tracked" selection changes to UGeometrySelectionManager, allows a single selection FChange to be constructed incrementally, eg like with a brush. Add a variant of raycast-selection-update that can be run inside a tracked change.
#rb none
#preflight 6388f0cf4b2f03a7d761ccef

[CL 23361634 by ryan schmidt in ue5-main branch]
2022-12-01 16:11:52 -05:00
ryan schmidt
4136c5864b resolve PVS warning
#rb none
#preflight none

[CL 23331744 by ryan schmidt in ue5-main branch]
2022-11-30 11:23:13 -05:00
ryan schmidt
d0bf1e1168 ToolsFramework: InteractiveToolManager::PostActiveToolShutdownRequest() can now be called during UInteractiveTool::Setup(), to cancel further initialization of a Tool. This can be used to (for example) abort Tool startup if it is discovered that necessary data/etc is not available. Added the ability to pass a message to PostActiveToolShutdownRequest(), which will be forwarded to a delegate OnToolUnexpectedShutdownMessage if it is bound.
#rb none
#preflight 63853e88170bc34a9376165b

[CL 23312505 by ryan schmidt in ue5-main branch]
2022-11-29 12:35:38 -05:00
bryan sefcik
4b8a83790a Updated to use UE_INLINE_GENERATED_CPP_BY_NAME.
#jira
#preflight 637c388f170bc34a93587526

[CL 23244381 by bryan sefcik in ue5-main branch]
2022-11-22 20:17:33 -05:00
ryan schmidt
a038fc6942 InteractiveToolsContext: add EToolContextTransformGizmoMode enum and IToolsContextQueriesAPI::GetCurrentTransformGizmoMode(), this provides a mechanism for ITF tools/gizmos to query the active Gizmo mode in the parent Editor.
Add UEditorInteractiveToolsContext::SetForceCombinedGizmoMode() and GetForceCombinedGizmoModeEnabled() so that an ITC can have a toggle for whether or not to respect the Editor gizmo mode.
Add implementation of new ::GetCurrentTransformGizmoMode() in FEdModeToolsContextQueriesImpl, that uses this new flag.
Add support in UCombinedTransformGizmo for specifying which sub-gizmo set is visible based on EToolContextTransformGizmoMode member, or alternately querying EToolContextTransformGizmoMode via IToolsContextQueriesAPI.

ModelingMode: add new UModelingToolsEditorModeSettings::bRespectLevelEditorGizmoMode to configure combined-vs-leveleditor gizmo mode behavior of Modeling Mode. Currently applying this setting to ModelingMode ITC in ::Begin(), so mode exit/enter is needed to apply the setting.

#rb none
#preflight 636bf5bf63037c1026d09aed

[CL 23081762 by ryan schmidt in ue5-main branch]
2022-11-10 12:11:14 -05:00
David Hill
b6bd2484ba ITF : ScalableSphereGizmo - removing unused kismet include.
#rb Jimmy.Andrews
#preflight 6349ae0d3c37eed4818495e6

[CL 22532149 by David Hill in ue5-main branch]
2022-10-14 15:26:53 -04:00