39 Commits

Author SHA1 Message Date
katie caputo
57d9fae94f Modeling Tools: Fixes bug that would not deselect Edge in MeshElementSeletion on Undo/Redo and caused crash
#JIRA UE-226522
#rb lonnie.li

[CL 36877310 by katie caputo in 5.5 branch]
2024-10-04 16:22:56 -04:00
katie caputo
34c82cd081 Modeling Tools: Avoid MeshElementSelection PreviewGeo crash on editor exit
#JIRA UE-225670
#rb Jimmy.Andrews

[CL 36762350 by katie caputo in 5.5 branch]
2024-10-01 20:16:29 -04:00
katie caputo
80c0394432 Modeling Tools: Changes how Mesh Element Selection Colors are updated during customization for a faster update on dense meshes
#JIRA UE-223528
#rb lonnie.li

[CL 36761874 by katie caputo in 5.5 branch]
2024-10-01 20:12:05 -04:00
Ryan Hummer
4af2fd066d Updating Dev-Release-5.5 from Main at CL #36144969
#okforversepublic

[CL 36146571 by Ryan Hummer in Dev-5.5 branch]
2024-09-10 10:26:02 -04:00
katie caputo
729abfbe18 Modeling Tools: Fixes a bug which displayed the wrong visuals in Mesh Element Selection in undo/redo
#JIRA UE-216281
#rb lonnie.li

[CL 35068023 by katie caputo in ue5-main branch]
2024-07-24 17:26:19 -04:00
jimmy andrews
c64ec0fd2f add selection validation to geometry selection manager, so we can recover if objects are deleted from under the selection system
+ fix dynamic mesh selection lambda keeping a raw pointer, and instead keep an identifier w/ a weak object pointer

#rb lonnie.li

[CL 34944659 by jimmy andrews in ue5-main branch]
2024-07-19 17:02:27 -04:00
kronok
76e263fc58 ModelingTools: Fixed geometry selection opacity to use the alpha from the ModelingMode color settings
#JIRA UE-215260
#rb lonnie.li

[CL 34944002 by kronok in ue5-main branch]
2024-07-19 16:40:16 -04:00
katie caputo
c9c94e18c0 Modeling Tools: Updates the visual display of Mesh Element Selection so that only applicable components are displayed depending on the selection mode
#JIRA UE-206070
#rb lonnie.li

[CL 33732970 by katie caputo in ue5-main branch]
2024-05-17 15:06:29 -04:00
katie caputo
e1fb5dfb17 Modeling Tools: Resolves flickering which happened when hovering over a selected element in MeshElementSelection
#JIRA UE-214897
#rb lonnie.li

[CL 33729003 by katie caputo in ue5-main branch]
2024-05-17 13:17:01 -04:00
katie caputo
d2d550ceb1 Modeling Tools: Replaces the existing PDI implementation of MeshElementSelection to use PreviewGeometry
#JIRA UE-189444
#rb lonnie.li

[CL 33610721 by katie caputo in ue5-main branch]
2024-05-13 18:32:09 -04:00
katie caputo
a7bd886565 Modeling Tools: Implement the selection Mapping Flags for MeshElementSelection and clarify its related code
#JIRA UE-212714
#rb lonnie.li

[CL 33334853 by katie caputo in ue5-main branch]
2024-04-30 09:10:14 -04:00
jimmy andrews
91f66a42f6 fix gizmo not showing up for modeling mode geometry selection after selection element type / topology mode change
#rb jimmy.andrews

[CL 33214061 by jimmy andrews in ue5-main branch]
2024-04-24 17:33:01 -04:00
jimmy andrews
558c86d50b Make modeling mode element selections auto-convert when user changes the active selection mode (if a conversion is implemented)
#rb rinat.abdrashitov

[CL 33116028 by jimmy andrews in ue5-main branch]
2024-04-19 16:41:11 -04:00
katie caputo
87533ccde8 Modeling Tools: Add support for customizing colors in Mesh Element Selection, add support for different between hovering over a selected vs non-selected elements, fix issues with EnumerateSelectionEdges
#JIRA UE-209421 UE-206063
#rb nickolas.drake

[CL 33070091 by katie caputo in ue5-main branch]
2024-04-18 09:20:08 -04:00
katie caputo
b403616bec Modeling Tools: Places Mesh Element Selection Gizmo in Object Frame Mode at selected component(s) pivot rather than at object's pivot
#JIRA UE-206515
#rb lonnie.li

[CL 31575613 by katie caputo in ue5-main branch]
2024-02-16 14:49:01 -05:00
katie caputo
7ec560568b Modeling Tools: Adds 'Local Frame Mode' toggle in the Mesh Element Selection Toolbar Settings so users can edit with the gizmo based either on the selected geometry only or on the entire object
#JIRA UE-202681
#rb lonnie.li, nickolas.drake

[CL 31128610 by katie caputo in ue5-main branch]
2024-02-02 11:59:31 -05:00
nickolas drake
471232acd1 MeshElementSelection: Make selectable mesh elements visible.
When we have a valid topology type (Triangle or Poly, not None), we render selectable mesh elements.

Added AccumulateElementsFromPredicate to the GeometrySelector interface which allows a predicate function to filter which geometry elements ought to be included in the provided FGeometrySelectionElements. The predicate is aware of the type of element (vert, edge, tri) and the selected element ID (which is a single value encoding the topology ID and the element ID). The predicate returns true for elements to include and false for elements to exclude. Internally, this function builds transient vert, edge, and tri selections with this predicate and then accumulates all selection elements into the provided FGeometrySelectionElements.

#rb lonnie.li
#jira UE-202674

[CL 30860867 by nickolas drake in ue5-main branch]
2024-01-24 16:06:11 -05:00
jimmy andrews
7e1b8e46d9 add concept of saving-on-clear/restoring the selection manager's selection, so that tools can restore the before-tool selection if the tool is cancelled, or if the tool otherwise did not change the underlying meshes.
+ add a callback to the modeling editor mode so it can know whether a tool was cancelled, and make the modeling mode use the selection manager's new save-on-clear/restore feature automatically when its tools are cancelled.

 + make some tools (normals, tangents, inspector) restore the before-tool-start selection after tool use via a utility function, since they shouldn't change mesh IDs that the selection relies on.

#jira UE-195948
#rb Ryan.Schmidt

[CL 29027037 by jimmy andrews in ue5-main branch]
2023-10-23 22:46:23 -04:00
ryan schmidt
826eb71a04 ModelingMode: selection system bugfixes & improvements.
Add DynamicMeshSelector::UpdateAfterGeometryEdit API. StaticMeshSelector implementation updates static mesh after an Edit instead of emitting MeshChange on temporary DynamicMesh.
Delete and Retriangulate Commands now use this API instead of directly emitting transaction, so now these commands work properly on Static Meshes.

FStaticMeshComponentSelectorFactory::CanBuildForTarget now only allows UStaticMeshComponent specifically, filtering out subclasses. This is not ideal but I don't know what else we can do for now, there are many subclasses like ISMC, SplineMeshComponent, etc, that will not work w/ the Selection system. Also now filtering out Engine assets and cooked assets.

ModelingToolsEditorMode now listens for blueprint pre-compiles, and when this occurs, clears the active selection and selection targets. This is necessary because if the selection Component was part of a BP, on recompile it is re-instanced and the old pointer goes stale. Possibly can handle this better or at a more granular level, but clearing the selection is safest. This currently results in things not being undoable because the FChange transactions are on the "old" UDynamicMesh that no longer exists.

UModelingToolsEditorMode::UpdateSelectionManagerOnEditorSelectionChange now does a more thorough job of inspecting the current Actor/Component selection to find Components that could work w/ the selection system.

#rb lonnie.li

[CL 26133067 by ryan schmidt in ue5-main branch]
2023-06-20 16:23:43 -04:00
ryan schmidt
8937f914fa ModelingMode: avoid a crash on shutdown when DynamicMeshActor is selected, due to TargetCache being modified during iteration
#rb none
#preflight 644af8701150e908d05a0976

[CL 25238944 by ryan schmidt in ue5-main branch]
2023-04-28 16:01:06 -04:00
ryan schmidt
2046684122 ModelingMode: support IGeometrySelector::Sleep() and ::Restore() failing in GeometrySelectionManager. FBaseDynamicMeshSelector will now fail to sleep if TargetMesh is not valid. SupportsSleep() now also checks for valid target mesh.
#rb jimmy.andrews
#jira UE-184089
#preflight 644953476b589f8b367c7f7a

[CL 25204039 by ryan schmidt in ue5-main branch]
2023-04-26 14:35:53 -04:00
matija kecman
7b090b69c0 Add Geometry Selection visualization to Normals tool
#jira UE-183457
#preflight 64492eecb208f61af87912db
#rb ryan.schmidt

[CL 25199891 by matija kecman in ue5-main branch]
2023-04-26 11:54:13 -04:00
ryan schmidt
2f30bc1c16 ModelingMode: updates to selection system.
Selection enable/disable can now be toggled dynamically via mode settings popup, toolbar will hide/show based on current setting state.
GeometrySelectionManager is now always created. New Mode function GetMeshElementSelectionSystemEnabled() indicates whether selection is currently enabled, when disabled active targets will not be tracked.
Selection Toolbar icons now are disabled while in a Tool (as selection system is not active then)
New Static Mesh Assets and Volumes created using Modeling Tools now default to unlocked, via new functions on StaticMeshSelector / Volume Selector.
Unlocked Asset/Volume sets are cleared on level change
Added cvars modeling.Selection.EnableStaticMeshLocking and modeling.Selection.EnableVolumeLocking which can be used to fully disable lock-ability of StaticMesh/Volume (default true)
shortened some names of tool group tabs, as labels are now shown and long names make the bar wider
Added a few toast notifications for when setting state changes require a mode or editor restart.
#rb none
#preflight 64426fabb14f1faacff6921d

[CL 25149511 by ryan schmidt in ue5-main branch]
2023-04-21 14:04:50 -04:00
ryan schmidt
d83ee312b8 ModelingMode: bring back in-viewport selection toolbar. Add concept of Locking to IGeometrySelector, have StaticMeshSelector and VolumeSelector default to locked. Add util functions to check/manipulate locking state to UGeometrySelectionManager. Add locked-state indicator/button to selection toolbar.
#preflight 642df231c6769c608209676a
#rnx

[CL 24979045 by ryan schmidt in ue5-main branch]
2023-04-10 12:36:37 -04:00
ryan schmidt
3880554a59 ModelingMode: preliminary support for selection transform visualization for Volumes and Static Meshes, and other minor improvements.
Add IGeometrySelectionTransformer::PreviewRender() API, for rendering info during selection transforms. Currently being called by  UGeometrySelectionManager::DebugRender() for active transforms.
FBasicDynamicMeshSelectionTransformer implements PreviewRender, draws selected mesh edges (tris as edges) and vertices, as well as affected edge ROI.
FDynamicMeshPolygroupTransformer overrides this behavior and draws polygroup edges/verts and edge ROI

FStaticMeshSelector and FVolumeSelector now create FDynamicMeshPolygroupTransformer for polygroup selections

FBasicDynamicMeshSelectionTransformer::bEnableSelectionTransformDrawing flag controls whether this edge drawing is enabled. Disabled on DynamicMeshComponent, enabled on StaticMesh and Volume.

Add Normals recomputation during tri and polygroup transforms in FBasicDynamicMeshSelectionTransformer and FDynamicMeshPolygroupTransformer

Add FGroupTopologyDeformer::EnumerateROIEdges() util function to support above

#rb none
#preflight 641cd27bc44ce895fc62f724

[CL 24780655 by ryan schmidt in ue5-main branch]
2023-03-24 12:08:43 -04:00