* Reverted the changes in 25904929 related to subclasses to TCommands<>.
This code relies on undefined behavior of how things are inlined. base class is a template with a static variable. One instance of that static variable exists in each dll/exe. To call TCommands<>::Get() would return the instance in the same dll.
But, because the subclass has dllexport on the type and not the members it will generate a Get function that is not inlined. The callsite when calling Get will actually then use the instantiated Get() function and not the inlined one.
So for
class API X : public TCommands<X> {}
it will (for now) work to call
X::Get() and get the same instantiated singletone.
Calling
TCommands<X>::Get() will definitely not work and return the singleton instantiated in the same dll/exe
#rb none
[CL 25909947 by henrik karlsson in ue5-main branch]
Fix a crash in some asset editors when you force deleted an asset with pending changes and hit "cancel" on the save dialog
#jira UE-107248
#preflight 64517c880e33f2d51d6e3adb
[CL 25321878 by aditya ravichandran in ue5-main branch]
Moved Math forward declarations from CoreFwd.h to Math/MathFwd.h
#rb steve.robb
#preflight 62837df43c1cdc59e2b07dd5
[CL 20240602 by Andrew Davidson in ue5-main branch]
Add new MeshTargetInterfaceTypes.h file, move EStaticMeshEditingLOD there and rename to EMeshLODIdentifier. Add FGetMeshParameters and FCommitMeshParameters types.
IMeshDescriptionProvider::GetMeshDescription() now takes FGetMeshParameters to optionally specify LOD.
Added IMeshDescriptionProvider::GetMeshDescriptionCopy() function, to handle copy-case.
removed IMeshDescriptionProvider::CalculateAutoGeneratedAttributes(). This was only being used to force Tangents computation, which can now be done via GetMeshDescriptionCopy() and FGetMeshParameters.bWantMeshTangents option
IMeshDescriptionCommitter commit functions now take a FCommitMeshParameters to optionally specify target LOD.
StaticMeshComponentToolTarget::GetMeshDescriptionCopy() added, optionally computes auto-generated MeshDescription attributes on the copy
StaticMesh(Component)ToolTarget updated to support FCommitMeshParameters target-LOD.
SkeletalMesh, Volume, and DynamicMesh ToolTargets updated for new APIs but do not currently support any of the new LOD parameters. These should never be called w/ LOD parameters in the current codebase, ensures added to catch any errors (they would be non-fatal).
UE::ToolTarget::GetMeshDescription() and GetMeshDescriptionCopy() in now take FGetMeshParameters argument.
Removed bWantMeshTangents param to GetMeshDescriptionCopy(), now done via FGetMeshParameters. Updated call sites.
TransferMeshesTool now supports specifying read and write LOD (numbered or HiRes) for StaticMeshComponent source/target, via above functions.
TransferMeshesTool can now also target a new LOD in a StaticMeshComponent, index is 1 larger than current maximum source LOD.
#rb lonnie.li, rinat.abdrashitov
#rnx
#jira none
#preflight 61b8d56b2e65a1df046aa5e1
#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18461686 in //UE5/Release-5.0/... via CL 18461725
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)
[CL 18461778 by ryan schmidt in ue5-release-engine-test branch]
- Guard against legacy mode getting GCed while Deactivating modes
- ForEachMode iterates over array copy in case original array is modified while iterating
- New IsSelectionDisallowed virtual allows mode to refuse selection of actor regardless of other modes
#rb brooke.hubert, lauren.barnes, julien.stjean
#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 18311266 in //UE5/Release-5.0/... via CL 18311467
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18311589 by patrick enfedaque in ue5-release-engine-test branch]
- rename UEdModeInteractiveToolsContext to UEditorInteractiveToolsContext, made all functions virtual so they can be customized for the new Editor/EdMode implementations where necessary
- add UModeManagerInteractiveToolsContext and UEdModeInteractiveToolsContext subclasses. Most functionality stays in the base class. Mouse-handling functions that manipulate the InputRouter move to ModeManagerITC.
- EdModeITC now is initialized based on a ModeManagerITC, and shares it's InputRouter
- ModeManagerITC creates the child EdModeITCs, forwards Tick/Render/DrawHUD calls
- FEditorModeTools now creates a ModeManagerITC
- Add EToolsContextScope enum, with options for Editor and EdMode ToolsContext
- UEdMode::Enter() now creates a child EdModeITC via new EditorITC::CreateNewChildEdModeToolsContext() function above, in addition to storing reference to the ModeManagerITC. Internal code updated to handle both ITCs.
- The EdModeITC is shut down on ::Exit() and unregistered from the EditorITC parent
- UEdMode ITC access functions (GetToolsContext, GetToolManager, RegisterTool) now take an optional Scope argument
- UEdMode::GetDefaultToolScope() allows EdModes to define default scope for the entire mode, defaults to Editor scope
- removed unused CanStartTool()/etc wrapper functions from FModeToolkit, they were not being called
- FModeToolkit::Init() now listens to events from both the ModeManagerITC and EdModeITC, delete cleans them both up
- FModeToolkit::OnToolStarted() checks both ITCs to see which one owns the new Tool
- updated all EdModes that were directly accessing the UEdMode::ToolsContext member, replaced with calls to GetToolsContext() / GetToolManager() APIs
- updated ModelingToolsEditorMode to use EdMode ToolScope
#rb brooke.hubert
#rnx
#jira none
#preflight 6140cc1130c00d0001dc4b9e
#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17510176 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17510201 by ryan schmidt in ue5-release-engine-test branch]
#jira UETOOL-3862
#rb lauren.barnes
#preflight 611bf56e3a81b00001053ff1
#ROBOMERGE-SOURCE: CL 17210215 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)
[CL 17210225 by steven dao in ue5-release-engine-test branch]
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]
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]