Commit Graph

166 Commits

Author SHA1 Message Date
semion piskarev
e1f8fe3b93 MeshModelingTools: Tweaked tool target requirements object storage default and added a convenience function to add requirements. Also added several comments in places.
#rb Lonnie.Li, Tyson.Brochu
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 16606399 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16606408 by semion piskarev in ue5-release-engine-test branch]
2021-06-09 11:51:04 -04:00
Ryan Schmidt
489dbc61c7 ToolsFramework: remove the AssetAPI concept from the Interactive Tools Framework. Replaced by ModelingObjectCreationAPI in ModelingComponents.
#rb none
#rnx
#jira none
#preflight 60b7e9448a2a64000126348c
#fyi brooke.hubert

[CL 16540327 by Ryan Schmidt in ue5-main branch]
2021-06-02 18:01:32 -04:00
Ryan Schmidt
528eef40e9 InteractiveToolsFramework: change checks() to ensures() and switch to non-fatal error handling for most situations in GizmoManager and ToolManager. Add TransformGizmo::GetGizmoTransform()
#rb none
#rnx
#jira none
#preflight 60b03b4b7e4e6a0001a001f0

[CL 16499542 by Ryan Schmidt in ue5-main branch]
2021-05-28 02:04:32 -04:00
Ryan Schmidt
6c20b92bf4 ToolsFramework: add a mechanism for clients of UInteractiveToolsContext to provide alternative implementations of the core ITF objects (eg InputRouter, ToolManager, etc) without having to subclass and duplicate all the Initialize()/Shutdown() logic.
#rb brooke.hubert
#rnx
#jira none
#preflight 60b02855f51cd900016680d0

[CL 16494849 by Ryan Schmidt in ue5-main branch]
2021-05-27 20:36:47 -04:00
Ryan Schmidt
7a93eace02 ToolsFramework: add register and unregister helper functions to TransformGizmoUtil, to facilitate EdModes sharing the context object
#rb jimmy.andrews
#rnx
#jira none
#preflight 60b013ebb60e930001239ae5

[CL 16493585 by Ryan Schmidt in ue5-main branch]
2021-05-27 19:09:12 -04:00
Ryan Schmidt
4ec1b6ae3c Gizmos: refactor Modeling Mode gizmo creation out of InteractiveGizmoManager. Editor will use other "default" transform gizmo implementations, and so the UTransformGizmo creation helper functions do not belong in GizmoManager. Instead a UTransformGizmoContextObject now provides this functionality. ModelingToolsEditorMode (and any other modes/systems that want to use these gizmo convenience functions) creates an instance of UTransformGizmoContextObject and registers it with the ContextObjectStore. Calling code can spawn a new UTransformGizmo by looking this object up in the ContextStore and calling it's helper functions. Static versions of the helper functions in the UE::TransformGizmoUtil:: namespace provide a single-line interface that replaces the previous GizmoManager call sites in the MeshModelingTools library.
IntervalGizmo is now just registered and unregistered as needed by the MeshSpaceDeformerTool, as this is the only place it is currently used.

Previous implementation in InteractiveGizmoManager is left intact as there are a few uses outside of MeshModelingTools that need to be cleaned up before it can be deleted.

UTransformGizmo now requires it's Builder to tell it which sub-gizmo identifier strings to pass to the GizmoManager to create axis/plane/rotation sub-gizmos (and the code that registers the Builder must then provide these strings). This cleans up previous explicit references to UInteractiveGizmoManager static strings from UTransformGizmo.

#rb Christina.TempelaarL, david.hill
#rnx
#jira none

[CL 16409673 by Ryan Schmidt in ue5-main branch]
2021-05-20 16:39:39 -04:00
Ryan Schmidt
c0ba0d5235 ModelingMode: Add support for selection-focus and point-focus at Tool level.
- New UInteractiveToolCameraFocusAPI UInterface defines functions a Tool can implement to publish its ability to provide a focus-box and focus-point
- ModelingMode uses this API to customize behavior. Box-focus (f hotkey) will now always focus on Tool-provided focus-box if available. Point-focus (c hotkey) will focus on nearer of world-hit and Tool focus-point.
- Default implementations for PrimitiveComponentToolTarget in SingleSelectionTool and MultiSelectionTool
- Custom focus-box implementations for PolyEdit-derived and TriSelect-derived tools, to focus on active selection if available
- Custom focus-point implementations for MeshSurfacePointTool

#rnx
#jira none

[CL 16246252 by Ryan Schmidt in ue5-main branch]
2021-05-10 01:17:30 -04:00
Ryan Schmidt
bca2b32ac7 ModeingMode: restore EditingLOD functionality lost in ToolTarget transition. Port EditingLOD functionality from FStaticMeshComponentTarget/Factory to UStaticMeshComponentToolTarget/Factory. Add UToolTargetManager::FindFirstFactoryByPredicate() and FindFirstFactoryByType(). ModelingToolsEditorModeToolkit now also looks up the StaticMeshFactory and updates the EditingLOD when it changes in the UI.
EStaticMeshEditingLOD enum moved to ComponentSourceInterfaces.h to make it more widely available.

Add ToolBuilderUtil::EnumerateComponents() and ToolTargetManager::EnumerateSelectedAndTargetableComponents(), this allows ToolBuilders to do additional checks on the valid Targets without having to make local arrays/etc. Fix SetCollisionGeometryTool to not build ToolTargets every frame just to check if one is a StaticMeshComponent.

#rb lonnie.li
#rnx
#jira none
#preflight 6092e932242f6600012445b0

[CL 16213180 by Ryan Schmidt in ue5-main branch]
2021-05-05 16:43:24 -04:00
brooke hubert
94cf8c06ec Interactive tools context now has a store for arbitrary context objects, which can be accessed via tools for shared data or operations, like typed element actions.
#Jira none
#preflight 6092b7858b751d0001be9bed
#rb semion.piskarev
#fyi ryan.schmidt

[CL 16209160 by brooke hubert in ue5-main branch]
2021-05-05 12:42:29 -04:00
michael balzer
01884dcf8c MeshModelingTools: Cancel active tools on world tear down. This addresses issues where changes are saved but we cannot undo them, and it also fixes issues where accepting tool edits during world tear down breaks assumptions made in the code.
#jira UE-114559
#rb jimmy.andrews semion.piskarev
#rnx

[CL 16207816 by michael balzer in ue5-main branch]
2021-05-05 11:18:39 -04:00
halfdan ingvarsson
8e8b8790c7 Add a skeletal mesh component tool target that allows editing skeletal meshes with the regular modeling tools.
#jira UE-93689
#rb lonnie.li

[CL 16199149 by halfdan ingvarsson in ue5-main branch]
2021-05-04 16:43:57 -04:00
tyson brochu
56d8f20f4c Refactor TPropertyWatcher back into a single class. There are now two types of constructor: one that takes a custom "!=" test function, and one that uses the built in operator for the type. If the type does not have a "!=" operator available, the caller is forced to use the constructor that specifies a custom test function.
#rnx
#preflight 6091789d5f41bc0001c7cfbf

[CL 16196522 by tyson brochu in ue5-main branch]
2021-05-04 14:01:08 -04:00
tyson brochu
09b02f6d5a Property watcher class that can accept a user-defined equality test. Useful to watch types that don't have an equality operator.
#rnx
#rb semion.piskarev

[CL 16169716 by tyson brochu in ue5-main branch]
2021-04-30 12:51:04 -04:00
semion piskarev
773ecfbb6a MeshModelingTools: Allow programmatic changes to properties to update detail panel properly.
#rb Lonnie.Li
#rnx
#jira UE-103980, UE-101251, UE-96691

[CL 16127920 by semion piskarev in ue5-main branch]
2021-04-27 11:06:18 -04:00
semion piskarev
58d5cbd5cf MeshModelingTools: Adding current version of UV editor.
#rb Brooke.Hubert, Ryan.Schmidt
#rnx
#jira UETOOL-3108, UETOOL-3110

[CL 16078314 by semion piskarev in ue5-main branch]
2021-04-21 14:36:05 -04:00
Jimmy Andrews
aa12ad308c Copy the separate asset and component materials from the source mesh to the new assets generated by plane cut tool (+ generally support creating an asset with separate component and asset materials)
#jira UE-110096
#rb tyson.brochu
#rnx
#preflight 6075fefa8c3f7700019357cc

[CL 15995092 by Jimmy Andrews in ue5-main branch]
2021-04-13 17:15:34 -04:00
Christina TempelaarL
8839ad8240 Added StateTarget and TransformSource for use with UGizmoBaseObject derived classes.
#jira UETOOL-2313
#rb ryan.schmidt
#preflight 606ab5057a9a3e0001e884c8

[CL 15913920 by Christina TempelaarL in ue5-main branch]
2021-04-05 03:39:55 -04:00
Christina TempelaarL
173eb3ae07 Added support for rendering UGizmo*Objects. Also update hit target interacting state when interacting. Eventually all other sub-gizmos should be modified to support the same.
#jira UETOOL-2313
#rb ryan.schmidt
#preflight 606a95fa8952c500019750f1

[CL 15913571 by Christina TempelaarL in ue5-main branch]
2021-04-05 01:34:07 -04:00
Christina TempelaarL
e7c8396611 Added UpdateInteractingState to UGizmoClickTarget interface. Updated hit targets and added new hit target for UGizmo*Object classes.
#jira UETOOL-2313
#rb ryan.schmidt, brooke.hubert
#preflight 606a69fc7a9a3e0001c01d9b

[CL 15913155 by Christina TempelaarL in ue5-main branch]
2021-04-04 22:19:08 -04:00
Christina TempelaarL
c20b76c724 Added UGizmo*Object classes which can be used to define, render and hit test various geometric primitives and/or composites of primitives such as Arrow. These are similar to UGizmo*Components.
#jira UETOOL-2313
#rb ryan.schmidt
#preflight 606a3babed84460001bc2c89

[CL 15912790 by Christina TempelaarL in ue5-main branch]
2021-04-04 19:31:18 -04:00
Christina TempelaarL
bb657cb679 Added legacy view dependent scaling used by UGizmo*Object classes. Eventually this should be probably be replaced by CalculateLocalPixelToWorldScale, for now needed for legacy feature parity in Level Editor gizmo.
#jira UETOOL-2313
#rb ryan.schmidt
#preflight 606625fc5597d80001ec913e

[CL 15896317 by Christina TempelaarL in ue5-main branch]
2021-04-01 17:01:24 -04:00
Christina TempelaarL
c59aeea0fa Added ray-cone and ray-cylinder interesection tests based on implementations from the Geometric Tools library.
#jira UETOOL-2313
#rb jimmy.andrews
#preflight 606612b6b224410001679840

[CL 15895055 by Christina TempelaarL in ue5-main branch]
2021-04-01 15:55:57 -04:00
brooke hubert
f596195f8f Adding post tool build and post set up notifications to the tool manager.
#Jira none
#preflight 6063718665bf07000195908d
#rb ryan.schmidt
#fyi jeanmichel.dignard

[CL 15873810 by brooke hubert in ue5-main branch]
2021-03-31 08:34:48 -04:00
semion piskarev
2b47a6cf86 MeshModelingTools: Changing edge loop insertion and group edge insertion to use undo like PolyEdit does, both to fix invisibility bug and to prep for eventual movement into PolyEdit. Also made loop insertion highlight non-quad groups when a loop is stopped.
#rb Jimmy.Andrews, Ryan.Schmidt
#jira UETOOL-2405, UETOOL-2854
#rnx

#ROBOMERGE-OWNER: semion.piskarev
#ROBOMERGE-AUTHOR: semion.piskarev
#ROBOMERGE-SOURCE: CL 15850950 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)
#ROBOMERGE-CONFLICT from-shelf

[CL 15852933 by semion piskarev in ue5-main branch]
2021-03-29 13:39:32 -04:00
lonnie li
71d5092007 ModelingTools: Refactor SingleSelectionTool to ToolTargets (pt.2)
#rb ryan.schmidt jimmy.andrews
#jira none
#rnx
#preflight 605a54c0e8944a0001585162

[CL 15799514 by lonnie li in ue5-main branch]
2021-03-24 11:11:02 -04:00