Commit Graph

10 Commits

Author SHA1 Message Date
paul chipchase
a7dbc48169 Fix up include order
#rb trivial
#jira none
#rnx
#preflight 63e64774d948b2493a1afb2d

[CL 24117873 by paul chipchase in ue5-main branch]
2023-02-10 08:44:31 -05:00
paul chipchase
b234516542 Improve the error message when using the console command 'DumpPackagePayloadInfo' if the package does not contain a FPackageTrailer.
#rb Per.Larsson
#jira UE-176605
#preflight 63e4bb8a046845470872df95

- Instead of just giving an error message stating that the trailer could not be found, we now try to return why the trailer cannot be found, if the package is corrupted, or was last saved before the package trailer concept was introduced etc.

[CL 24094160 by paul chipchase in ue5-main branch]
2023-02-09 04:42:06 -05:00
paul chipchase
ae267db067 Fix some typos in error messages for the DumpPackagePayloadInfo command
#rb trivial
#rnx
#preflight 62ff3322086f90bbc4f59142

[CL 21454585 by paul chipchase in ue5-main branch]
2022-08-19 03:11:43 -04:00
paul chipchase
0a353190d3 The console command 'DumpPackagePayloadInfo' now works with absolute file paths referencing packages from outside the current set of mount points.
#rb trivial
#rnx
#preflight 62fcc14d1e39eb26a0851cd0

- Sometimes it is useful to be able to dump the payload info from packages not under the current project as a quick form of debugging and given the format of the package trailer there is no reason why we should allow it.
- If we fail to turn the arg into a valid FPackagePath can now also check to see if the arg is an absolute file path via the FileManager
- If both of these options fail we then log an error as before.

[CL 21422989 by paul chipchase in ue5-main branch]
2022-08-17 06:36:41 -04:00
paul chipchase
38ad29096c The DumpPackagePayloadInfo console command now accepts fullobject paths as args as well as filepaths.
#rb trivial
#jira UE-160497
#rnx
#preflight 62f263c43b773d041627830f

[CL 21287990 by paul chipchase in ue5-main branch]
2022-08-09 10:47:23 -04:00
paul chipchase
653f551822 Add 'size of disk' to the output for local payloads when running the 'DumpPackagePayloadInfo command.
#rb trivial
#rnx
#preflight 6294aa916601713a4f75e17d

[CL 20429874 by paul chipchase in ue5-main branch]
2022-05-30 07:35:08 -04:00
paul chipchase
f85fad88ff It is now possible to disable virtualization for all payloads owned by a specific asset type by adding the name of the asset to [Core.ContentVirtualization]DisabledAsset string array in the engine ini file.
#rb Per.Larsson
#rnx
#jira UE-151377
#preflight 628364050039ea57a52d6989

### Virtualization
- [Core.ContentVirtualization] in the engine ini file now supports an array called 'DisabledAsset' which can be used to name asset types that should not virtualize their payloads.
-- By default (in BaseEngine.ini) we have disabled the StaticMesh asset as we know it will crash if a payload is missing and the SoundWave asset as it still is pending testing.
- This new way to disable virtualization is data driven. The older hard coded method has not been removed but will likely be reworked in a future submit.
- Now when an editor bulkdata is adding it's payload to the package trailer builder during package save it will poll the virtualization system with a call to the new method ::IsDisabledForObject by passing in it's owner.
-- If the owner is valid and was present in the 'DisabledAsset' array then the method will return true and the EPayloadFlags::DisableVirtualization flag will be applied.

### Package Trailer
- The pre-existing functionality of enum EPayloadFilter has been moved to a new enum EPayloadStorageType as will only filter payloads based on their storage type.
- EPayloadFilter has been modified to filter payloads based on functionality although at the moment the only thing it can filter for is to return payloads that can be virtualized, it is left for future expansion.
- EPayloadFlags has been reduced to a uint16 with the remaining 2bytes being turned into a new member EPayloadFilterReason.
- This new member allows us to record the exact reason why a payload is excluded from virtualization. If it is zero then the payload can virtualize, otherwise it will contain one or more reasons as to why it is being excluded. For this reason the enum is a bitfield.
- Added overloads of ::GetPayloads and ::GetNumPayloads that take EPayloadFilter rather than a EPayloadStorageType
- Added wrappers around all AccessMode types for FLookupTableEntry.
- FPackageTrailerBuilder has been extended to take a EPayloadFilterReason so that the caller can already provide a reason why the payload cannot be virtualized.
-- As a future peace of work this will probably be changed and we will ask the caller to pass in the owner UObject pointer instead and then we will process the filtering when building the package trailer to a) keep all of the filtering code in one place b) keep the filtering consistent

### PackageSubmissionChecks
- The virtualization process in  will now request the payloads that can be virtualized from the package trailer, which respects the new payload flag, rather than requesting all locally stored payloads.

### UObjects
- There is no need for the SoundWave or MeshDescription classes to opt out of virtualization on construction. This will be done when the package is saved and is now data driven rather than being hardcoded.

### DumpPackagePayloadInfo
- The command has been updated to also display the filter reasons applied to each payload

[CL 20240971 by paul chipchase in ue5-main branch]
2022-05-17 07:54:28 -04:00
paul chipchase
05d81ee7f3 EditorBulkData and the virtualization system now use FIoHash directly and FPayloadId is removed
#rb Per.Larsson, Devin.Doucette
#jira UE-133497
#rnx
#preflight 61f835491c5ac5523462810a

- A lot of files have been touched but most of this is changing FPayload::IsValid to !FIoHash::IsZero, the main changes are in EditorBulkData/EditorBulkDataTests
- The only difference between FPayloadId and FIoHash is that the former considered the hash of an invalid or empty buffer to be 'invalid' too where as FIoHash would return a valid hash
-- To keep behaviour the same, we only hash payloads in EditorBulkData using a utility method ::HashBuffer which will not hash empty or invalid payloads and return a default FIoHash instead.
-- Unit tests have been extended to prove that the behaviour has not changed.

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18806362 in //UE5/Release-5.0/... via CL 18808527 via CL 18821790
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18822154 by paul chipchase in ue5-main branch]
2022-02-02 02:21:24 -05:00
paul chipchase
0d4d469bbd Add LexToString to FPayloadId and change existing use of ToString to use it.
#rb Per.Larsson
#rnx
#jira UE-133497
#preflight 61f259a3706ac5ea0cf2ee3e

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18751491 in //UE5/Release-5.0/... via CL 18751500 via CL 18751554
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18751559 by paul chipchase in ue5-main branch]
2022-01-27 04:20:46 -05:00
paul chipchase
c4991c02a0 Rename DumpPayloadTocCommand.cpp to DumpPackagePayloadInfoCommand.cpp to match the new name we use for the actual command.
#rb trivial
#rnx
#preflight 61e7e9fcb875abaf33196c62

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18656571 in //UE5/Release-5.0/... via CL 18656590 via CL 18656598
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18656605 by paul chipchase in ue5-main branch]
2022-01-19 06:21:21 -05:00