9 Commits

Author SHA1 Message Date
semion piskarev
a8b95f326c MeshModelingTools: Fix expand/contract selection not working correctly in some circumstances for edge/face selections due to considering border vertices solely based on neighboring vertices being in selection, rather than neighboring elements of the selection type.
#rb Ryan.Schmidt
#jira UE-182166
#preflight 6470bf745d3ca2dfd9a093f4

[CL 25647926 by semion piskarev in ue5-main branch]
2023-05-26 13:02:47 -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
matija kecman
0dcd983404 Add Geometry Selection support to the Normals tool
This code was reviewed here https://p4-swarm.epicgames.net/reviews/25007278 but that CL was into //UE5/Main. We want the change to be into //Fortnite/Main, hence this CL

#jira UE-181649
#preflight 6442a3894944ef78926d17a3
#rb semion.piskarev, jimmy.andrews, ryan.schmidt

[CL 25150696 by matija kecman in ue5-main branch]
2023-04-21 14:49:34 -04:00
ryan schmidt
70ac55822d ModelingMode: improve interop with new Selection System and existing Tools
Add support for Tools to provide an "output" selection. Add UGeometrySelectionManager::SetSelectionForComponent() which can set an explicit externally-provided selection. FBaseDynamicMeshSelector::UpdateSelectionFromSelection() now supports selection conversion when available and requested (is used to implement SetSelectionForComponent). New GeometrySelectionUtil functions InitializeSelectionFromTriangles() and ConvertSelection() are used to implement this (note: only Triangles->other conversion is currently supported). Add HaveAvailableGeometrySelection() and SetToolOutputGeometrySelectionForTarget() in StoredMeshSelectionUtil.h, this is the top-level function that Tools can use to set an Output selection.

ExtrudeMeshSelectionTool now emits output selection.

Update EditMeshPolygonsTool to use new Selection system and allow individual operations to be utilized as standalone Tools. Convert EditMeshPolygonsTool to be a USingleTargetWithSelectionTool, use FGeometrySelection to initialize selection. Add bTerminateOnPendingActionComplete flag, which is set when Tool is directly initialized to a specific operation, and forces tool to shut down when operation completes. This allows it to be used to more cleanly implement multiple action buttons in Modeling UI. When in this mode, selection panels are not shown. On Shutdown, now emits an "output" selection which GeometrySelectionManager can use to provide new selection to user. Update UPolygonSelectionMechanic Set/Get selection APIs to use FGeometrySelection instead of UPersistentMeshSelection.

port UVProjectionTool to derive from USingleTargetWithSelectionTool, use FGeometrySelection to initialize target ROI

deprecate UPersistentMeshSelection and related functions in StoredMeshSelectionUtil.h. Deprecate Tool Input Selection APIs in USingleSelectionMeshEditingTool and Builder.

Repurpose old ModelingMode-level PolyModel tab operations for new Selection Tools UI, now support Inset, Outset, Cut Faces, Insert Edge Loop, PushPull, and Bevel.

#rb none
#preflight 63c84fa2b065224750b9831f

[CL 23766643 by ryan schmidt in ue5-main branch]
2023-01-18 17:59:31 -05:00
ryan schmidt
5a61c6b75c GeometryProcessing: add MakeSelectAllSelection(), MakeSelectAllConnectedSelection(), MakeBoundaryConnectedSelection(), CombineSelectionInPlace() utility functions. Some of this is ported from geometry script selection code, which should be replaced with calls to these util functions (after testing). Minor necessarily additions to FGeometrySelection and FGeometrySelectionEditor.
#rb none
#preflight 63c02b711e5ee71dc373f692

[CL 23665656 by ryan schmidt in ue5-main branch]
2023-01-12 12:50:34 -05:00
ryan schmidt
ffc51ff78c ModelingMode: new selection system improvements.
Introduced FGeometrySelectionHitQueryConfig (GeometrySelection.h), this provides information about the active selection mode. FGeometrySelectionEditor now tracks active FGeometrySelectionHitQueryConfig.
IGeometrySelector hit-testing/processing functions now take a struct FWorldRayQueryInfo that combines a FRay3d with FViewCameraState, to allow for (eg) snapping wrt the active camera/etc
Added FGeometrySelectionPreview, this is a utility subclass of FGeometrySelectionEditor that is used for selection-preview highlighting, relative to a base FGeometrySelectionEditor
Added IGeometrySelector::GetSelectionPreviewForRaycast() which is used to accumulate a preview of what might be selected in a FGeometrySelectionPreview. AccumulateSelectionElements() can also now accumulate 'preview' geometry, and FDynamicMeshSelector uses this to provide the edge-loop of a facegroup for it's preview (as providing all triangles is too expensive for hover highlighting on hires meshes).
Added support for hover-highlighting mechanic in UGeometrySelectionManager and UModelingSelectionInteraction
FDynamicMeshSelector now creates a GroupEdgeSegmentTree for polygroup edges. This allows for better selection interaction, eg no dependency on the edge-adjacent triangles.
Added AreSelectionsIdentical() function in GeometrySelectionUtil.h
#rb none
#preflight 638145b318176c67c2785280

[CL 23300258 by ryan schmidt in ue5-main branch]
2022-11-28 19:15:40 -05:00
Ryan Schmidt
2a47ed9730 GeometryScript: add InvertMeshSelection
GeometrySelectionUtil: add FindByTopologyID function, to search a Selection for selected element with matching TopologyID but ignoring GeometryID. Update FGeometryScriptMeshSelection::CombineSelectionInPlace() to use this, as it was not properly combining Polygroup selections.
#rb none
#preflight 630501435a5d4e462428af90

[CL 21516930 by Ryan Schmidt in ue5-main branch]
2022-08-23 15:23:52 -04:00
David Hill
bd6eef7ea1 Geometry Core, Geometry Processing. Fix implicit cast warnings encountered during clang build.
GeometryCore: StairGenerator.cpp, SweepGenerator.{h,.cpp}, UVPacking.cpp, ParallelTransformReduce.h, CurvewUtil.h, SweepingMeshSDF.h FastWinding.h

GeometryProcessing:  Remesher.cpp, AdaptiveTessellate.cpp, UniformTessellate.cpp, GeometrySelectionUtil.cpp, MeshSimpleApproximation.cpp

#rb Lonnie.Li
#preflight 62d5bfa347779a730a46bc55

[CL 21161422 by David Hill in ue5-main branch]
2022-07-19 09:31:09 -04:00
Ryan Schmidt
986547914e Move GeometrySelection.h and GeometrySelectionUtil.h to GeometryProcessing plugin. Move types in GeometrySelection.h into UE::Geometry:: namespace. Fix up usage sites.
#rb none
#preflight 62d1c7222e3e5993c351a126

[CL 21117964 by Ryan Schmidt in ue5-main branch]
2022-07-15 17:53:52 -04:00