Commit Graph

20 Commits

Author SHA1 Message Date
nathan mitchell
eec5c6c119 Modeling Mode: Fix issue where weightmaps are loaded with invalid values for a target when tools' settings are loaded with a preset.
#rb Jimmy.Andrews
#jira UE-188052

[CL 26590929 by nathan mitchell in ue5-main branch]
2023-07-25 17:57:32 -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
jimmy andrews
5337719d2e Fix vox offset tool issues:
- Warn about artifacts on meshes with open boundaries
 - Fix some settings not being saved/restored
 - Fix transaction name on undo/redo not matching the tool name

Also: Make the asset warning for base interactive tool only clear the tool's display message if it set a display message when it was last called, so that it is less likely to clear unrelated display messages when called with no warning to display.

#jira UE-180838
#jira UE-180758
#jira UE-180838
#rb rinat.abdrashitov
#preflight 641be32f25389270b7300ae4

[CL 24783364 by jimmy andrews in ue5-main branch]
2023-03-24 14:05:46 -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
0e4ddc8e1a ModelingTools: add new modeling-mode Tool/Operator for extruding Mesh Selections
Add UE::ToolTarget::SupportsIncrementalMeshChanges() and ::ApplyIncrementalMeshEditChange(), these allow a Tool to directly edit a DynamicMeshComponent in the level (and emit corresponding MeshChange) so that a Tool can emit multiple undoable edits on a DynamicMesh
Add new USingleTargetWithSelectionTool base tool class, this is a USingleSelectionTool that can receive a FGeometrySelection. USingleTargetWithSelectionToolBuilder configures this type of Tool as necessary.
Add new LinearExtrusionOp dynamic mesh operator, provides linear-extrusion API to FOffsetMeshRegion using new Operator design (mesh shared via FSharedConstDynamicMesh3, CalculateResultInPlace() function to simplify direct usage in geometry script/etc)
Add new ExtrudeMeshSelectionTool, subclass of USingleTargetWithSelectionTool, exposes new LinearExtrusionOp, uses above ToolTarget functions to directly edit DynamicMeshComponent where possible
Enable new Tool in Modeling Mode

Add a few new functions to UMeshOpPreviewWithBackgroundCompute to simplify configuring InProgress and Secondary materials
Small additions to USingleSelectionTool

#preflight 639a3e250a671525500d8a7e
#rb none

[CL 23520421 by ryan schmidt in ue5-main branch]
2022-12-14 17:43:16 -05:00
henrik karlsson
4a5e13525d Fixed non-unity non-pch compile errors
#preflight skipped
#rb none

[CL 22788359 by henrik karlsson in ue5-main branch]
2022-10-26 16:22:34 -04:00
jimmy andrews
4b2210d53f Fix missing transform back to world space in single-selection case for BaseCreateFromSelected tools (Merge, VoxWrap, VoxMorph)
#jira UE-166171
#preflight 63408ddd437603cb0e439934
#rb rinat.abdrashitov
#rb tyson.brochu

[CL 22424949 by jimmy andrews in ue5-main branch]
2022-10-09 23:35:03 -04:00
bryan sefcik
50d4fac9e0 Updated ../Engine/Plugins/... to inline gen.cpp files
Before:
3548 unity files
Total CPU Time: 47343.578125 s
Total time in Parallel executor: 494.60 seconds

After:
3445 unity files
Total CPU Time: 46044.671875 s
Total time in Parallel executor: 468.51 seconds

#jira
#preflight 63336159b20e73a098b7f24f

[CL 22218213 by bryan sefcik in ue5-main branch]
2022-09-28 01:06:15 -04:00
Jimmy Andrews
3f0fdaddb4 When applying MeshTransforms' transform and transforminverse, generally pass bReverseOrientationIfNeeded=true
(+ for code that was passing false then manually applying the same logic, remove the extra reverse orientation logic)

#rb david.hill
#preflight 630d245fe352708d44f9e007

[CL 21706500 by Jimmy Andrews in ue5-main branch]
2022-08-30 14:40:56 -04:00
Jimmy Andrews
10153ffb90 Deprecate TTransformSRT3::Inverse() and attempt to fix usages of it and also FTransform::Inverse() in the modeling code
#rb david.hill
#preflight 627d2b99a82f3adab87fb87f

[CL 20165573 by Jimmy Andrews in ue5-main branch]
2022-05-12 12:08:26 -04:00
ryan schmidt
6ad26b69f0 rename UE::Geometry::TTransform3 to TTransformSRT3, update references
#rb none
#rnx
#jira UE-139757
#preflight 61f572d9e52a8a4a910990f1

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18784197 in //UE5/Release-5.0/... via CL 18784203 via CL 18784222
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18784226 by ryan schmidt in ue5-main branch]
2022-01-29 14:37:53 -05:00
lonnie li
4afd669dcb ModelingTools: Clear TargetWorld member during Shutdown of SingleSelectionMeshEditingTool and MultiSelectionMeshEditingTool
#rb ryan.schmidt michael.balzer
#rnx
#jira none
#preflight 61f435dd74510448a6865d14

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18777332 in //UE5/Release-5.0/... via CL 18780413 via CL 18780555
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18780558 by lonnie li in ue5-main branch]
2022-01-28 18:40:54 -05:00
lonnie li
e1c7ca927e Fix non-unity error in SingleSelectionMeshEditingTool & MultiSelectionMeshEditingTool
#rb trivial
#rnx
#jira none
#preflight 61f421f76b5aea38e5bd90fb

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18773159 in //UE5/Release-5.0/... via CL 18773298 via CL 18773779
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18773785 by lonnie li in ue5-main branch]
2022-01-28 12:44:22 -05:00
lonnie li
d041f2273b ModelingTools: Fix crash when reloading levels during an AutoLOD compute
#rb ryan.schmidt
#rnx
#jira UE-139485
#preflight 61f38478da54035207ecae9b

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18771194 in //UE5/Release-5.0/... via CL 18771204 via CL 18771302
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18771314 by lonnie li in ue5-main branch]
2022-01-28 10:18:10 -05:00
ryan schmidt
17cefb1dd1 ModelingTools:
Reduce surface area of MeshDescriptionProvider/Committer, replace with UE::ToolTarget:: calls where possible.

Add new UE::ToolTarget::CommitMeshDescriptionUpdateViaDynamicMesh() function. This is being used for now to avoid potential regressions as UE::ToolTarget::CommitDynamicMeshUpdate will preferentially use DynamicMeshCommitter, and I am not certain it is functionally equivalent in all cases.
Add new UE::ToolTarget::CommitDynamicMeshNormalsUpdate(), similar to existing UV version
Add new Move-variant of UE::ToolTarget::CommitMeshDescriptionUpdate(), uses new Move-variant of IMeshDescriptionCommitter::CommitMeshDescription.
Make existing IMeshDescriptionCommitter::CommitMeshDescription callback interface protected, to prevent usage of this function at public API level (will be removed in future).

Tool updates should not change, just using cleaner APIs.
EditNormalsTool now uses CommitDynamicMeshNormalsUpdate(), which does go via DynamicMeshCommitter preferentially, where it previously went via MeshDescriptionCommitter. In light testing the results appear equivalent.
AttributeEditorTool now operates on MeshDescription copies in various update functions. These are not performance-critical.

#rb rinat.abdrashitov
#rnx
#preflight 61ae45998358693a22c28d1b

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18384350 in //UE5/Release-5.0/... via CL 18384361
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18384373 by ryan schmidt in ue5-release-engine-test branch]
2021-12-06 12:42:19 -05:00
lonnie li
2972827a94 ModelingTools: Fix CIS break with BaseCreateFromSelectedTool.
#rb trivial
#rnx

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18278314 in //UE5/Release-5.0/... via CL 18278329
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18278343 by lonnie li in ue5-release-engine-test branch]
2021-11-23 19:17:30 -05:00
lonnie li
6584198283 InteractiveToolsFramework: Remove unnecessary target interface functions from MultiSelectionTool.
ModelingTools: Add UMultiSelectionMeshEditingTool to hold common interface requirements and functions that pertain to modeling mode MultiSelectionTools.

#rb semion.piskarev
#rnx
#jira none
#preflight 619c66d5c3287aab27e12c73

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18269697 in //UE5/Release-5.0/... via CL 18269713
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18269717 by lonnie li in ue5-release-engine-test branch]
2021-11-23 09:42:40 -05:00
lonnie li
e08222e97a InteractiveToolFramework: Remove unnecessary tool target interface requirements for MeshSurfacePointTool.
ModelingTools: Add MeshSurfacePointMeshEditingToolBuilder with common mesh editing requirements.
Update MeshSurfacePointTool modeling tools to use MeshSurfacePointMeshEditingToolBuilder

#rb semion.piskarev
#rnx
#jira none
#preflight 6196d1bbb22f9e02b57b7438

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18269233 in //UE5/Release-5.0/... via CL 18269267
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18269272 by lonnie li in ue5-release-engine-test branch]
2021-11-23 08:55:40 -05:00
michael balzer
18526b3ec0 MeshModelingToolset: Cleanup Boolean tool
#rb jimmy.andrews
#preflight 617c9cd80451f40001ed06a7

#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 17991436 in //UE5/Release-5.0/... via CL 17991437
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17991438 by michael balzer in ue5-release-engine-test branch]
2021-10-29 22:42:08 -04:00
michael balzer
a49c74b915 MeshModelingToolset: Move ModelingOperators and ModelingOperatorsEditorOnly modules out of experimental plugin
#jira UETOOL-3823
#rb lonnie.li
#preflight 617b1aea5794a500014f544a

#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 17972239 in //UE5/Release-5.0/... via CL 17972248
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17972256 by michael balzer in ue5-release-engine-test branch]
2021-10-28 19:47:45 -04:00