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 UInterchangeMateriaFunctionlFactoryNode to store data to create a MaterialFunction object
- Added UInterchangeMaterialFunctionFactory to create aMaterialFunction from a UInterchangeMateriaFunctionlFactoryNode
-Added UInterchangeFunctionCallShaderNode to carry over the unique id of the material function to be called by the resulting function call expression
- Reworked CreateExpressionsForNode & CreateExpression in InterchangeMaterialFactory.cpp as helper functions to serve UInterchangeMaterialFactory and UInterchangeMaterialFunctionFactory
-
Added support for materials using the 'material attributes' input
- Added MaterialAttributes namespace under UE::Interchange::Materials::Standard::Nodes to list MaterialAttributes expression's inputs
- Add method to properly handle material using MakeMaterialAttributes
#jira UE-153392
#rb jeanmichel.dignard
#preflight 6290ebc16c4b4192f2a09961
[CL 20394638 by JeanLuc Corenthin in ue5-main branch]
- Removed use of ensure based on wrong assumption about presence of slot information in factory nodes for meshes
- Fixed logic in ApplySlotMaterialDependencies to check for UInterchangeBaseMaterialFactoryNode instead of UInterchangeMaterialFactoryNode
Datasmith:
- Removed use of InterchangeGenericAssetPipeline for Datasmith import
- Added logic to the translator to pro
- Added Datasmith static mesh pipeline to handle case where allslots of a mesh have the same material
- Modified level pipeline to handle case where all overrides of a mesh actor have the same material
- Temporarily forced creation of all assets during a Datasmith import
- Limit compilation of DatasmithInterchange module to Win64, Mac and Linux
#jira UETOOL-5082
#rb benoit.deschenes
#preflight 628cfe81710271c318226ed7
[CL 20351139 by JeanLuc Corenthin in ue5-main branch]
To achieve this a new type of payload was added to the payload interface which allow the client asking for payload to describe the bake settings (Hz, start time, end time)
#jira UE-151896
#rb benoit.deschenes
#preflight 62869cdd153b5ae9cdcc92d1
#rnx
[CL 20286621 by Alexis Matte 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]
- Favor translucency over coats when creating materials, as we do when creating instances.
- Ignore twosidedness for thin translucency as the results look visually wrong.
#rb none
#preflight 6282489ccf7e4667a98c0833
[CL 20222545 by JeanMichel Dignard in ue5-main branch]
Add a error message in case we have a zero scale in the UI. Set back the scale to the default value 1.0f
#jira UE-151310
#rb jeanmichel.dignard
#rnx
#preflight 627eaa120f72dc21c7dcee62
[CL 20186509 by Alexis Matte 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]
* Ignore MaterialX warning -Wmissing-braces on clang
* Only enable the Translator with the editor for the moment, because of the MaterialX exceptions during Runtime
#rb JeanLuc.Corenthin
#rb JeanMichel.Dignard
#rb Alexis.Matte
#preflight https://horde.devtools.epicgames.com/job/627d4bb2332e182a58424952
[CL 20169252 by Danny Kabrane in ue5-main branch]
Fixed incorrect name of Interchange node created for material
#jira none
#rb richard.talbotwatkin
#preflight 627d11c6a82f3adab87a2ff2
[CL 20164659 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 address mode support for 2D texture nodes.
Interchange GLTF
- Translated GLTF wrap mode.
- Renamed texture nodes to use the GLTFTexture name instead of the file URI since the same file can be sampled differently and result in multiple textures.
#fyi danny.kabrane, emil.kirichev
#jira UETOOL-5138
#rb julien.stjean
#preflight 6275278c491d570f2240db4d
[CL 20075318 by JeanMichel Dignard in ue5-main branch]
- Moved setting the static mesh on the static mesh component to the post import callback as the component wants the static mesh render data to be initialized if it's not null.
#preflight 6273d1c2f54f151f4eee0bad
[CL 20056945 by JeanMichel Dignard in ue5-main branch]