Commit Graph

161 Commits

Author SHA1 Message Date
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
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
henrik karlsson
4a5e13525d Fixed non-unity non-pch compile errors
#preflight skipped
#rb none

[CL 22788359 by henrik karlsson in ue5-main branch]
2022-10-26 16:22:34 -04:00
brooke hubert
5ba56cd7d3 Fix a crash in modes and mode manager when iterating over all objects and attempting to get the world.
# Although there aren't references left to the object, iterating over all the things will return the thing. Flagging as garbage seems a lot testier of a change for fixing the 5.1 crash with varied lifettime of the mode and mode manager contexts, so merely tracking it and reporting the correct world here.

#rnx
#Jira UE-168159
#rb lauren.barnes, zach.rammell
#preflight 6356f2ff3d41a4455a628b31
#lockdown jeanmichel.dignard

[CL 22787075 by brooke hubert in ue5-main branch]
2022-10-26 15:31:06 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
nathan mitchell
ce46a1252e UVEditor: Clean up warnings related to type truncation and loss of precision issues.
#rb michael.balzer
#preflight 6331f24ee11ae0b19cd5480d
#jira UE-165106

[CL 22240049 by nathan mitchell in ue5-main branch]
2022-09-28 22:10:00 -04:00
tyson brochu
73f1491463 Move UV Editor 2D viewport behavior targets to EditorInteractiveToolsFramework for reuse in other editors
#jira UE-159937
#rb brooke.hubert
#preflight 6320fb218c478acecf7bec28

[CL 21994152 by tyson brochu in ue5-main branch]
2022-09-13 18:05:19 -04:00
bryan sefcik
cb0456c6d4 Cleaned up build.cs files by removing any include paths that were already being added by UBT. This was done to help identify how include paths are being added and to help with future refactoring.
#jira
#preflight 631a5c04967ffc68fbf0dd8f

[CL 21911226 by bryan sefcik in ue5-main branch]
2022-09-08 21:44:02 -04:00
bryan sefcik
0837230669 Ran IWYU again on half of the Engine/Source/Editor/... source files.
#jira

[CL 21716414 by bryan sefcik in ue5-main branch]
2022-08-30 23:03:03 -04:00
Christina TempelaarL
3497836c74 Gizmo element library: added Arc and CircleBase element. Updated Torus and Circle to derive from CircleBase. Added partial options to CircleBase, including view-dependent partial type for instances of elements that should be drawn non-partial when aligned with viewer. This is needed for the new TRS gizmo rotation axes each of which is a semi-torus which becomes a full torus when aligned with the eye-to-torus direction.
#jira UE-155431
#rb zach.rammell
#preflight 630d5f5c556fc14dce580d08

[CL 21694292 by Christina TempelaarL in ue5-main branch]
2022-08-29 20:57:45 -04:00
Christina TempelaarL
1c565c160b New TRS gizmo: added StateTarget to support undo/redo.
#jira UE-154162
#rb zach.rammell
#preflight 630d2a1e0345de4ccf909e73

[CL 21689433 by Christina TempelaarL in ue5-main branch]
2022-08-29 17:27:23 -04:00
Christina TempelaarL
ee5cb7fa59 New TRS gizmo: added uniform scale interaction and modified scale and planar scale interaction to behave more similarly to current widget.
#jira UE-153005
#rb zach.rammell
#preflight 63091e6a3405456ee57657dc

[CL 21597118 by Christina TempelaarL in ue5-main branch]
2022-08-26 15:49:43 -04:00
bryan sefcik
8cc129f2b6 IWYU Pass 1 - Engine/Source/Editor/...
#jira
#preflight 6306736ac85b7fef22be7751

[CL 21558583 by bryan sefcik in ue5-main branch]
2022-08-24 22:45:13 -04:00
Christina TempelaarL
1020f2a5bb New TRS gizmo: highlight related axes when planar scale or uniform scale are hovered or interacting.
#jira UE-153005
#rb zach.rammell, ronald.koppers
#preflight 63054d830061f895d02da2f3

[CL 21522322 by Christina TempelaarL in ue5-main branch]
2022-08-23 18:09:09 -04:00
Christina TempelaarL
a2fb924c1f Fix new TRS gizmo scale crash when Preserve Non-Uniform scale is enabled.
#jira UE-156537
#rb zach.rammell, ronald.koppers
#preflight 6304290ac744dac967c6c156

[CL 21499834 by Christina TempelaarL in ue5-main branch]
2022-08-22 21:18:04 -04:00
Christina TempelaarL
ea485195e6 Added rotation, screen-space rotation, and screen-space translation interactions in new TRS gizmo.
#jira UE-152998, UE-153003, UE-152992
#rb zach.rammell
#preflight 62d99456bc175ec68c8a4448

[CL 21205025 by Christina TempelaarL in ue5-main branch]
2022-07-21 14:22:29 -04:00
bryan sefcik
98b51354ed Ran IWYU on Public headers under Engine/Source/Editor/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065253 by bryan.sefcik
#jira
#preflight 62d5b3e91062f2e63014598e

#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21152630 via CL 21156388 via CL 21157044
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21181817 by bryan sefcik in ue5-main branch]
2022-07-20 11:56:29 -04:00
Christina TempelaarL
35b43a9df9 Update TransformGizmo ClickDrag handling methods to use function tables, in preparation for adding more interactions.
#jira UE-157945
#rb zach.rammell, ronald.koppers
#preflight 62d089c7dc4397d384216ef3

[CL 21100106 by Christina TempelaarL in ue5-main branch]
2022-07-14 17:42:15 -04:00
Ryan Schmidt
064f95c6ac ToolsFramework: Add UEditorInteractiveToolsContext::OnTick delegate, similar to OnRender and OnDrawHUD, allows code w/ access to the Context to hook into the Context Tick w/o having to override it/etc.
#rb jimmy.andrews
#preflight 62b0e21cde510ae06e705771

[CL 20861922 by Ryan Schmidt in ue5-main branch]
2022-06-28 13:59:43 -04:00
Christina TempelaarL
056e75b475 LineTrace now takes GizmoViewContext rather than using cached render state, which enables invisible hittable objects and will be more robust when there are multiple viewports.
#jira UE_156895
#rb zach.rammell
#preflight 62b61102d82986248b77b1b4

[CL 20815417 by Christina TempelaarL in ue5-main branch]
2022-06-24 15:37:22 -04:00
Christina TempelaarL
d04d272964 Added support for render state overrides and line render state in the gizmo element library.
#jira UE-156712
#rb zach.rammell
#preflight 62ac062ad074a2685c45b17d

[CL 20699472 by Christina TempelaarL in ue5-main branch]
2022-06-17 00:46:15 -04:00
Christina TempelaarL
6933668de3 Add view alignment mode PointScreen to gizmo element base class.
#jira UE-156708
#rb zach.rammell
#preflight 62aa4324db3f89d316292b1d

[CL 20676866 by Christina TempelaarL in ue5-main branch]
2022-06-15 16:55:53 -04:00
Christina TempelaarL
1012fcb1f8 Fixed TRS gizmo scale delta calculation. Added new methods for converting mouse moves to translate/scale deltas.
#jira UE-152984
#rb zach.rammell
#preflight 62a252117e3e869b97d6c587

[CL 20584220 by Christina TempelaarL in ue5-main branch]
2022-06-09 16:18:14 -04:00
Christina TempelaarL
94199718d7 Added pixel hit distance threshold support to gizmo element library.
#jira UE-155188
#rb zach.rammell
#preflight 62a025483f2a47521b69af78

[CL 20551988 by Christina TempelaarL in ue5-main branch]
2022-06-08 00:32:13 -04:00
Christina TempelaarL
1f73117feb Add scale, planar scale and planar translate interaction to the new TRS gizmo.
#jira UE-152984, UE-152990, UE-152989
#rb zach.rammell
#preflight 62991e9bf62914987e95ac6c

[CL 20475697 by Christina TempelaarL in ue5-main branch]
2022-06-02 16:56:13 -04:00