Commit Graph

65 Commits

Author SHA1 Message Date
steve robb
206d9d76b4 Replaced EAutomationTestFlags::ApplicationContextMask with EAutomationTestFlags_ApplicationContextMask.
[CL 34335388 by steve robb in ue5-main branch]
2024-06-13 07:06:47 -04:00
matt peters
2971248963 IncrementalCook: Add support for iterative and incremental cooks of CookPackageSplitters.
#rnx
#rb Zousar.Shaker

[CL 33710894 by matt peters in ue5-main branch]
2024-05-16 23:22:12 -04:00
matt peters
cd03e70913 FAssetPackageData: Add compactbinary functions NetworkWrite and TryNetworkRead for use by MPCook.
#rnx
#rb Devin.Doucette
#lockdown jeanfrancois.dube

[CL 33553785 by matt peters in ue5-main branch]
2024-05-09 14:32:55 -04:00
matt peters
1a875d0e48 AssetRegistry: Centralize all of the hard-coded classpath strings used by the AssetRegistry. Use hard-coded strings wherever we were previously using StaticClass()->GetClassPathName() in case our functions are called from early asyncthread scanning code before the modules are initialized.
#rnx
#rb robert.millar

[CL 32809273 by matt peters in ue5-main branch]
2024-04-08 18:13:56 -04:00
jamie dale
0a22c6c743 Added FPackageName::GetVersePath as a shared util for UObjectBaseUtility and FAssetData
#rb Dave.Belanger

[CL 31737732 by jamie dale in ue5-main branch]
2024-02-22 17:33:37 -05:00
matt peters
5a22610f2d StaticAnalysis: Avoid error V568: ...argument of sizeof() operator is the 'Result.GetBytes()' expression by using decltype.
#rnx
#rb matt.peters
#rbself Trivial, reported issue on slack

[CL 31189680 by matt peters in ue5-main branch]
2024-02-05 16:27:39 -05:00
matt peters
036728262b StaticAnalysis: Suppress V568: ...argument of sizeof() operator is the 'Result.GetBytes()' expression.
sizeof is correctly returning 20 for this case.
#rnx
#rb matt.peters
#rbself Trivial, reported issue on slack

[CL 31177260 by matt peters in ue5-main branch]
2024-02-05 12:02:31 -05:00
matt peters
1ac908e58b UPackage::SavedHash: Add the API that replaces UPackage->Guid. FIoHash SavedHash (or PackageSavedHash ) is now used instead on UPackage, FPackageSummary, and FAssetPackageData. Remark Guid as deprecated; we will remove it in 5.5. This replacement only applies to the editor; in the cooked game we are removing UPackage->Guid with no replacment because it is unnecessary and costs memory.
[RN] Minor, Foundation
#rb Zousar.Shaker

[CL 31174668 by matt peters in ue5-main branch]
2024-02-05 10:52:11 -05:00
steve robb
66266c6a11 Fixed up DerivedDataCache, DesktopPlatform, ApplicationCore, AssetRegistry, Core, CoreUObject, Projects, Sockets code to use EAllowShrinking instead of bools.
[CL 30676428 by steve robb in ue5-main branch]
2024-01-17 19:51:06 -05:00
marc audy
19e84555b3 Silence PVS warnings
[CL 30653812 by marc audy in ue5-main branch]
2024-01-17 01:34:02 -05:00
matt peters
c86d3f716a AssetDatas and GetAssetRegistryTags: Change API and change cook behavior:
API: Change UObject::GetAssetRegistryTags to take a Context object that reports whether the call is coming from SavePackage (and should calculate everything) or load (and should skip expensive tags).
Cook Behavior: AssetDatas are now included in the development AssetRegistry generated by a cook if they were included in a referenced package. Tags are updated during save rather than during load. For now, AssetDatas are added for non-referenced packages in non-dlc cooks, but this addition will eventually be removed, and their tags are stale (have the values saved from the last editor save of the package).
[RN] Miinor, Cooking
#rb Francis.Hurteau, JeanFrancois.Dube

[CL 30168192 by matt peters in ue5-main branch]
2023-12-06 16:40:11 -05:00
jerome delattre
5913c3f2bf Streamline error coming from log capture.
Cleanup Log capture function.
Move all tests under Engine.AssetRegistry into System.AssetRegistry

#jira UE-199002
#rnx
#rb Rob.Huyett

[CL 29186092 by jerome delattre in ue5-main branch]
2023-10-27 12:33:13 -04:00
matt peters
1c6e11db7c GetAssetRegistryTags changes for upcoming API change:
* Move the FArchiveCookContext enums into a namespace so they can be included from other types that need them without using FArchiveCookContext.
* Make construction of CookContext a TOptional to avoid constructing it when not cooking; the new constructor will be more difficult to call.
* Technically enforce the lifetime of ArchiveCookContext during SaveCookedPackage by making it a TOptional.
* Add a default constructor for FArchiveTag
* Remove a deprecated UObject virtual function that will be changing again in the upcoming change.
* Move AssetRegistry's bUpdateDiskCacheAfterLoad into a variable outside the critical section to make it cheaper to read; it is immutable after AssetRegistry is constructed.
* Remove use of the soft-deprecated FAssetData constructor that takes a bool rather than ECreationFlags.
* Reduce some duplication in FAssetRegistryState::FilterTags
* FAssetBundleData: use the native exporter in the case when defaults are provided but are pointing to the object itself; this combination of parameters means that no defaults are available and the entire struct should be exported. Use of the native exporter is necessary for correctness; the generic exporter incorrectly writes both the deprecated and the new variables.
ExportToText is used with defaults == object when called from GetAssetRegistryTagFromProperty called from GetAssetRegistryTags in obj.cpp.
* UObjectRedirector::GetAssetRegistryTags by contract should call the Super's version of the function.
* UBlueprintGeneratedClass::GetAssetRegistryTags does not need to append actor tags when saving in the cookcommandlet since GetAssetRegistryTags is not called when saving cooked packages and no other saves are executed in the cook commandlet.
* NiagaraEditorSettings GetAssetRegistryTags: sort the ClassPaths in the ClassUsageList to remove indeterminism.
* Whitespace fixes
#rnx
#rb Zousar.Shaker, Dan.Thompson, Robert.Millar, Frank.Fella

[CL 28209382 by matt peters in ue5-main branch]
2023-09-25 18:25:29 -04:00
robert millar
547b2d1a9e Add new message log token type for FAssetData.
Implement click callback to handle assets or loaded/unloaded actors.
Use asset data token in content validation logs.
Get full asset data (including actor metadata) for actor validation context menu entry.

#rb JeanFrancois.Dube

[CL 28042921 by robert millar in ue5-main branch]
2023-09-20 13:10:06 -04:00
matt peters
f44f8b9301 AssetRegistry diagnostics: Log the amount of memory used by each class for its AssetDataTags.
#rnx
#rb Zousar.Shaker

[CL 27041903 by matt peters in ue5-main branch]
2023-08-11 15:41:52 -04:00
francis hurteau
bd3a51f5a8 Truncation warning fixes for CoreUObject
#jira UE-166274, UE-127233
#rb Devin.Doucette, Paul.Chipchase

[CL 26553935 by francis hurteau in ue5-main branch]
2023-07-24 16:13:27 -04:00
matt peters
8257f5ed73 AssetRegistry and ExternalActors: Ignore ExternalActors that have a packagename that does not match their objectpath. These actors were created by an editor bug during saveas, and they can hide the true actors that have that objectpath.
#rnx
#rb JeanFrancois.Dube
#preflight 647754a18804572bdef40fc4

[CL 25703597 by matt peters in ue5-main branch]
2023-05-31 11:57:32 -04:00
Steve Robb
0f44db07d5 Replaced some container operator new usage.
#rb james.hopkin
#jira none
#preflight 6459670f28155a0f41565a34

[CL 25384456 by Steve Robb in ue5-main branch]
2023-05-09 05:17:49 -04:00
matt peters
4a19aef072 Convert assertion failure into ensure failure to give more information and to not halt the cook. Keep it as an ensure rather than an error so we get callstacks for diagnostics.
The first time this occurred the callstack was during receive replication on the CookDirector from AssetDatas created on the CookWorker.
#rnx
#rb Zousar.Shaker
#preflight 644ff0ff401d328ad9b9f325

[CL 25289056 by matt peters in ue5-main branch]
2023-05-01 15:02:19 -04:00
devin doucette
672818b928 StringBuilder: Converted WriteToString from a type to a function
This was not possible on C++14 and is possible now due to guaranteed copy elision in C++17.
This will break backward compatibility when WriteToString was used as a type or in a context where it would be copied.

#preflight 640a0460af3fc3529234c216
#rb Matt.Peters

[CL 24583299 by devin doucette in ue5-main branch]
2023-03-09 17:06:55 -05:00
matt peters
34c5e5eb67 Cooker: Add support for generated packages cooking iteratively.
*) Store the declared dependencies for each generated package in the AssetRegistry. Use these dependencies to detect when a generated package is invalidated.
*) Store a a dependency from the generator package to each generated package in the AssetRegistry. Use thise dependency to trigger the Generator to reexecute generation when a generated file is invalidated.
*) Update FAssetRegistryGenerator::ComputePackageDifferences to not mark generated packages as removed due to being missing from disk. Use the package flags to identify them as generated and not mark them as removed.
*) Improve some generated packages and iterative cook output messages to provide more feedback and more accurate feedback.
*) Fix queuing of generated packages to not assume the packages have not already been cooked.
*) Update UpdateAssetRegistryData to find AssetDatas for generated packages, and to store the new dependencies we create for them.
*) Fix PopulateCookedPackages to find generated packagedatas that don't exist on disk, and to pass the list of generated packages to the generator packagedata for removal if the generated packages have changed.
#rnx
#preflight 63eac958cb4948d2b379a96b

[CL 24202351 by matt peters in ue5-main branch]
2023-02-13 22:35:18 -05:00
matt peters
92303fcab7 AssetRegistry: Add Extension to FAssetPackageData. This makes the AssetRegistry's calculation of package extension fully robust and supports future changes in the cooker and linker that will remove searching for the package filename on disk in favor of using the AssetRegistry.
#rb Ben.Zeigler
#rnx
#preflight 63b5f2c3717a593ee761b4a3

[CL 23583416 by matt peters in ue5-main branch]
2023-01-04 18:39:42 -05:00
nick darnell
51a6763dca FAssetData - You can now pass in EResolveClass::Yes or EResolveClass::No, into GetClass and IsInstanceOf on FAssetData in order to ask it to load classes that it can't find.
#jira UE-165574

[CL 23071802 by nick darnell in ue5-main branch]
2022-11-10 01:07:46 -05:00
henrik karlsson
b985fbd1b1 Removed lots of includes in high traffic headers in order to reduce compile times. Headers are still included if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2 is set to 1
List of highlights
* PlayerController - Removed ForceFeedback and and OnlineReplStructs
* Class - Removed Package.h
* World - Pawn, Blueprint and GameInstance
* Actor - CoreNet, HitResult and ActorDatalayer
* EngineBaseTypes - TaskGraphInterface
* AssetManager - AssetData
* Scene/Child/ActorComponent - CoreNet
* AnimInstance - AttributesRuntime, Skeleton, AnimCurveTypes, AnimMontage, BonePose
* BulkData - IoDispatcher
* AssetData - IoDispatcher, LinkerLoad
* SecureHash - AsyncWork
* CanvasTypes - UnrealEngine, StaticMeshResources
* IpAddress - AsyncWork, Stats

#preflight 6363717ece676ae8688f5d8c
#rb none

[CL 22968258 by henrik karlsson in ue5-main branch]
2022-11-03 17:56:44 -04:00
robert millar
a41909375d Fix FAssetData::GetObjectPathString to return the empty string rather than None.None for empty/default initialized asset data.
#jira UE-165277
#rb phillip.kavan
#preflight 63375f615c2225fe5f99bd09

[CL 22285207 by robert millar in ue5-main branch]
2022-09-30 20:30:28 -04:00