Commit Graph

68 Commits

Author SHA1 Message Date
robert manuszewski
d1443992e1 Deprecating ANY_PACKAGE.
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]
2022-06-01 03:46:59 -04:00
Matt Peters
19f2062bc0 AssetRegistryState: fix EnumerateAssets to handle duplicates in Filter.ObjectPaths, and optimize the handling of duplicates using a bit for each filters rather than counting the number of passed filter hits and requiring uniqueness in the filterresults.
Reported by PR #8466 submitted by LindyHopperGT.
#rb Johan.Torp
#rnx
#preflight 6282642ec57a894cf680ecac

[CL 20225262 by Matt Peters in ue5-main branch]
2022-05-16 11:31:06 -04:00
Dan Thompson
b3b6ec9bdf Expose loading an asset registry from disk.
#rb matt.peters
#preflight 6256f8ed6520cc7123844ac1

[CL 19741379 by Dan Thompson in ue5-main branch]
2022-04-13 12:33:15 -04:00
Dan Thompson
cd73707429 Update package writers to gather package hashes internally, then have CookByTheBookFinished copy them to asset package datas.
Add iostore chunk hashes to the asset registry during cook.
Remove old hashing code, which was extensive. This moves the async writes in to UE::Task from the old AsyncWorkSequence().
#rb Matt.Peters
#rb Jeff.Roberts
#preflight 624b24a5f73c316f68303946

[CL 19611812 by Dan Thompson in ue5-main branch]
2022-04-04 13:26:27 -04:00
Matt Peters
46290e86ee AssetDataGatherer: Change serialization format of dependencies in the editor's AssetDataGatherer cache to improve load performance.
#rb Zousar.Shaker
#rnx
#preflight 6245a64e637925b5d3c6c729

[CL 19571741 by Matt Peters in ue5-main branch]
2022-03-31 09:16:55 -04:00
Matt Peters
6b69c8a5d9 #jira UE-144941
Make the cooked AssetRegistry.bin deterministic.
#rb Johan.Torp
#rnx
#preflight 6228b03acc09078bab52ecbb

[CL 19319417 by Matt Peters in ue5-main branch]
2022-03-09 09:03:55 -05:00
matt peters
ccf3416a66 AssetRegistry Premade Preloader - when in CookedEditor, allow deferring the preload after Initialize and move adding it to the AssestRegistry onto an async thread, for editor startup performance.
#rnx
#rb Josh.Adams, Johan.Torp
#preflight 621f979831454c90ccff97b2

#ROBOMERGE-OWNER: matt.peters
#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 19223497 via CL 19225668 via CL 19236616 via CL 19236684 via CL 19236895
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19237553 by matt peters in ue5-main branch]
2022-03-02 22:33:34 -05:00
Dan Thompson
f60019738e Adding a way to directly add asset registry tags without having to recreate the entire AssetData object.
#rb matt.peters
#preflight 6205918169224cb0d87b625f

[CL 18944740 by Dan Thompson in ue5-main branch]
2022-02-10 17:45:21 -05:00
Matt Peters
9632bb3c43 #jira UE-141167
Fix crash in AssetRegistryState due to storing pointer/reference to a TMap element while adding elements.
Fix submitted by Rosen Baklov.
#rb Zousar.Shaker
#rnx
#preflight 61fd93d4e65336d145524bf1

[CL 18873298 by Matt Peters in ue5-main branch]
2022-02-04 16:27:59 -05:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
michael noland
ef836e9725 Asset registry type truncation warning fixes
#jira UE-116218
#rb matt.peters
#swarm https://p4-swarm.epicgames.net/reviews/17578628

#ROBOMERGE-AUTHOR: michael.noland
#ROBOMERGE-SOURCE: CL 17618673 in //UE5/Release-5.0/... via CL 17618680
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17618682 by michael noland in ue5-release-engine-test branch]
2021-09-23 23:20:57 -04:00
matt peters
19490aa975 Fix whitespace from merge.
#rb None, Trivial
#rnx

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 17600991 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17601002 by matt peters in ue5-release-engine-test branch]
2021-09-22 17:28:43 -04:00
aurel cordonnier
7f517562d5 Merge from Release-Engine-Staging @ 17438845 to Release-Engine-Test
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17439044 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-06 12:23:53 -04:00
Devin Doucette
fd7825f16c Removed unnecessary include of PathViews.h in a header that is included nearly everywhere
#rb Matt.Peters
#rnx
#preflight 60a7ef3f6905a600011d463b

[CL 16423171 by Devin Doucette in ue5-main branch]
2021-05-21 15:24:13 -04:00
Matt Peters
c4f74f8005 EditorDomain: Add list of ImportedClasses for each package to the AssetRegistry's FAssetPackageData.
#rb Johan.Torp
#rnx

[CL 16328609 by Matt Peters in ue5-main branch]
2021-05-14 08:30:09 -04:00
Matt Peters
230a874f39 Fix AssetRegistry error "UpdateAssetData called with a change in ObjectPath" when cooking a package and moving an actor asset out of the external package into the main package.
#rb Francis.Hurteau
#rnx

[CL 16193905 by Matt Peters in ue5-main branch]
2021-05-04 10:57:11 -04:00
aurel cordonnier
50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00
Matt Peters
45fca3ec96 Attempt to silence static analysis warning:
V561: It's probably better to assign value to <VariableName> variable than to declare it anew.
#rb None, trivial
#rnx

[CL 16158174 by Matt Peters in ue5-main branch]
2021-04-29 12:16:08 -04:00
Matt Peters
938cb3c0a8 Threadsafe AssetRegistry - add synchronization that allows the AssetRegistry to be used from any thread, so that it can be used in asynchronous TryPreload threads by the EditorDomain during cooking.
#rb Francis.Hurteau
#rn Minor AssetRegistry

[CL 16143142 by Matt Peters in ue5-main branch]
2021-04-28 09:54:09 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
Matt Peters
db7b0c7de6 IAssetRegistry::GetPackagesByName: Fix clang compile error.
#rb None, Trivial
#rnx

[CL 15875434 by Matt Peters in ue5-main branch]
2021-03-31 11:00:52 -04:00
Matt Peters
c984bbef80 #jira UE-110922
Add IAssetRegistry::GetPackagesByName to find packages by short package name; this replaces FPackageName::SearchForPackageOnDisk, which was slower and does not work with iostore.
#rb Johan.Torp
#rnx

[CL 15875060 by Matt Peters in ue5-main branch]
2021-03-31 10:21:52 -04:00
Dave Belanger
96d98e05cc - Filter out UBlueprint assets from cooked packages
- Asset registry filtering is now in outtake instead of intake, to cover all cases: gathered packages, loaded assets and assets from cooked registry (AssetRegistryState)
- Move PKG_ContainsNoAsset filtering from CB to asset registry
#rb Matt.Peters
#jira none

[CL 15719622 by Dave Belanger in ue5-main branch]
2021-03-17 08:59:59 -04:00
Matt Peters
2c1b6680c8 #jira FORT-355082
Fix ProcessLoadedAssetsToUpdateCache to correctly create the FAssetData for BlueprintGeneratedClass assets. Add more errors when adding/editing assets to identify bad adds at the point of addition rather than catching the NumAssets == 0 ensure in Reset.
#rb Dave.Belanger
#rnx

#ushell-cherrypick of 15639377 by Matt.Peters

[CL 15640243 by Matt Peters in ue5-main branch]
2021-03-08 11:44:13 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00