Commit Graph

179 Commits

Author SHA1 Message Date
benoit gadreau
c44d51a218 New TRS GIzmo: fixed indirect translation screen axis computation
#rb helge.mathee
#rnx

[CL 28313880 by benoit gadreau in ue5-main branch]
2023-09-28 07:23:54 -04:00
benoit gadreau
d4492fb056 New TRS Gizmo:
- fixed axis manipulation for both direct & indirect manipulation
    - indirect manipulation using CTRL+LMB/RMB is now handled by the gizmo
    - added UMultiButtonClickDragBehavior to support click & drag with several buttons in one single behavior

#jira UE-152999
#rb semion.piskarev, brooke.hubert

[CL 28277038 by benoit gadreau in ue5-main branch]
2023-09-27 12:13:25 -04:00
semion piskarev
a463b1c354 InteractiveToolsFramework: Fix mouse state not being correctly updated in the editor for buttons other than the actively pressed one.
#rb none
#jira UE-196639

[CL 28275791 by semion piskarev in ue5-main branch]
2023-09-27 11:41:11 -04:00
yoan stamant
9ab3afc392 Added [[nodiscard]] to the constructors of TGuardValue, TOptionalGuardValue, TGuardValue_Bitfield_Cleanup and TScopeCounter.
[FYI] geoffrey.wong
#rb steve.robb

[CL 28097105 by yoan stamant in ue5-main branch]
2023-09-21 14:44:27 -04:00
benoit gadreau
e48cda08bb New TRS Gizmo
- support for current FEditorModeTools::WidgetScale
    - reset default indirect target when re-entering the same transform mode
    - added FEditorTransformGizmoDataBinder to easily interface between transform gizmos and the mode manager

TODO
    - FEditorModeTools::WidgetScale (currently acting as a uniform matrix scale as designed in 14299282) should be replaced by gizmo scale, line with and handle size settings once the design done.

#rb brooke.hubert

#rnx

[CL 27952239 by benoit gadreau in ue5-main branch]
2023-09-18 04:30:17 -04:00
jimmy andrews
78fbcb1c6b Use deprecated typedef to fix FSelectedOjectsChangeList typo in ITF's ToolContextInterfaces
#jira UE-192620
#rb matija.kecman
#rb lonnie.li

[CL 27782397 by jimmy andrews in ue5-main branch]
2023-09-12 00:11:43 -04:00
benoit gadreau
5748a9751d Fixed static analysis
- cf. https://horde.devtools.epicgames.com/job/64ff2bb0af5c3ec547a643b2

#rb trivial

#rnx

[CL 27756753 by benoit gadreau in ue5-main branch]
2023-09-11 12:05:45 -04:00
benoit gadreau
60aa402577 New TRS Gizmo updates: follow-up to CL 27751703
#rb trivial

#rnx

[CL 27755974 by benoit gadreau in ue5-main branch]
2023-09-11 11:46:24 -04:00
benoit gadreau
7c004866a5 New TRS Gizmo updates
- arcball rotation: the rotation is computed using a spherical+hyperbolic projection (see code for more explanation)
    - indirect manipulation via MMB: hit parts are stored per mode then are used to drive the proper drag function
    - defered drag function: in order to avoid notifications storm, the drag functions can be applied on tick instead using a pending function
    - a single default TRS gizmo is now created when needed (instead of creating several thru selection changed or when the gizmo manager was ticking) and its visibility is set based on rules

TODO
    - UEditorInteractiveGizmoManager is now closer to UInteractiveGizmoManager so I don't think we need ActiveEditorGizmos, CachedGizmoMap, etc. that are not used anymore. This should be cleaned in another CL
    - UEditorTransformGizmo::OnGizmoTransformBegin should set the current axis (needed for some modes, including IKRig) but this is disabled for now has there are some side effects with dragging (this will be treated in another CL)


#jira UE-152973
#jira UE-161236
#rb brooke.hubert zach.rammell

[CL 27751789 by benoit gadreau in ue5-main branch]
2023-09-11 09:54:48 -04:00
robert manuszewski
d3991fec9b Fixing potential compile errors ahead of enabling TObjectPtr GC barrier
#rb trivial

[CL 26868625 by robert manuszewski in ue5-main branch]
2023-08-05 06:09:54 -04:00
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