+ 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]
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]
+ 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]
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]
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]
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]