This change consists of multiple changes:
Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values
AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes
Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names
#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32
#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786
#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)
[CL 20448496 by robert manuszewski in ue5-main branch]
Added storage of correspondence between slot names and material names to UInterchangeMeshNode
Added storage of correspondence between slot names and material names to UInterchangeStaticMeshFactoryNode
Added storage of correspondence between slot names and material names to UInterchangeSceneNode
Added storage of correspondence between slot names and material names to UInterchangeActorFactoryNode
Modified UInterchangeGenericMeshPipeline to use UInterchangeSceneNode's slot dependency
Modified UInterchangeGenericScenesPipeline to use UInterchangeSceneNode's slot dependency and create UInterchangeMeshActorFactoryNode
Added logic in UInterchangeStaticMeshFactory to apply correspondence between slot names and material names stored in UInterchangeStaticMeshFactoryNode to the static mesh
Added logic in UInterchangeStaticMeshActorFactory to apply correspondence between slot names and material names stored in UInterchangeStaticMeshFactoryNode to the static mesh
Added logic in UInterchangeSkeletalMeshActorFactory to apply correspondence between slot names and material names stored in UInterchangeActorFactoryNode to the static mesh component
Added code to skip FStaticMeshOperations::AppendMeshDescription if there is only one mesh in the payload
Modified UE::Interchange::TMapAttributeHelper<FString, FString> by adding a method to rebuild the cache from the attributes. This was needed to rebuild cache after Interchange nodes using this helper were deserialized.
Fixed issue in InterchangeTexture2DFactoryNode and InterchangeTexture2DNode with serialization of Interchange nodes using UE::Interchange::TMapAttributeHelper<FString, FString>. Serialize method needed to be override in order to restore the cache.
Added UInterchangeMeshActorFactoryNode class to manage slots on static mesh and skeletal mesh actors.
Added helper function to transfer slot dependencies from translated node to factory node
Added abstract class UInterchangeMeshFactoryNode from which UInterchangeSkeletalMeshFactoryNode and UInterchangeStaticMeshFactoryNode now derived
Modified UInterchangeSkeletalMeshFactoryNode and UInterchangeStaticMeshFactoryNode based on new UInterchangeMeshFactoryNode class
Added logic in UInterchangeSkeletalMeshFactory::CreateAsset to handle slot material dependencies
Added logic in UInterchangeGenericMeshPipeline::AddLodDataToSkeletalMesh to handle slot material dependencies
Note:
- LODs' material assignment does not work for skeletal and static meshes for a scene import. This needs to be fixed separately
#rb alexis.matte, richard.talbotwatkin, benoit.deschenes
#preflight 62868650045aba22796bf3fa
[CL 20285082 by JeanLuc Corenthin in ue5-main branch]
- Indicate uniqueness of UInterchangeSourceNode in the node container by providing two static functions to find/create and get.
- Added methods GetCustomImportUnusedMaterial and SetCustomImportUnusedMaterial on UInterchangeSourceNode to check ability or not to import unused materials.
- Modified UInterchangeGenericMaterialPipeline to enable or not material factory nodes based on the value returned by GetCustomImportUnusedMaterial on the UInterchangeSourceNode when added to the node container.
#jira none
#rb alexis.matte
#preflight 627e66735d0fe3ffef40bedc
[CL 20181133 by JeanLuc Corenthin in ue5-main branch]
- Added a static Create function on UInterchangeTexture2DNode, UInterchangeShaderGraphNode and UInterchangeShaderNode.
- Added a static MakeNodeUid function on UInterchangeTextureNode, UInterchangeShaderGraphNode and UInterchangeShaderNode.
- Updated the FBX, GLTF and OBJ translators to leverage the new APIs.
#preflight 627bcefc0a5817c9d94df8ed
[CL 20140773 by JeanMichel Dignard in ue5-main branch]
Added the option to allow the import of non-power of two textures in the interchange generic texture pipeline.
Added some static assert to the interchange texture factory to help the long term maintenance.
Added some functions to the interchange texture 2d factory node to help the manipulation of udims source blocks.
Removed some texture translators since they can share their implementation. That also fixed the difference between interchange and the legacy factory.
Removed a copy of the raw source data for most of the image that are imported by the image wrappers (Tiff was already able to avoid the copy before that). This will greatly reduce the peak memory usage during the imports.
Fixed some other minor issues.
#jira UE-146448, UE-146450, UE-146715, UE-146718
#rb Alexis.Mate
#preflight 6269899ff97c319beba3575c
[CL 19944368 by Julien StJean in ue5-main branch]
Add a children cache in the base node container to optimize the queries.
#jira none
#rnx
#rb benoit.deschenes
#preflight 62683174430b9997ebe6db18
[CL 19926008 by Alexis Matte in ue5-main branch]
- Custom LOD import now use interchange (if interchange is enabled)
- Add an InterchangeManager API function to retrieve per asset type extensions format
- Add an interchange mesh utilities to create a common place to add mesh import code.
- Add an interchange file picker interface which can be implemented by plugin
- Add an editor plugin that implement the file picker, The file picker can be customize to import specific asset type.
#jira UETOOL-5050
#jira UETOOL-5049
#rb jeanmichel.dignard
#preflight 626819fa430b9997ebe3bece
#rnx
[CL 19923170 by Alexis Matte in ue5-main branch]
We now use the registered Translators and Factories to fetch the asset source file and determine if a reimport is supported.
#rb Alexis.Matte
#preflight 6259cd2fb53385f954985288
[CL 19777158 by benoit deschenes in ue5-main branch]
This allows additional types to be imported without modifying the UInterchangeActorFactory (a requirement for implementing custom interchange import plugins), and better matches the rest of interchange design.
Moving away from a single-call scene instanciation will also allow us to further improve of the scene import with changes such as:
- Distributing the scene instanciation on multiple tick, relying of interchange's dependency system, rather than waiting for all the assets to be imported.
- Calling the pre/post-import pipeline events per actor.
- Having inter-actor import dependencies (right now the interchange scene import task only consider asset dependencies)
#rb Alexis.Matte JeanMichel.Dignard
#preflight 6241f2cb637925b5d3999cff
#preflight 624476d773665f7d5e428b14
[CL 19558429 by benoit deschenes in ue5-main branch]
- Added sections to navigate between the settings of different asset types.
- Fixed the tooltips for the reimport strategy being on the wrong entries.
PropertyEditor
- Fixed an issue where a category with a space in its name would fail the section category comparison as spaces are removed from section category names.
#rb Alexis.Matte, Sebastian.Nordgren
#preflight 621e8149ca28c5563436bd6a
[CL 19205853 by JeanMichel Dignard in ue5-main branch]
Setters and getters are native functions called by FProperties when setting property values with *_InContainer functions.
Setters and getter function names can be manually specified with Setter = Func and Getter = Func keywords inside of UPROEPRTY macro but they will also be automatically parsed if the name is not explicitly specified if the setter or getter function name matches SetPropertyName and GetPropertyName pattern.
The latter behavior can be disabled in UHT's DefaultEngine.ini by setting AutomaticSettersAndGetters=False.
ImportText and ExportTextItem functions have been deprecated and should be replaced with *_InContainer or *_Direct variants.
#rb Steve.Robb
#preflight 6210a377a83e0bcefd03d9e1
#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19070318 via CL 19098059 via CL 19104650 via CL 19104661 via CL 19110012
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
[CL 19147839 by marc audy in ue5-main branch]
- Interchange now adds its supported extensions to the import and import into level file pickers.
- Added a GetSupportedFormats on the Interchange Translators.
- UInterchangeTranslatorBase::CanImportSource now defaults to checking the file extension and matching it against the supported formats.
- Added a translator type on the translators to indicate what type of data they can translate (assets or actors for now). This is used by the file pickers to indicate which extensions they want to gather.
#preflight 6203eaca174d2620c3c11d9b
[CL 18919107 by JeanMichel Dignard in ue5-main branch]
User defined attribute are normally attribute user add to a node in the DCC application.
#jira UETOOL-3236
#rb jeanmichel.dignard
#rnx
#preflight 6203bff48e53010a1868431e
[CL 18916814 by Alexis Matte in ue5-main branch]
- Remove from the attribute storage the type that represent 3f or 3d (i.e FVector, FTransform).
- Make sure the detail viewer for the interchange node support the specific 3f/3d type
#jira none
#rb jeanmichel.dignard
#rnx
#preflight 61fd8d71f370b0d3111eeb17
[CL 18872263 by Alexis Matte in ue5-main branch]