Commit Graph

121 Commits

Author SHA1 Message Date
Ryan Schmidt
b02f4829db ModelingTools: DynamicMeshActor support Tools and Settings.
- Move UCreateMeshObjectTypeProperties to ModelingComponents and update all include sites
- Added Editor Modeling Mode settings to Enable/Disable showing DynamicMeshActor creation options, and select default mesh object type. Removed CVarEnableDynamicMeshActors.
- Added optional 'Auto' output mesh type to UCreateMeshObjectTypeProperties. This can be used in Tools that have input objects and want to allow optional conversion, but default to 'just use input mesh object type'.
- Added ConvertMeshesTool, this does in-place conversion between Mesh Object types for a set of selected objects (Duplicate tool can also do this, but only for a single object, and functionality is expected to further diverge)
- Added SplitMeshesTool, decomposes a mesh into parts and creates a new output object for each part
- CombineMeshesTool now supports variable output object type. Cleaned up internals.

#rb none
#rnx
#jira none
#preflight 60d3bc76b4bb42000195eccf

[CL 16768010 by Ryan Schmidt in ue5-main branch]
2021-06-23 22:13:32 -04:00
Ryan Schmidt
34e50c3aa1 GeometryFramework: move UDynamicMesh and DynamicMeshComponent to new Runtime/Experimental/GeometryFramework module
#rb none
#rnx
#jira none
#preflight 60d16e6ca81904000135e6d4

[CL 16744295 by Ryan Schmidt in ue5-main branch]
2021-06-22 12:10:24 -04:00
Ryan Schmidt
6497a53181 ModelingComponents: Add DynamicMeshActor
- ADynamicMeshActor type has a UDynamicMeshComponent subobject (similar to StaticMeshActor)
- Add IPersistentDynamicMeshSource, a ToolTarget Interface for accessing a UDynamicMesh
- Add UDynamicMeshComponentToolTarget, a UToolTarget implementing the above as well as various standard interfaces, to allow Tools to operate on an external DynamicMeshComponent
- Update UE::ToolTarget:: helper functions that get/commit via DynamicMesh to handle IPersistentDynamicMeshSource directly, instead of going via existing MeshDescription/DynamicMesh interfaces. Add UE::ToolTarget::SetSourceObjectVisible() helper function.
- Add support for creating DynamicMeshActors in UCreateMeshObjectTypeProperties and UEditorModelingObjectsCreationAPI
- register UDynamicMeshComponentToolTargetFactory in ModelingToolsEditorMode
- Rename existing internal ADynamicMeshActor to AOldDynamicMeshActor. Does not appear to be in use and will be removed in a future CL.

#rb lonnie.li
#rnx
#jira none
#preflight 60d0effc367e6700014c2e89

[CL 16735093 by Ryan Schmidt in ue5-main branch]
2021-06-21 18:08:56 -04:00
Ryan Schmidt
52ab1f5537 ModelingTools: Clean up AutoUV Tools and add support for Polygroup Layers.
- Refactor recompute-UVs-for-groups/islands out of ParameterizeMeshOp/Tool into RecomputeUVsOp/Tool. RecomputeUVsTool supports selection of active PolygroupLayer when applicable. Add support for auto-repacking.
- Clean up ParameterizeMeshOp/Tool, remove functionality related to recomputation that was moved to Recompute tool, add separate property sets for UVAtlas and XAtlas
- Add FDynamicMeshUVEditor::QuickPack() function to compute UV layout
- Add support for Polygroup Layer selection in SetCollisionGeometryTool, if only one source object is in use

#rb none
#rnx
#jira none
#preflight 60ced4b0be81e800012cc135

[CL 16724375 by Ryan Schmidt in ue5-main branch]
2021-06-20 16:57:02 -04:00
Ryan Schmidt
7a9ef88f48 ToolsFramework: Add UEdModeInteractiveToolsContext::SetEnableRenderingDuringHitProxyPass() to allow ITF clients to enable/disable hitproxy rendering. Default to enabled as it is expected that most existing FEdModes/etc are using hitproxy. Disable in ModelingMode because we don't want hitproxy rendering there.
#rb brooke.hubert
#rnx
#jira none
#preflight 60ce358e1f30ee00017cab85

[CL 16723013 by Ryan Schmidt in ue5-main branch]
2021-06-19 18:14:33 -04:00
michael balzer
0090b1089d MeshModelingTools: UETOOL-3595 Migrate Tool Usage Analytics to UE5
[CL 16696413 by michael balzer in ue5-main branch]
2021-06-16 17:11:12 -04:00
Ryan Schmidt
da355de8a2 ModelingTools: Add basic Transfer Mesh Tool that can copy a mesh from one object to another. Add UE::ToolTarget::CommitMeshDescriptionUpdate() helper function.
#rb none
#rnx
#jira none
#preflight 60bf147e0c76f90001db699e

[CL 16583974 by Ryan Schmidt in ue5-main branch]
2021-06-08 03:51:23 -04:00
Ryan Schmidt
75a21c9bb9 ModelingTools: add support for creating Volumes directly from DrawPolygon, DrawRevolve, DrawPolyPath, and AddPrimitive, CombineMeshes, CutMeshWithMesh, PlaneCut, BaseCreateFromSelected Tools. Improve support for Editing volumes, eg handling mesh/volume interactions, and add configurable auto-simplification for volumes to avoid painful Editor hangs.
- Move ToolTarget implementations, DynamicMeshToVolume to ModelingComponentsEditorOnly module
- move VolumeToDynamicMesh, DynamicMeshProvider/Commiter interfaces to ModelingComponents module
- Add UCreateMeshObjectTypeProperties property set to expose mesh/volume options
- Add FCreateMeshObjectParams::TypeHintClass to allow AVolume type (or other UClass hints) to be passed to creation APIs
- Add UE::ToolTarget::ConfigureCreateMeshObjectParams() util function in ModelingToolTargetUtil, tries to determine output type in a FCreateMeshObjectParams based on input ToolTarget
- Add UEditorModelingObjectsCreationAPI::CreateVolume() implementation
- Add UEditorModelingObjectsCreationAPI::FilterMaterials() that strips out any internal materials and replaces with WorldGridMaterial. This occurs when (eg) subtracting a Volume from a StaticMesh, because the temporary volume mesh gets assigned internal materials, but the Tools don't know this. Use in EditorModelingObjectsCreationAPI when creating new objects. UStaticMeshComponentToolTarget also does this filtering in ::CommitMaterialSetUpdate().
- Add ::ComponentTypeSupportsCollision() function to ComponentCollisionUtil, use to avoid checks/ensures for Volume targets
- Add support for automatic mesh simplification in DynamicMeshToVolume. Add CVar to VolumeDynamicMeshToolTarget.h to control max triangle count (default 500). Apply auto-simplify when creating or updating an AVolume. This prevents the Editor from blocking for long periods on meshes that are too high-res for volumes (even 500 is quite high).
- DynamicMeshToVolume now emits polygroup-faces that contain holes (ie multiple boundary loops) as a set of triangles, rather than emitting separate overlapping faces for each boundary loop

#rb none
#rnx
#jira none
#preflight 60ba50632c42ea0001cb54c5

[CL 16561742 by Ryan Schmidt in ue5-main branch]
2021-06-04 16:04:03 -04:00
Ryan Schmidt
489dbc61c7 ToolsFramework: remove the AssetAPI concept from the Interactive Tools Framework. Replaced by ModelingObjectCreationAPI in ModelingComponents.
#rb none
#rnx
#jira none
#preflight 60b7e9448a2a64000126348c
#fyi brooke.hubert

[CL 16540327 by Ryan Schmidt in ue5-main branch]
2021-06-02 18:01:32 -04:00
Ryan Schmidt
7b214c4a33 MeshModeling: add ModelingObjectsCreationAPI, replaces existing usage of IToolsContextAssetAPI in Modeling Tools/Mode
- add new UModelingObjectsCreationAPI and associated data structures, provides abstract API for creating mesh and texture objects from Tools that is not specifically tied to StaticMesh Actors/Assets
- new helper functions in UE::Modeling:: namespace to simplify usage of an implementation of this API registered in a ContextObjectStore
- add new UEditorModelingObjectsCreationAPI implementation of above, supports hooks for higher level to provide custom paths
- add ModelingModeAssetUtils.h, provides several functions in UE::Modeling:: namespace to be used to implement those hooks (various existing path-determination code is moved here)
- ModelingToolsEditorMode now registers an instance of UEditorModelingObjectsCreationAPI in ContextObjectStore and connects up callbacks to these path functions
- AssetGenerationUtil functions and ModelingModeAssetAPI deleted
- All Tools that previously used IToolsContextAssetAPI updated to use this new system

#rb jimmy.andrews
#rnx
#jira none
#preflight 60b7c2ddae46a1000162729b

[CL 16538450 by Ryan Schmidt in ue5-main branch]
2021-06-02 15:58:00 -04:00
Ryan Schmidt
7a93eace02 ToolsFramework: add register and unregister helper functions to TransformGizmoUtil, to facilitate EdModes sharing the context object
#rb jimmy.andrews
#rnx
#jira none
#preflight 60b013ebb60e930001239ae5

[CL 16493585 by Ryan Schmidt in ue5-main branch]
2021-05-27 19:09:12 -04:00
halfdan ingvarsson
a1f453c403 Add a new icon for the skin weights paint tool.
#jira UE-101568
#rb none
#rnx

[CL 16472967 by halfdan ingvarsson in ue5-main branch]
2021-05-26 14:37:42 -04:00
Ryan Schmidt
4ec1b6ae3c Gizmos: refactor Modeling Mode gizmo creation out of InteractiveGizmoManager. Editor will use other "default" transform gizmo implementations, and so the UTransformGizmo creation helper functions do not belong in GizmoManager. Instead a UTransformGizmoContextObject now provides this functionality. ModelingToolsEditorMode (and any other modes/systems that want to use these gizmo convenience functions) creates an instance of UTransformGizmoContextObject and registers it with the ContextObjectStore. Calling code can spawn a new UTransformGizmo by looking this object up in the ContextStore and calling it's helper functions. Static versions of the helper functions in the UE::TransformGizmoUtil:: namespace provide a single-line interface that replaces the previous GizmoManager call sites in the MeshModelingTools library.
IntervalGizmo is now just registered and unregistered as needed by the MeshSpaceDeformerTool, as this is the only place it is currently used.

Previous implementation in InteractiveGizmoManager is left intact as there are a few uses outside of MeshModelingTools that need to be cleaned up before it can be deleted.

UTransformGizmo now requires it's Builder to tell it which sub-gizmo identifier strings to pass to the GizmoManager to create axis/plane/rotation sub-gizmos (and the code that registers the Builder must then provide these strings). This cleans up previous explicit references to UInteractiveGizmoManager static strings from UTransformGizmo.

#rb Christina.TempelaarL, david.hill
#rnx
#jira none

[CL 16409673 by Ryan Schmidt in ue5-main branch]
2021-05-20 16:39:39 -04:00
halfdan ingvarsson
2a61423f30 Simple skin binding tool. Supports closest distance and geodesic voxel skinning methods.
#jira UE-93689
#preflight 60a473704c32030001eae3b2

[CL 16380959 by halfdan ingvarsson in ue5-main branch]
2021-05-18 23:23:00 -04:00
halfdan ingvarsson
7e6645e305 A primitive skin weights paint tool for skeletal meshes.
#jira UE-93689
#rb ryan.schmidt
#preflight 60942eeb4a6341000184add9

[CL 16321464 by halfdan ingvarsson in ue5-main branch]
2021-05-13 19:06:22 -04:00
semion piskarev
b999806285 MeshModelingTools: Add DynamicMesh provider/committer interfaces and update existing targets to support them. Move interface target files.
#rb Lonnie.Li
#rnx
#jira none

[CL 16315070 by semion piskarev in ue5-main branch]
2021-05-13 13:22:55 -04:00
Ryan Schmidt
c0ba0d5235 ModelingMode: Add support for selection-focus and point-focus at Tool level.
- New UInteractiveToolCameraFocusAPI UInterface defines functions a Tool can implement to publish its ability to provide a focus-box and focus-point
- ModelingMode uses this API to customize behavior. Box-focus (f hotkey) will now always focus on Tool-provided focus-box if available. Point-focus (c hotkey) will focus on nearer of world-hit and Tool focus-point.
- Default implementations for PrimitiveComponentToolTarget in SingleSelectionTool and MultiSelectionTool
- Custom focus-box implementations for PolyEdit-derived and TriSelect-derived tools, to focus on active selection if available
- Custom focus-point implementations for MeshSurfacePointTool

#rnx
#jira none

[CL 16246252 by Ryan Schmidt in ue5-main branch]
2021-05-10 01:17:30 -04:00
Ryan Schmidt
bca2b32ac7 ModeingMode: restore EditingLOD functionality lost in ToolTarget transition. Port EditingLOD functionality from FStaticMeshComponentTarget/Factory to UStaticMeshComponentToolTarget/Factory. Add UToolTargetManager::FindFirstFactoryByPredicate() and FindFirstFactoryByType(). ModelingToolsEditorModeToolkit now also looks up the StaticMeshFactory and updates the EditingLOD when it changes in the UI.
EStaticMeshEditingLOD enum moved to ComponentSourceInterfaces.h to make it more widely available.

Add ToolBuilderUtil::EnumerateComponents() and ToolTargetManager::EnumerateSelectedAndTargetableComponents(), this allows ToolBuilders to do additional checks on the valid Targets without having to make local arrays/etc. Fix SetCollisionGeometryTool to not build ToolTargets every frame just to check if one is a StaticMeshComponent.

#rb lonnie.li
#rnx
#jira none
#preflight 6092e932242f6600012445b0

[CL 16213180 by Ryan Schmidt in ue5-main branch]
2021-05-05 16:43:24 -04:00
semion piskarev
773ecfbb6a MeshModelingTools: Allow programmatic changes to properties to update detail panel properly.
#rb Lonnie.Li
#rnx
#jira UE-103980, UE-101251, UE-96691

[CL 16127920 by semion piskarev in ue5-main branch]
2021-04-27 11:06:18 -04:00
Jimmy Andrews
aa12ad308c Copy the separate asset and component materials from the source mesh to the new assets generated by plane cut tool (+ generally support creating an asset with separate component and asset materials)
#jira UE-110096
#rb tyson.brochu
#rnx
#preflight 6075fefa8c3f7700019357cc

[CL 15995092 by Jimmy Andrews in ue5-main branch]
2021-04-13 17:15:34 -04:00
ryan schmidt
a5536f2855 ModelingMode: add support for extending ModelingMode with additional Tools based on IModularFeature framework. Tool Extensions appear in tool icons panel in extra sections below the standard sections, currently adding to default Sections is not supported.
#rb none
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 15919105 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15921202 by ryan schmidt in ue5-main branch]
2021-04-05 15:05:14 -04:00
brooke hubert
b7a9e11206 Split legacy viewport input handling from UEdMode.
Move potentially duplicated work (like bracket draws) to the mode manager. Input and drawing of mode specifics should be handled going forward by ITF tools and gizmos in the modes.

#rnx
#preflight 605c1a397f873d0001c5c66a
#Jira UE-103651
#rb lauren.barnes

[CL 15851576 by brooke hubert in ue5-main branch]
2021-03-29 11:32:25 -04:00
ryan schmidt
ecb7ea7acb ModelingMode: update Cut Mesh With Mesh tool icon
#rb none
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 15833149 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v785-15821902)

[CL 15834681 by ryan schmidt in ue5-main branch]
2021-03-25 18:52:32 -04:00
lonnie li
71d5092007 ModelingTools: Refactor SingleSelectionTool to ToolTargets (pt.2)
#rb ryan.schmidt jimmy.andrews
#jira none
#rnx
#preflight 605a54c0e8944a0001585162

[CL 15799514 by lonnie li in ue5-main branch]
2021-03-24 11:11:02 -04:00
ryan schmidt
eea49d778c ModelingTools: add CutMeshWithMesh Tool
#rb none
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 15752450 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)

[CL 15758524 by ryan schmidt in ue5-main branch]
2021-03-22 08:32:17 -04:00