Commit Graph

204 Commits

Author SHA1 Message Date
benoit gadreau
17c7ab6ed5 New TRS Gizmo: fixed early access to level editor mode manager
- follow-up to 33736099

#rb brooke.hubert
#rnx

[CL 34092566 by benoit gadreau in ue5-main branch]
2024-06-04 09:42:51 -04:00
benoit gadreau
026ce729e6 New TRS Gizmo: reset LastHitPart on widget mode changed
#rnx
[FYI] fredrik.nilsson

[CL 33823310 by benoit gadreau in ue5-main branch]
2024-05-22 05:47:43 -04:00
nathan mitchell
992f2ab7fd InteractiveToolsFramework: Provide new API for controlling mouse cursor styling during tool operations and prevent excessive hit proxy testing when ITF has mouse capture active.
As a proof of concept, enables the eyedropper cursor during the UV Editor's Texel Density tool's Sampling Mode.

New API is disabled by default, to enable set CVAR Editor.EnableITFCursorOverrideSupport > 1

#rb brooke.hubert, Jimmy.Andrews
#jira UE-207211, UE-207208

[CL 33217562 by nathan mitchell in ue5-main branch]
2024-04-24 19:07:23 -04:00
benoit gadreau
e5f411a516 Control Rig: ensure that the pivots are up-to-date when the gizmos need them
- as both legacy and new gizmos tick before the mode, they use an obsolete coordinate system when redering. As the Control Rig Mode caches the pivots on tick, we have to make sure we get up-to-date transforms.


#jira UE-206904
#rb Mike.Zyracki

[CL 31497523 by benoit gadreau in ue5-main branch]
2024-02-14 17:57:37 -05:00
benoit gadreau
4a905c0bba New TRS Gizmo: fixed delegate not unbound on shutdown
#rb benoit.gadreau

[CL 30967778 by benoit gadreau in ue5-main branch]
2024-01-29 09:19:23 -05:00
benoit gadreau
76e795b4e5 New TRS Gizmos: make sure settings are propagated when the gizmos are created after the plugin has been loaded
#rb brooke.hubert

[CL 30940221 by benoit gadreau in ue5-main branch]
2024-01-26 16:07:44 -05:00
benoit gadreau
b5b788867a New TRS Gizmo: set default rotate to arc instead of pull
[FYI] fredrik.nilsson

[CL 30924470 by benoit gadreau in ue5-main branch]
2024-01-26 10:36:35 -05:00
benoit gadreau
294325a993 New TRS Gizmos: expose some settings in the editor preferences
- need to enable the experimental Gizmo Framework plugin to access those settings
    - removed deprecated NewGizmoEnable module

#jira UE-200162
#rb brooke.hubert

[CL 30918031 by benoit gadreau in ue5-main branch]
2024-01-26 05:49:29 -05:00
benoit gadreau
f2fdd3f0e5 New TRS Gizmo: handle transform transaction using the ITF
- when created, the gizmo asks the mode manager to create a state target by calling FEditorModeTools::GetGizmoStateTarget(), which will create one if needed
    - UEditorGizmoStateTarget::BeginUpdate() creates a new transaction + calls FEditorModeTools::BeginTransform() which will iterate thru the modes and ask them if they have anything to handle
    - if they don't, the focused VPC still has the option of doing something (it doesn't by default, but some, like the level VPC, handle what they need to)

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

[CL 30411419 by benoit gadreau in ue5-main branch]
2023-12-20 09:22:54 -05:00
benoit gadreau
28625b2fc2 New TRS Gizmo: change the default editor mode for the asset editors
The new TRS gizmo system uses FEditorModeTools::GetShowWidget() to update the visible state of the gizmo.
    However, for asset editors that don't override their default mode (as is the case with BP), the result is obtained from the FLevelEditorSelectModeWidgetHelper::ShouldDrawWidget function, which gets its data from the GCurrentLevelEditingViewportClient...
    The FWidget rendering works mainly because it bypasses the result of FEditorModeTools::GetShowWidget() and relies on the value of FEditorViewportClient::GetWidgetMode() instead. VPCs like FSCSEditorViewportClient, for example, will change the widget mode dynamically according to the selection.
    To change this behavior for new TRS gizmo without changing the current behavior, we swap the default mode with AssetEdModes::EM_AssetDefault if (and only if) FBuiltinEditorModes::EM_Default is one of the default modes and we're not dealing with the level editor's mode manager.

+ remove the direct uses of "Gizmos.UseLegacyWidget" in several places to ease the migration to user settings

#jira UE-200162
#rb brooke.hubert

[CL 30409058 by benoit gadreau in ue5-main branch]
2023-12-20 04:08:20 -05:00
benoit gadreau
ad7ac6402d New TRS Gizmo: rotate modes
two rotation modes available via Gizmos.RotateMode:
    - 0: Pull, to rotate the object by pulling along the tangent to the circle (default)
    - 1: Arc, to rotate the object by rotating around the gizmo center (like the screen space rotation does)

#jira UE-200162
#rb sara.schvartzman

[CL 30232941 by benoit gadreau in ue5-main branch]
2023-12-11 05:03:18 -05:00
benoit gadreau
c2ee0303bc New TRS Gizmo: enable indirect manipulation with hidden gizmo
#jira UE-201821
#rb sara.schvartzman

[CL 30209103 by benoit gadreau in ue5-main branch]
2023-12-08 08:09:31 -05:00
benoit gadreau
f5e9a6bdb7 New TRS Gizmo: fixed view direction projection
#rnx

[CL 29918002 by benoit gadreau in ue5-main branch]
2023-11-24 07:11:08 -05:00
marc audy
763a611985 Fix C4072 warnings
#rnx

[CL 29852844 by marc audy in ue5-main branch]
2023-11-20 17:26:53 -05:00
benoit gadreau
1a5b48efc3 New TRS Gizmo: new behavior for rotation handles
- the "pull" direction is now based on the closest projection to the rotation circle
    - normal to that pull direction is removed to avoid poor drag behavior
    - added a few temp cvars to experiment and fine tune the behavior

        - Gizmos.DotThreshold 0.2: Dot threshold for determining whether the rotation plane is perpendicular to the camera view [0.2, 1.0]
        - Gizmos.DebugDraw false: Displays debugging information.
        - Gizmos.ProjectIndirect true: Project to the nearest point of the curve when handling indirect rotation.

#jira UE-200162
#rb brooke.hubert

[CL 29809369 by benoit gadreau in ue5-main branch]
2023-11-17 11:24:36 -05:00
benoit gadreau
9d3b7605b6 New TRS Gizmo: toggle between arcball and screen space when re-entering rotate mode.
#rnx
[FYI] fredrik.nilsson

[CL 29708673 by benoit gadreau in ue5-main branch]
2023-11-14 05:22:20 -05:00
benoit gadreau
a9607bbff7 New TRS Gizmo: partial view dependent rendering improvements
- use the ViewAlignAxialMaxCosAngleTol property instead of the default one to enable per-element customization
    - reduced the max partial angle of rotation handles so that they don't depth fight with the arcball handle on edges

#rb brooke.hubert
#rnx

[CL 29680588 by benoit gadreau in ue5-main branch]
2023-11-13 06:09:58 -05:00
benoit gadreau
3c449766f8 New TRS Gizmo: CTRL + MMB does indirect manipulation on the Y axiz (CTRL+LMB does Z instead of CTRL+RMB+LMB)
#rb brooke.hubert
#rnx

[CL 29595563 by benoit gadreau in ue5-main branch]
2023-11-09 10:03:28 -05:00
benoit gadreau
51e24f2e05 New TRS Gizmo: hide gizmo if FEditorViewportClient::bShowWidget is false
#rb brooke.hubert
#rnx

[CL 29595527 by benoit gadreau in ue5-main branch]
2023-11-09 10:02:05 -05:00
bob tellez
2030016c50 [Backout] - CL29484848
[FYI] benoit.gadreau
Original CL Desc
-----------------------------------------------------------------
New TRS Gizmo: CTRL + MMB does indirect manipulation on the Y axiz (CTRL+LMB does Z instead of CTRL+RMB+LMB)

#rb brooke.hubert
#rnx

[CL 29499083 by bob tellez in ue5-main branch]
2023-11-06 15:56:38 -05:00
bob tellez
18b5da1455 [Backout] - CL29484771
[FYI] benoit.gadreau
Original CL Desc
-----------------------------------------------------------------
New TRS Gizmo: hide gizmo if FEditorViewportClient::bShowWidget is false

#rb brooke.hubert
#rnx

[CL 29499063 by bob tellez in ue5-main branch]
2023-11-06 15:56:09 -05:00
benoit gadreau
f1443ed902 New TRS Gizmo: CTRL + MMB does indirect manipulation on the Y axiz (CTRL+LMB does Z instead of CTRL+RMB+LMB)
#rb brooke.hubert
#rnx

[CL 29484859 by benoit gadreau in ue5-main branch]
2023-11-06 05:30:56 -05:00
benoit gadreau
357bc16dc8 New TRS Gizmo: hide gizmo if FEditorViewportClient::bShowWidget is false
#rb brooke.hubert
#rnx

[CL 29484782 by benoit gadreau in ue5-main branch]
2023-11-06 05:25:23 -05:00
benoit gadreau
268d1c4a21 New TRS Gizmo: support for parent space transformations (note that this is only exposed/available if the new trs gizmos are enabled).
- added ECoordSystem::COORD_Parent
    - the mode manager's GetCustomDrawingCoordinateSystem overrides calculates the parent space transformation if required.

For the moment, there's no need to add anything at the ITF level, as everything is redirected to the VPC/Mode Manager thru the UEditorTransformProxy.
If the UTransformGizmo were to manage it locally, we'd probably have to add something similar to UCombinedTransformGizmo::bUseContextCoordinateSystem to make the TransformProxy responsible for managing the "local/parent" coordinate system.

#jira UE-197757
#rb brooke.hubert

[CL 28836838 by benoit gadreau in ue5-main branch]
2023-10-17 08:51:02 -04:00
benoit gadreau
77433e0c4c New TRS Gizmo: do not handle indirect manipulation if the gizmo is hidden
#rb sara.schvartzman

#rnx

[CL 28410468 by benoit gadreau in ue5-main branch]
2023-10-03 08:20:18 -04:00