Commit Graph

169 Commits

Author SHA1 Message Date
kirill zorin
b6ee3a6c64 Fix UE_LOG callsites that have format string-related UB
#rb trivial
#preflight 647107780a6634dbb236a0a6

[CL 25651638 by kirill zorin in ue5-main branch]
2023-05-26 15:52:39 -04:00
bryan sefcik
91c57d395e Removed redundant module includes.
#preflight 645d4bf3aa3c584c0b5b3a67

[CL 25435653 by bryan sefcik in ue5-main branch]
2023-05-11 16:48:21 -04:00
tyson brochu
9ffb5269c8 Editor2DMouseWheelZoomBehaviorTarget: make the clip plane math work out if the camera has negative z coordinates
ViewportClient's NearPlane value is assumed to be positive, which makes things janky if your camera has negative z value. This change uses the camera's absolute Z coordinate for computing the temporary clip planes, and also testing if the XY-plane is on the wrong size of our near clipping plane.

#rb semion.piskarev
#preflight 645be1df2f4eab186357ab22

[CL 25412342 by tyson brochu in ue5-main branch]
2023-05-10 14:44:34 -04:00
semion piskarev
dc8417a084 MeshModelingTools: Fix crashes when entering/exiting level instance editing, or when removing sublevels with modeling mode running.
#rb Jimmy.Andrews
#jira UE-184809, UE-184805
#preflight 64551957386cf3c273354c8f

[CL 25381253 by semion piskarev in ue5-main branch]
2023-05-08 19:54:43 -04:00
benoit gadreau
c02f71b6d9 Skeletal Mesh Gizmo customization
- added support for material and size customization

#jira UE-183453
#rb kiaran.ritchie
#preflight 6442a83b0171aae0b1b48571

[CL 25177125 by benoit gadreau in ue5-main branch]
2023-04-25 04:34:35 -04:00
kirill zorin
a469aafd78 Update callsites to prepare for upcoming TArray/TArrayView<TObjectPtr<...>> restrictions
#rb zousar.shaker
#rb devin.doucette
#rb steve.robb
#rb robert.manuszewski
#rb saam.barati
#preflight 643f4c09a35280ed4f53ccb3

[CL 25100071 by kirill zorin in ue5-main branch]
2023-04-18 22:39:29 -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
kiaran ritchie
9a2ee3ac4e Fixes issue where tools do not initialize until viewport gains focus.
#rb ryan.schmidt
#JIRA https://jira.it.epicgames.com/browse/UE-179268
#preflight https://horde.devtools.epicgames.com/job/642df5654d26bcd1eb35e31d
#fyi halfdan.ingvarsson, benoit.gadreau

[CL 24960584 by kiaran ritchie in ue5-main branch]
2023-04-06 19:53:13 -04: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
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