Commit Graph

169 Commits

Author SHA1 Message Date
nickolas drake
d464d2ed09 PolyEdit: Add support for deleting polygroup edges
#rb semion.piskarev
#jira UE-202723

[CL 30660213 by nickolas drake in ue5-main branch]
2024-01-17 11:34:26 -05:00
semion piskarev
10ca42d775 ModelingTools: Remove unreachable ensure(false) that static analysis didn't like, and fix accidental duplicate LOCTEXT key.
#rb lonnie.li

[CL 30632993 by semion piskarev in ue5-main branch]
2024-01-16 09:54:37 -05:00
semion piskarev
3d4bf819a5 ModelingTools: Allow tools to customize the accept/cancel overlay for sub-activitites, and use this in PolyEd.
#rb lonnie.li
#jira UE-196706

[CL 30601293 by semion piskarev in ue5-main branch]
2024-01-12 15:01:55 -05:00
jimmy andrews
6ba33263bd Add support for copying collision shapes in the Create From Selected base tool, so we get this feature in the derived tools (e.g., the Merge tool, Vox Wrap, a few others).
Customize derived tools to exclude the collision from subtracted shapes.

#jira UE-182340
#rb lonnie.li

[CL 30359256 by jimmy andrews in ue5-main branch]
2023-12-15 15:50:51 -05:00
ryan schmidt
08a4212d9b fix various issues with mesh bevel. Boundary-condition normals are now computed before any meshing. DisplaceVertices() now tries to keep terminator vertex positions on existing mesh edges (this should be improved to stay on group edges, in most cases a group edge can be selected topologically, but for now just snapping to mesh edges to handle the simple lowpoly-boxy cases). Simplify/improve computation of section planes in ApplyProfileShape_Round() - in all cases except corners, the section plane is well-defined by the two inset edge points and the original vertex position. This allowed removal of PlanarizeArcNormals function. Also now handling flipped orientation of quad patch relative to edge vertex sequence.
Added more error handling inFQuadGridPatch::InitializeFromQuadPatch. Fixed property invalidating in PolyEdit bevel activity.

[CL 30356938 by ryan schmidt in ue5-main branch]
2023-12-15 14:57:40 -05:00
ryan schmidt
a86e132008 Add support for multi-segment bevels with optional round profile in MeshBevel. The new code path is completely separated from the previous code. Works OK but handling of valence-3 bevel corners (filled with a rounded triangle) could be improved.
Expose in Geometry Script and PolyEdit functions.

[CL 30280525 by ryan schmidt in ue5-main branch]
2023-12-12 17:55:33 -05:00
jimmy andrews
0b552fbb8f Rename the edit mesh polygons 'Done' UI button from 'Cancel' to 'Complete' because it often (but not always) accepts the action result
Add a comment noting that this is intentional, despite looking broken since the function calls PostAction(CancelCurrent)
#rb semion.piskarev
#jira UE-193338

[CL 30054469 by jimmy andrews in ue5-main branch]
2023-12-01 16:38:45 -05:00
marc audy
c98c8912ec Fix C4702 warnings
#rnx

[CL 29981814 by marc audy in ue5-main branch]
2023-11-29 01:06:23 -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
jimmy andrews
d3b9938342 minor modeling mode tooltip cleanup -- fix a typo in edit polygroups and add requested tooltip in vox offset
#jira UE-195518
#jira UE-179311

#rb tyson.brochu

[CL 29851325 by jimmy andrews in ue5-main branch]
2023-11-20 16:39:17 -05:00
jimmy andrews
d2f9909554 Add geometry selection api overload to tools that won't affect selection, so the modeling mode can restore any previous geometry selection after use
#jira UE-189085
#rb matija.kecman

[CL 29096961 by jimmy andrews in ue5-main branch]
2023-10-25 14:36:45 -04:00
jimmy andrews
70d6c4e96f stop primitives being placed behind the camera when user hovers/clicks the sky in any of the Add Box/Sphere/Cylinder/etc tools
#rb semion.piskarev

[CL 28779942 by jimmy andrews in ue5-main branch]
2023-10-13 19:38:47 -04:00
jimmy andrews
3c4bc91653 Make the insert edge loop tool preview edges & preview blocking-edge highlights be not depth tested, so it is easier to see where to edges go / where they fail to go
#rb tyson.brochu

[CL 27923361 by jimmy andrews in ue5-main branch]
2023-09-15 13:50:07 -04:00
jimmy andrews
cca27c2cdc Make the Modeling Tools Rounded Rectangle primitive preserve its Width/Depth by default as the Corner Radius changes. Add an option to enable the old behavior, where the Corner Radius extends beyond the Width/Depth.
#jira UE-191353
#rb rinat.abdrashitov

[CL 26791594 by jimmy andrews in ue5-main branch]
2023-08-02 18:43:44 -04:00
matija kecman
d8e6b45610 Add a reusable geometry selection visualization system intended to be used in modeling tools with minimal boilerplate
This CL was reviewed here: https://p4-swarm.epicgames.net/reviews/26051575 but needs to be merged into //Fortnite/Release-26.00, not //Fortnite/Main

#jira UE-183457
#rb ryan.schmidt, nathan.mitchell

[CL 26180658 by matija kecman in ue5-main branch]
2023-06-22 09:28:20 -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
semion piskarev
d27ea02f0c MeshModelingTools: Subdivide tool improvements dealing with meshes with open boundaries.
- Factor out "extra corner" finding code from PolyEd and add support for it in subdivide tool.
- Add support for rounded corners for mesh boundaries.
- Override subdivision scheme during tool usage rather than just at tool start, to allow extra corners to fix some issues.
- Add some clarifying comments about schemes.

#rb Jimmy.Andrews
#jira UE-185416

[CL 26011610 by semion piskarev in ue5-main branch]
2023-06-15 08:56:02 -04:00
jimmy andrews
91e21c2731 Make a larger UI range for height offset in revolve properties
#rb trivial
#preflight skip

[CL 25433716 by jimmy andrews in ue5-main branch]
2023-05-11 15:27:54 -04:00
semion piskarev
ae954c009b MeshModelingTools: Fix Nan warning in PolyExt.
#rb Jimmy.Andrews
#jira UE-182246
#preflight 644870f309453df548f604b7

[CL 25206921 by semion piskarev in ue5-main branch]
2023-04-26 16:56:54 -04:00
semion piskarev
209ed7fd71 MeshModelingTools: Fix incorrect UVs in Push/Pull activity in PolyEd.
#rb Ryan.Schmidt
#jira UE-182078
#preflight 642da40bc6769c6082eaa379

[CL 24938793 by semion piskarev in ue5-main branch]
2023-04-05 18:48:05 -04:00
jimmy andrews
86467b259c fix compile error from bad merge in UVProjectionTool.h
#rb trivial
#preflight skip

[CL 24508051 by jimmy andrews in ue5-main branch]
2023-03-03 17:10:17 -05:00
jimmy andrews
cebb9b8683 InteractiveToolsFramework: Adds new helper methods to determine count ActorComponents that match TargetRequirements and an additional test predicate for specialized scenarios. Additionally adds a couple of helper methods to test for Volume components and component classes that support UVs. This is to fix the issues surrounding the UV modeling tools that shouldn't be viable for Volume type targets.
#rb Jimmy.Andrews
#preflight 63fe5fa6dd78dd50f61b619a

#tests Local testing with UEFN build 24438442.

#ushell-cherrypick of 23533564 by nathan.mitchell

[CL 24508032 by jimmy andrews in ue5-main branch]
2023-03-03 17:09:53 -05:00
jimmy andrews
f63cdc13af Update FLocalPlanarSimplify to support simplification along straight creases in a mesh, where the sides of the crease may optionally belong to different PolyGroups
Add an edge simplification operation to the PolyEdit tool

#rb semion.piskarev
#preflight 63ee9a0f3c1eb56f055442ac

[CL 24276322 by jimmy andrews in ue5-main branch]
2023-02-16 21:55:32 -05:00
jimmy andrews
0188b696c0 Add a general-use version of the 'simplify along edges' logic from FMeshBoolean, and use it to simplify plane cuts and edge insertions
+ Update the plane cut logic to allow it to use the simplify function

#rb david.hill
#preflight 63e516ea1d3284fefe72c97a

[CL 24107250 by jimmy andrews in ue5-main branch]
2023-02-09 16:49:32 -05:00
ryan schmidt
af5699f133 ModelingTools: improve handling of invalid input selections to PolyEd Tool
Add UGeometrySelectionManager::GetActiveSelectionInfo, returns info about current selection w/o having to copy selection
Override UEditMeshPolygonsActionModeToolBuilder::CanBuildTool, use this new function to do specific per-action filtering to limit to supported input selection types
UEditMeshPolygonsSelectionModeToolBuilder::InitializeNewTool() now filters UI panels for current input selection if available, update Selection-palette PolyEd button to use this builder instead
#jira UE-176168
#preflight 63e2c886c2257e56f413b805
#rb david.hill

[CL 24068438 by ryan schmidt in ue5-main branch]
2023-02-08 01:21:37 -05:00