Commit Graph

1667 Commits

Author SHA1 Message Date
dave jones2
ece8a053f4 Removed unncessary FLinkerLoad::StaticInit.
This appears to be a really old holdover from early UE4 development. It was originally introduced in CL 1258792 to satisfy a lingering Engine dependency. However, that dependency was eventually removed in CL 3119255, which this change probably should've been lumped with.

#jira nojira
#rb marc.audy, robert.manuszewski

[CL 16351204 by dave jones2 in ue5-main branch]
2021-05-17 11:01:55 -04:00
Tim Smith
f9d1032a62 Adding CLASSCAST flags for the new LWC property. It was acting as a numeric when used in an IsA<> test. This resulted in UHT accepting any numeric as a valid blueprint type.
#rb andy.davidson
#rnx

[CL 16330599 by Tim Smith in ue5-main branch]
2021-05-14 11:51:35 -04:00
Matt Peters
b90ea68f18 VirtualBulkData and EditorDomain: Do not update the PackagePath for VirtualBulkData if SavePackage is saving to a copy rather than updating the Package's PackagePath.
#rb Paul.ChipChase
#rnx

[CL 16328647 by Matt Peters in ue5-main branch]
2021-05-14 08:35:53 -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
aurel cordonnier
8eebe8841f Merge UE5/RET @ 16305968 to UE5/Main
This represents UE4/Main @ 16261013 and Dev-PerfTest @ 16259937

[CL 16306996 by aurel cordonnier in ue5-main branch]
2021-05-12 18:10:03 -04:00
RobertVater
6b04af6ace PR #7908: FPrimaryAssetID can now be serialized into a FArchive (Contributed by RobertVater)
#jira UE-115186
#preflight 609bc9978f6375000101480f

[CL 16298628 by RobertVater in ue5-main branch]
2021-05-12 09:45:16 -04:00
Benn Gallagher
7f2e95997c Chaos: Fixing implicit type conversions where there could be data loss.
Mostly casting directly to the correct type but caught a few bugs in selected types that are now fixed)
Also made such conversions warnings within the Chaos and ChaosCore modules, may promote to error once we're sure it's buliding fine.
#rb cedric.caillaud
#jira UE-88355
#preflight 609a5e934cb94000015ae9f1

[CL 16268359 by Benn Gallagher in ue5-main branch]
2021-05-11 09:48:22 -04:00
paul chipchase
aef4aad935 Enabling the use of Virtualized BulkData api for both static meshes and textures. NOTE: This will not start virtualizing content data
This will cause the old bulkdata objects to be upgraded when loaded in the editor and saved out in the new format when the package is next saved.

#rb PJ.Kack
#rnx
#preflight 609a4df10ba7b600015e0da2

* UE5CookerObjectVersion
- Note that this work was done in CL 16266112 (it was easier to update this on the DevCooker branch)
- Moved UE_USE_VIRTUALBULKDATA to VirtualizationManager.
- Moved the virtualization versions to UE5MainStreamObjectVersion.
- Note that no package would have been saved with UE_USE_VIRTUALBULKDATA so it is safe to just move the versions.

* UE5MainStreamObjectVersion
- Added the virtialization versions here
- Fixed up some white space issues

* VirtualizationManager
- UE_USE_VIRTUALBULKDATA is now controlled from here.
- When disabled (set to 0) a new code path UE_VBD_TO_OLD_BULKDATA_PATH will be enabled that will attempt to allow packages saved with VBD to be reverted safely.
-- This requires that a new version be added to FUE5MainStreamObjectVersion, there is a static assert to warn people about this.

* VirtualizedBulkData
- Added a new method ::ConvertToOldBulkData which will load the VBD payload from disk and then pass it to the old bulkdata object provided. This is not as efficient as the OldBulkData->VBD path but is only provided as an emergancy way for us to back out if needed, we do not expect this code to actually be used.
- Fixed a bug where converting an empty bulkdata object to VBD would give a warning about invalid guids. If the provided bulkdata object is empty then it is likely that we will not have generated a unique guid for it anyway. A VBD object with no payload would expect to have an unset FPayloadId AND an invalid bulkdata identifier anyway so we can just do that and only warn in the case that a valid payload has no valid guid provided. This has a bonus of making the code easier to read as well.

* StaticMeshSourceData
- Updated MESHDATAKEY_STATICMESH_DERIVEDDATA_VER when UE_USE_VIRTUALBULKDATA is enabled again.
-- This probably isn't required but in theory some of our tests could've written mesh description data to the DDC with the old key, so we should update it to play it safe.

* Texture
- Converted to use FUE5MainStreamObjectVersion for it's version number
- Added a code path that will allow us to convert back to using old style bulkdata if UE_USE_VIRTUALBULKDATA is disabled and UE_VBD_TO_OLD_BULKDATA_PATH is enabled.

*MeshDescription
- Converted to use FUE5MainStreamObjectVersion for it's version number
-- Note that we don't have to tell the archive that we are using this because this was already happening.
- Added a code path that will allow us to convert back to using old style bulkdata if UE_USE_VIRTUALBULKDATA is disabled and UE_VBD_TO_OLD_BULKDATA_PATH is enabled.

[CL 16266408 by paul chipchase in ue5-main branch]
2021-05-11 06:28:45 -04:00
paul chipchase
def5860258 Clean up FUE5CookerObjectVersion/UE_USE_VIRTUALBULKDATA in preperation for enabling virtualized bulkdata.
- Moved UE_USE_VIRTUALBULKDATA to VirtualizationManager.h as it will no longer control versioning in any fashion.
- Remove virtualization versions from FUE5CookerObjectVersion (which were never enabled so this is safe to do)
- This is a partial extraction from the CL that will enable virtualized bulkdata but it will be easier to do some of the cleanup in DevCooker first and cherrypick to main then do a full merge up back to DevCooker to avoid a number of merging issues.
- Note that with this submit enabling UE_USE_VIRTUALBULKDATA will not work until the main submit to main, however nobody should be enabling that so it shouldn't matter.

#rb PJ.Kack
#rnx
#preflight 609a35e00fb8f20001688598
#ushell-cherrypick of 16265784 by paul.chipchase

[CL 16266112 by paul chipchase in ue5-main branch]
2021-05-11 04:42:24 -04:00
Jamie Dale
b2714a5f29 Fixed FMemberReference::ResolveMember failing to resolve fields from a parent interface
This was due to TFieldIterator skipping interfaces by default, which is what the various FindField/Property functions use internally.

This change also cleans-up TFieldIterator so that you can control its behavior with a single flags value (rather than 3), via a new constructor that takes a EFieldIterationFlags value (now the default constructor), with the older-style EFieldIteratorFlags values being proxied from the older multi-parameter constructor.

#preflight 60947bffc6c42e0001298c56
#rb Marc.Audy

[CL 16238110 by Jamie Dale in ue5-main branch]
2021-05-07 11:17:07 -04:00
Matt Peters
804a5c489d Add PreObjectSaveContext to OnObjectSaved delegate. Use the information to skip the recalculate of Actor descriptions when making an EditorDomainSave; this was causing dangling pointers since EditorDomainSaves can occur during a load.
#rb Francis.Hurteau, Jean-Francois.Dube
#rnx

[CL 16225862 by Matt Peters in ue5-main branch]
2021-05-06 16:45:52 -04:00
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
JeanFrancois Dube
e9b4ddd759 Add support for objects that changed class in LinkerLoad.
- With external actors, it is now possible for an actor to change class and be saved without it's referencer objects to be resaved.
- That was impossible to happen in standard levels, as you would have resaved the level and all possible referencers were resaved at the same time.
- To fix that, change how exports are hashed in the linker, to be able to resolve imports solely by name (removed the class and class package filters).
- Object properties will properly filter incompatible objects based on their expected class.

#jira none
#rb francis.hurteau
#preflight 60919d1f90631e0001dc3f0f

[CL 16205807 by JeanFrancois Dube in ue5-main branch]
2021-05-05 07:49:48 -04:00
Matt Peters
358cc205fd #jira FORT-370001 Speculatively disable IsPossiblyAllocatedUObjectPointer; it might be producing false positive errors on valid pointers.
#rb None (Slack discussion with Steve Robb and others)
#rnx

#ushell-cherrypick of 16202495 by Matt.Peters

[CL 16202707 by Matt Peters in ue5-main branch]
2021-05-04 23:31:34 -04:00
Matt Peters
6935c29d01 Create function UStruct::GetSchemaHash. This function provides a hash that can be used to check whether tagged property serialization stored in a saved package is a match for the current binary's UClasses. This hash can be used to test whether versioned tagged property serialization will produce unchanged results, and whether unversioned property serialization will succeed.
#rb Johan.Torp
#rnx

[CL 16186852 by Matt Peters in ue5-main branch]
2021-05-03 16:54:05 -04:00
paul chipchase
71b969d9c4 Cherrypicking Mirage code base (disabled) from Dev-Cooker
- The mirage specific code is disabled behind the define UE_USE_VIRTUALBULKDATA, this means that some code paths in Texture/Mesh are much more complex than they need to be as we support both old and new paths. Once the system has been turned on and confirmed to cause no issues then this will be stripped out.
- SavePackageUtilities.cpp, SavePackage.cpp and SavePackage2.cpp are editgrates rather than integrations as those files have changes in DevCooker that we don't want to bring over immediately.
- Also includes a prototype system for storing bulkdata in a sidecar file in the workspace domain rather than in the .uasset/.umap file which although has been discontinued as part of mirage, will have applications for future work for non-virtualized projects and/or text based assets.

#rb Patrick.Finegan (all changes have been reviewed when submitted to Dev-Cooker)
#tests Cooking and running ShooterGame/Frosty and other sample programs using megascan assets
#rnx
#preflight  608be50d870cf400013ff99d

[CL 16167285 by paul chipchase in ue5-main branch]
2021-04-30 08:14:54 -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
c917563040 EditorDomain - Add in-process save, enable asynchronous EditorDomain loading, and add some cleanup for EditorDomainSave.
#rb Zousar.Shaker
#rnx

[CL 16145373 by Matt Peters in ue5-main branch]
2021-04-28 12:34:08 -04:00
PJ Kack
6d27dd246d Clang compile fix for 15735615 to avoid deprecation warning for FPackageFileSummary::Guid in implicit constructors
#jira none
#rb none
#rnx

#ROBOMERGE-OWNER: pj.kack
#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 16139414 in //UE4/Release-4.27/... via CL 16139466
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Staging) (v789-15992632)

#ushell-cherrypick of 16142572 by pj.kack
#preflight 60895997f1a052000177199d

[CL 16143405 by PJ Kack in ue5-main branch]
2021-04-28 10:17:05 -04:00
Johan Torp
e21134f375 Optimize asset registry UpdateTemporaryCaches()
Saves 100ms in Engine::Init() w/o UAssetManager::Push/PopBulkScanning optimization and 35ms with it, measured on Gen5 for an internal project.

#rb matt.peters

[CL 16142419 by Johan Torp in ue5-main branch]
2021-04-28 07:53:44 -04:00
Francis Hurteau
7cca09843e Add a way to set an output device to record error during linker save serialization
Error out when there is an error on the linker save during export serialization
LinkerSave will now set an error on the archive when a name is unable to be mapped and during serialization
Still run save cleanup for a package if errors are encountered

#rb Matt.Peters
#jira FROST-2374
#preflight 608882a038dfe40001edf3dd

[CL 16133989 by Francis Hurteau in ue5-main branch]
2021-04-27 18:25:03 -04:00
Matt Peters
384daee94f Fix SavePackage ensure that can occur if there is an Asset object in a package that is not the primary Asset and is not standalone.
#rb Francis.Hurteau
#rnx

[CL 16113956 by Matt Peters in ue5-main branch]
2021-04-26 10:12:58 -04:00
Marc Audy
38cdce1b97 Reenable ability to override native class from blueprint
Added a config variable to allow it to be turned off, but it will default to on.
#rb Phillip.Kavan

[CL 16095004 by Marc Audy in ue5-main branch]
2021-04-22 13:00:25 -04:00
Jamie Dale
00c1da79ba Removed selection annotations
These existed as an optimization for USelection to quickly know if an object was selected, without having to test its array. UTypedElementList has that optimization embedded, so at this point the selection annotations are just extra state to keep in-sync, and failure to do so has already lead to bugs.

This change removes them in the simplest way possible, by using a function pointer to callback into editor code from core/engine code (as core/engine cannot directly access the global selection state), though longer-term we probably want to remove IsSelected/IsSelectedInEditor from UObject and let specific systems provide that functionality if they need it (eg, AActor/UActorComponent could provide it by getting the selection set from the owner world, rather than the global state).

#rb Brooke.Hubert
#preflight 607de942e7a5ac0001a6b7d6

[CL 16075785 by Jamie Dale in ue5-main branch]
2021-04-21 12:38:24 -04:00
Jamie Dale
d5aee0838d Removed direct use of GSelectedObjectAnnotation
- Added a way for UEdGraphNode_Comment to override its global editor selection state.
 - Updated UControlRigGraph to use that method, rather than directly adjust GSelectedObjectAnnotation.

#rb Brooke.Hubert

[CL 16052224 by Jamie Dale in ue5-main branch]
2021-04-19 12:59:49 -04:00