Commit Graph

357 Commits

Author SHA1 Message Date
kevin macaulayvacher
b497049ddd Adds GatherableTextData support to AssetHeaderPatching
- Now look for the optional GatherableTextData section when deserializing, patch the contents and write back out the data, patching up the summary size as necessary since this section does not have a fixed size based on item counts (i.e. it doesn't use the name table, so a string changes affect the size)
- Added additional mapping for VerseAssetPaths which appear in GeneratedTextData (e.g. /localhost/Normal/PackagePath/PackagePath)

#jira UE-216649
#rb Francis.Hurteau
#rnx

[CL 34614882 by kevin macaulayvacher in ue5-main branch]
2024-06-24 14:51:41 -04:00
yoan stamant
938f456b05 Moved UserDefinedStruct to CoreUObject
#jira UE-216472
#rb Devin.Doucette

[CL 34495793 by yoan stamant in ue5-main branch]
2024-06-19 08:00:57 -04:00
gary yuan
f85b2347ba [Backout] - CL34482589
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
Moved UserDefinedStruct to CoreUObject
#jira UE-216472
#rb Devin.Doucette

[CL 34486763 by gary yuan in ue5-main branch]
2024-06-18 20:05:51 -04:00
yoan stamant
b9344fb62e Moved UserDefinedStruct to CoreUObject
#jira UE-216472
#rb Devin.Doucette

[CL 34482607 by yoan stamant in ue5-main branch]
2024-06-18 17:57:11 -04:00
kevin macaulayvacher
1745059f8d Adds support for multiple plugins in AssetHeaderPatcher.
We now separate the passed in remapping paths to be categorized by plugin when considering mappings for external actors/objects.

#rb Dave.Belanger, Francis.Hurteau
#rnx

[CL 34317882 by kevin macaulayvacher in ue5-main branch]
2024-06-12 14:56:27 -04:00
kevin macaulayvacher
a42492642f Fixes AssetHeaderPatcher from generating incorrect remappings for strings containing a '_[0-9]+' suffix.
Special handling is done to add mappings for src -> dst strings with and without a '_[0-9]+' suffix since this suffix comes from FNames and will be stripped from the NameTable. Since we want to patch the NameTable we need to ensure any mapping with such a suffix also has a mapping for when its suffix is stripped. The previous code attempted to do this however it was only providing a mapping where the Src string stripped off the suffix and incorrectly mapped to the Dst string that still had its suffix. This made any lookup into the NameTable appear as if a new entry should be added but could instead result in new entries being added to the table that are identical to pre-existing entries once the number suffix is stripped. You could also have multiple Src strings such as 'SrcName_1' and 'SrcName_2' be given a 'SrcName' -> 'DestName1', 'SrcName' -> 'DestName2'  mapping which is ambiguous.

The new code does the following:
- Avoid creating FNames from input strings to check if the string contains a '_[0-9]+' suffix and instead does a reverse scan of the string. This avoids FName allocations and unnecessary string copies.
- Strips number suffixes from both Src and Dst when they exist, mapping the stripped versions of both to one another
- Only provides a PackageName mapping when SrcPackage and DstPackage don't match otherwise we do unnecessary stripping, lookups and patching

#rb Francis.Hurteau
#rnx

[CL 34180940 by kevin macaulayvacher in ue5-main branch]
2024-06-06 19:11:49 -04:00
kevin macaulayvacher
471b87e1df Allow AssetHeaderPatching validation to pass for Talisman by removing the additional mapping for names with numbers appended. This will be properly addressed in FORT-752134
#rb Francis.Hurteau
#rnx
[FYI] andrew.phillips

[CL 34145238 by kevin macaulayvacher in ue5-main branch]
2024-06-05 20:16:36 -04:00
kevin macaulayvacher
276b4f0c45 Fixes an issue in Asset Header Patching where we would find the source PackageRootName and replace any string that matches it with the destination PackageRootName. This replacing would result in potentially ignoring the mapping the user provided but also potentially rename various asset paths that happen to contain the same substring as the source PackageRoot.
We now break the passed in Long-form Package paths into their 2/3 parts, PackageRoot, PackagePath (might be empty) and PackageName, and create mappings from source -> destination only when the exact portions of the path map. Special handling is needed for the __ExternalActors__ and __ExternalObjects__ directories since remapping a package may require the subdirectories under __ExternalActors__ to need remapping as well, in addition to the SrcPackageRoot -> DstPackageRoot change.

#rb Dave.Belanger, Francis.Hurteau
#rnx

[CL 34126213 by kevin macaulayvacher in ue5-main branch]
2024-06-05 11:20:27 -04:00
andrew phillips
d42f70e0d0 Adding Multi root remapping to header patcher for Duplicate plugin.
#ushell-cherrypick of 33722350 by andrew.phillips
#rb Francis.Hurteau

[CL 34031587 by andrew phillips in ue5-main branch]
2024-05-31 09:56:56 -04:00
julien stjean
10402eed8a Fixed a crash when canceling an asset migration. When moving back the packages to their original path there could be some packages left from the migration.
#jira UE-215128
#rb Alexis.Matte

[CL 33860163 by julien stjean in ue5-main branch]
2024-05-23 09:35:57 -04:00
alexis matte
52a47b3637 AssetTools: Add a IAssetTools::SanitizeName function. Interchange call the new sanitize code API when sanitizing a name, not when sanitizing a path.
#jira UE-215108
#rnx
#rb Dave.Belanger, JeanLuc.Corenthin

[CL 33791465 by alexis matte in ue5-main branch]
2024-05-21 08:37:48 -04:00
logan buchy
f1fc87f369 Unregister AssetDefinitions from registry
* Sync function was not taking into account unregistered AssetDefinitions - the fix is to iterate the AssetTypeActions also and find corresponding AssetDefinitions and remove if there is none.
* SAssetFilterBar caches AssetDefinitions - added a notification for when the AssetDefinitionRegistry changes.  Put the broadcast on a one-shot ticker instead of directly calling as the Register/Unregister can occur frequently.  Breaks up the callback depth.
* Added a "Version" to AssetDefinitionRegistry as clients were using the number of assets as a version. This can fall over if there is an Add and Remove between two calls to GetAllAssetDefinitions.

#jira UE-213686
#rb aditya.ravichandran, jered.mcferron

[CL 33704087 by logan buchy in ue5-main branch]
2024-05-16 18:41:47 -04:00
dominic couture
3518e1ace4 Iterate over migrated packags and do WorldCleanup() on found world. This is necessary to avoid various issues iwht Unitialization() in the BeginDestroys() of world subsystems.
#jira UE-214541
#rb JeanFrancois.Dube, Julien.StJean

[CL 33639981 by dominic couture in ue5-main branch]
2024-05-14 19:28:16 -04:00
andrew phillips
376f5c1ac6 Added Genoration of patching rule for source project that have a _[0-9]+ style suffix for header patching
AssetTools.cpp is the substance for this fix.
ValkyrieProjectManager and DuplicatePluginCommandlet are for testing on Horde.


#rb Francis.Hurteau

[CL 33573769 by andrew phillips in ue5-main branch]
2024-05-10 09:53:58 -04:00
julien stjean
ba4abe419f When importing an asset never force a content browser sync if the caller didn't want a sync.
This fix an issue where the import of an asset pack would cause one of the CB to loose its setting because the tab was open to early in the engine boot cycle.

#jira UE-212259
#rb Alexis.Matte

[CL 33546452 by julien stjean in ue5-main branch]
2024-05-09 11:04:17 -04:00
liz barrett
4f96eed56b Updated ExportAssets to include option for using CleanFileName as the file name
This changelist adds a new function to asset tools in order to export assets using their clean file name. Without this change, the assets are exported to their desired destination -- but the asset is copied over nested in it's entire existing path

I also added this as an entirely new method in order to avoid changing all of the other call sites where `ExportAssets` was being used.

#tests
-Ran editor locally, confirmed using this new method exported assets using the new function

#rnx
[REVIEW] [at]jay.nakai, [at]michael.ekberg, [at]jay.thrash, [at]fernando.pereira, [at]jonathan.younger
#rb geoffrey.wong, michael.ekberg

[CL 33357074 by liz barrett in ue5-main branch]
2024-04-30 18:24:20 -04:00
robb surridge
4db3abad42 Reword confirmation dialog for existing assets.
#jira UE-198862
#rb brooke.hubert

[CL 33238041 by robb surridge in ue5-main branch]
2024-04-25 13:54:24 -04:00
alexis matte
03ab547399 Interchange: If we discover we override an existing asset before starting the import, enqueue a real re-import.
#rb JeanLuc.Corenthin
#rnx

[CL 33180214 by alexis matte in ue5-main branch]
2024-04-23 17:13:02 -04:00
robert millar
afb65887a1 Optimizing path permission list checks in ContentBrowserAssetDataSource by optimizing the checks themselves and skipping checks for child paths where possible.
Store paths in permission lists in TDirectoryTree so that checks scale with path depth rather than number of paths.
Add PassesStartsWithFilterRecursive which can return whether a Fail/Pass result for a particular path can be followed by a Pass/Fail result for a child path. (e.g. a path is allowed and there are no explicit denials for any children of that path)
Deprecate GetDenyList and GetAllowList.
Add unit tests for FPathPermissionList.

#rb Julien.StJean, Rex.Hill

[CL 32868537 by robert millar in ue5-main branch]
2024-04-10 19:34:36 -04:00
julien stjean
c4d205f74f Removed the cause of the some warning in our asset mirgration test.
One was caused by the import validation not accounting for the package remapping when validating the class of the import in the linkerload.

The other was caused by some code in the open world tech that asked the asset registry to scan for a file that doesn't exist. This one is resolved by putting the flag to tell the engine that the instanced package from migration don't have on disk file.

#jira UE-209054

#rb JeanLuc.Corenthin, Francis.Hurteau

[CL 32792908 by julien stjean in ue5-main branch]
2024-04-08 10:46:56 -04:00
andrew phillips
22e4c49766 Fix for using Headerpatching issues when running LCW automated test.
Requires
Valkyrie.CopyProjectUsingAssetHeaderPatching true
Valkyrie.UseAssetToolsHeaderPatching true

There are 2 parts to the fix.
1. The header patcher now detects if the new string has the _$number, and uses the parsing constructor which sets the FNames number consistently. else it uses the original number in that particular FName.
2. The generation of the patching maps now look for sources that have the _$number, and create entries with those stripped.


#rb Francis.Hurteau

[CL 32502290 by andrew phillips in ue5-main branch]
2024-03-26 05:27:41 -04:00
richard malo
c9222edfdb Added new class UDeletedObjectPlaceholder to properly handle when an external package contains no more object.
- Ground work for full support of moving an actor from one External Data Layer to another
- Fixes the Save Package dialog not showing the last valid actor's display name (instead was showing the package name)
- Fixes empty packages not properly cleaned up by ULevel::CleanupLevel
- Changing level's bUseExternalActors from true to false and reloading the level without saving now properly works
#rb jeanfrancois.dube

[CL 32209376 by richard malo in ue5-main branch]
2024-03-13 08:01:53 -04:00
aditya ravichandran
2bb9133247 AssetTools: Fix a bug where FAssetDefinitionProxy::GetIconBrush was calling AssetDefinition->GetThumbnailBrush instead of AssetDefinition->GetIconBrush
#rb JeanMichel.Dignard

[CL 31945684 by aditya ravichandran in ue5-main branch]
2024-03-01 11:36:04 -05:00
yafes sahin
8c78548e84 - IAssetTools.h expose bPrompt and create bIgnoreDependencies
- AssetTools.cpp add a case to only copy the selected assets and ignore the dependencies (usecase for automation)
- Added BP example that implements the scripted asset action with the new migrationOption

#rb Julien.StJean, Takashi.Kuribayashi
[FYI] Michael.Lentine
#tests

[CL 31930249 by yafes sahin in ue5-main branch]
2024-02-29 19:11:14 -05:00
julien stjean
ca34575235 Fix the blocked import of a folder when using the extension permissions.
Also I moved the permissions logic closer to the code that actually handle the import.

#rb Alexis.Matte

[CL 31685813 by julien stjean in ue5-main branch]
2024-02-21 11:41:24 -05:00