94 Commits

Author SHA1 Message Date
Jimmy Andrews
7096080c16 Make modeling tools set SectionInfoMaps on newly-created static meshes. This fixes downstream issues with code that expects the maps to be populated, including the Lumen card build.
#jira UE-198095
#rb David.Hill


#ushell-cherrypick of 31850438 by Jimmy.Andrews

[CL 33459468 by Jimmy Andrews in 5.4 branch]
2024-05-06 12:22:46 -04:00
jack cai
9e34e51dcf [Skeletal Mesh Editor] Third attempt to make sure UI reacts to new weight map layers being added as new Vertex Attributes
+verified that the thread safety issue due to the use of a multicast delegate from a workerthread during cook is fixed as well.

#jira UE-210085
#rb benoit.gadreau
#lockdown timothy.daoust

[CL 32540242 by jack cai in 5.4 branch]
2024-03-27 08:02:58 -04:00
justin peterson
7f9213ea9a [Backout] - CL32415082 - Build Cook Error
[FYI] jack.cai
Original CL Desc
-----------------------------------------------------------------
[Skeletal Mesh Editor] second try to make sure UI reacts to new weight map layers being added as new Vertex Attributes
+verified that the thread safety issue due to the use of a multicast delegate from a workerthread during cook is fixed as well.

#jira UE-210085
#rb benoit.gadreau

[CL 32510102 by justin peterson in 5.4 branch]
2024-03-26 11:23:50 -04:00
jack cai
cf5a679db6 [Skeletal Mesh Editor] second try to make sure UI reacts to new weight map layers being added as new Vertex Attributes
+verified that the thread safety issue due to the use of a multicast delegate from a workerthread during cook is fixed as well.

#jira UE-210085
#rb benoit.gadreau

[CL 32509756 by jack cai in 5.4 branch]
2024-03-26 11:16:23 -04:00
keaton stewart
54db3bc38a [Backout] - CL32368829
[FYI] jack.cai
Original CL Desc
-----------------------------------------------------------------
[Skeletal Mesh Editor] Making sure UI reacts to new weight map layers being added as new Vertex Attributes

#jira UE-210085
#rb benoit.gadreau

[CL 32500093 by keaton stewart in 5.4 branch]
2024-03-26 02:51:09 -04:00
jack cai
20fbefe350 [Skeletal Mesh Editor] Making sure UI reacts to new weight map layers being added as new Vertex Attributes
#jira UE-210085
#rb benoit.gadreau

[CL 32500000 by jack cai in 5.4 branch]
2024-03-26 02:48:18 -04:00
lonnie li
ebfa580566 Explicit mark dirty to Modify for Brush, Poly, and Model.
This change restores the behavior prior to the change to the default argument of the Modify function of (Brush, Poly, and Model) from false to true.

#rb Jimmy.Andrews
#jira UE-205335

#ushell-cherrypick of 30989122 by Marc.Audy

[CL 31500770 by lonnie li in 5.4 branch]
2024-02-14 18:48:58 -05:00
halfdan ingvarsson
b692d6e175 Skeletal Mesh: Change the import storage to use FMeshDescription instead of FSkeletalMeshImportData. This includes deprecating the USkeletalMesh::LoadLODImportedData and friends, in lieu of an API more similar to the one on UStaticMesh (GetMeshDescription/CommitMeshDescription/etc).
#jira UE-166343
#rb Alexis.Matte, benoit.gadreau, john.vanderburg

[CL 30711382 by halfdan ingvarsson in ue5-main branch]
2024-01-19 00:37:06 -05:00
jimmy andrews
723fd517f1 make staticmeshtooltarget and staticmeshcomponenttooltarget handle buildscale on static mesh <-> mesh description conversions, so tools using these targets will show correctly-scaled meshes
#rb David.Hill

[CL 30193994 by jimmy andrews in ue5-main branch]
2023-12-07 17:38:34 -05:00
jimmy andrews
1e48d7a222 handle build scale for static meshes in the static mesh selector
#rb David.Hill

[CL 30193571 by jimmy andrews in ue5-main branch]
2023-12-07 17:00:00 -05:00
jimmy andrews
0b02d04d2b add a default-enabled option to remove degenerate triangles during dynamic mesh -> volume conversion, to make volume creation more likely to create valid BSP geometry that works for collisions. This fixes the collision for the modeling mode cone and arrow primitives when they are created as blocking volumes.
#rb rinat.abdrashitov
#jira UE-201659

[CL 30047481 by jimmy andrews in ue5-main branch]
2023-12-01 13:47:26 -05:00
roey borsteinas
e168d21835 Exposed a new property bIsEditable on UDynamicMeshComponent to allow them to block any modifications done through EditMesh/SetMesh. Additionally, when this flag is set to false, the UDynamicMeshToolTarget is blocked from being created for the dynamic mesh component so modeling tools can't edit the mesh either.
#rb Ryan.Schmidt

[CL 29959323 by roey borsteinas in ue5-main branch]
2023-11-28 09:50:36 -05:00
nickolas drake
5b4f2d0acc PatternTool: Fixed a bug causing the tool to not emit any actors when a normal StaticMeshActor is used. Now the tool properly emits FortStaticMeshActors.
#rb Jimmy.Andrews

[CL 29815558 by nickolas drake in ue5-main branch]
2023-11-17 14:00:58 -05:00
jimmy andrews
7e50f1b82d add option to request tangents to the dynamic mesh provider, with custom implementations for targets that go through the mesh description (so we'll use the standard tangent compute paths in those cases)
#rb ryan.schmidt

[CL 29416384 by jimmy andrews in ue5-main branch]
2023-11-03 14:59:41 -04:00
lonnie li
c985b2ef68 ModelingTools: Fixed crash in UEFN when reloading a level after using the Modeling Tools with Mesh Element Selection.
#rb jimmy.andrews

[CL 27739312 by lonnie li in ue5-main branch]
2023-09-09 14:50:19 -04:00
nickolas drake
69b3faf248 EditorModelingObjectsCreationAPI: Fix crash due to nullptr dereference on accepting the Pattern Tool.
#rb lonnie.li
#jira UE-189185

[CL 26589052 by nickolas drake in ue5-main branch]
2023-07-25 17:15:27 -04:00
jimmy andrews
2dfc556b22 Make the SubdividePoly operation not crash on failures to add triangles to the output mesh (which can happen if the output would be non-manifold).
Make the SubdividePolyTool only consider adding extra corner vertices on polygroup edges when the corner vertex would be on a mesh boundary; otherwise, the subdivision would try to create a non-manifold edge.

#jira UE-190468
#rb tyson.brochu

[CL 26484659 by jimmy andrews in ue5-main branch]
2023-07-20 09:42:11 -04:00
rinat abdrashitov
b0e1560231 -GeometryScript: When creating a new SkeletaMesh asset, provide an option to use the bone attributes of the dynamic mesh to set the reference skeleton of the skeletal mesh.
-Added a convenience function for getting an array of bone names from a reference skeleton.
-Added MeshBones.h/cpp that contain utility functions to deal with dynamic mesh bone attributes

#rb halfdan.ingvarsson

[CL 26233377 by rinat abdrashitov in ue5-main branch]
2023-06-26 10:17:13 -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
Jimmy Andrews
a2ecbc38bf Update modeling components usage of opensubdiv to allow max/unix targets, since our OpenSubdiv pre-built libraries now also support these targets
#jira UE-186825
#rb ryan.schmidt

[CL 26016527 by Jimmy Andrews in ue5-main branch]
2023-06-15 11:41:45 -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
semion piskarev
c9de10f9cf MeshModelingTools: Various volume conversion fixes:
- Fix conversion sometimes making degenerate tris and firing an ensure.
- Fix volume conversion sometimes creating cracks in volumes when dealing with non-convex faces (by deleting necessary colinear verts)
- Make simplification preserve group boundaries when asked.
- Remove colinear verts along group boundaries without losing boundaries when preserving groups.
- Break up faces that have holes into convexes rather than emitting per-triangle faces.
- Make mesh to volume tool use same path for conversion as tool targets, and add controls for preserving groups and simplifying
- Revert to ear clipping if delaunay triangulation fails in converting back from volume

#rb Jimmy.Andrews
#jira UE-173272, UE-152032
#prelfight 6470ccbf5b1dc793b715d66b

[CL 26002669 by semion piskarev in ue5-main branch]
2023-06-14 23:43:43 -04:00
nickolas drake
a97a2b32d4 ModelingToolset: Make Pattern Tool emit correct actors using a new CreateNewActor function.
Added a CreateNewActor function to EditorModelingObjectsCreationAPI which finds a factory capable of producing actors of the same type as a provided template actor to create the new actor without needing to create entirely new assets as would have been necessary with the existing functions in EditorModelingObjectsCreationAPI.

#rb lonnie.li

[CL 25963642 by nickolas drake in ue5-main branch]
2023-06-13 17:05:45 -04:00
matija kecman
ae026188f8 Render Capture Baking: Make BakeRC tool output a new material configured with the generated textures
This change also extends UModelingObjectsCreationAPI to support materials by duplicating a given material

#rb ryan.schmidt
#jira UE-182349
#preflight 6467649a573c1da15838e005

[CL 25548119 by matija kecman in ue5-main branch]
2023-05-19 13:50:08 -04:00
ryan schmidt
4061f31c7c ModelingTools: Add IMeshDescriptionProvider::GetMeshDescriptionLOD() which returns current LOD for a ToolTarget. Implement in StaticMesh Tool Targets. Add UE::ToolTarget::GetTargetMeshDescriptionLOD() which wraps this function
#rb jimmy.andrews
#preflight 646631103660522200164f0c

[CL 25529470 by ryan schmidt in ue5-main branch]
2023-05-18 13:52:35 -04:00