Commit Graph

214 Commits

Author SHA1 Message Date
benoit gadreau
c44837e62d New TRS Gizmo: set AutoSwitchPullAxis to true by default
- follow up to 35055294

#rnx

[CL 35890622 by benoit gadreau in ue5-main branch]
2024-08-29 01:31:35 -04:00
kiaran ritchie
81bc861aee Added option for UEditorInteractiveToolsContext to stay active during a PIE session.
#rb lonnie.li
#JIRA UE-211121

[CL 35656697 by kiaran ritchie in ue5-main branch]
2024-08-20 11:49:15 -04:00
katie caputo
4b6f660de5 InteractiveToolsFramework: Adds support for scale snapping
#JIRA UE-219783
#rb lonnie.li

[CL 35193972 by katie caputo in ue5-main branch]
2024-07-30 15:19:02 -04:00
benoit gadreau
a67034a2e2 New TRS Gizmo: indirect screen space rotation is now consistent with other axial rotations
#rb sara.schvartzman
#rnx

[CL 35104516 by benoit gadreau in ue5-main branch]
2024-07-26 04:34:16 -04:00
benoit gadreau
570df7171a New TRS Gizmo: ability to switch from tangential to normal projection based on the first mouse drag
- this is disable by default but can be enabled using 'Gizmos.AutoSwitchPullAxis 1' to get some feedback from users

#rb brooke.hubert
#rnx

[CL 35055345 by benoit gadreau in ue5-main branch]
2024-07-24 11:29:53 -04:00
benoit gadreau
54b489795a New TRS Gizmo: fixed deprecated namespace
#rnx

[CL 34978704 by benoit gadreau in ue5-main branch]
2024-07-22 06:35:20 -04:00
benoit gadreau
0fd30d1459 New TRS Gizmo: fixed indirect translation not taking pixel to world ratio into account
#rb sara.schvartzman
#rnx

[CL 34978212 by benoit gadreau in ue5-main branch]
2024-07-22 05:52:50 -04:00
semion piskarev
0d573fdd31 InteractiveToolsFramework: Move GizmoRenderingUtil functions to be nested under UE namespaces and fix usage. Also revert one of the deprecated signatures to take UGizmoViewContext instead of the new interface, to avoid a potential compile error if the function is called somewhere that the class is not fully defined.
#rb lonnie.li

[CL 34905009 by semion piskarev in ue5-main branch]
2024-07-18 13:14:43 -04:00
zousar shaker
0329daaa3e Manual fixes for header issues identified by UHT after fixing issues in the config evaluation that prevented internal strictness rules from being applied.
[CL 34886150 by zousar shaker in ue5-main branch]
2024-07-17 17:36:17 -04:00
lonnie li
f6b1278540 InteractiveToolsFramework: Added DoubleClickBehavior.
Adjusted InputRouter to forward DoubleClick events to as Pressed events. Clients can register DoubleClick behaviors with a higher priority to capture DoubleClicks. This allows existing single click behaviors the opportunity to consume the double click event as a single click without having to add their own double click behaviors.

#rb nathan.mitchell, semion.piskarev
#jira UE-217980 UE-214543

[CL 34561004 by lonnie li in ue5-main branch]
2024-06-21 09:51:49 -04:00
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