Commit Graph

63 Commits

Author SHA1 Message Date
devin doucette
d1c875f0f1 Update the scoped IDO serialization context to disable unnecessary features too
It previously only enabled features, which would mean leaving impersonation and other features and their overhead enabled for objects that have do not have IDO support enabled.

#rb Francis.Hurteau
#rnx

[CL 35924966 by devin doucette in ue5-main branch]
2024-08-30 09:55:38 -04:00
devin doucette
7f1a3d1de4 Fixed garbage collection of IDOs
#rb Francis.Hurteau, Johan.Torp
#rnx

[CL 35626907 by devin doucette in ue5-main branch]
2024-08-19 11:29:59 -04:00
phillip kavan
821197e61e Restrict creation of placeholder types on editor load to missing Verse class imports only (temp).
#rnx
#jira UE-221559
#rb Andrew.Davidson, Francis.Hurteau

[CL 35512837 by phillip kavan in ue5-main branch]
2024-08-13 18:20:57 -04:00
jordan hoffmann
0e7439d345 [RegressionFix] IDO Impersonation broke on save causing unresolved loose properties to never get saved
#jira UE-221471
#rb Francis.Hurteau

[CL 35438539 by jordan hoffmann in ue5-main branch]
2024-08-09 18:30:54 -04:00
matt peters
54f2e9ae53 Cooker: SkipOnlyEditorOnly: Fix BlueprintGeneratedClass's adapter that declares all imports from UBlueprint to exclude imports from editor-only components on the class default object, or from any other editor-only non-blueprint-node objects within the package. We now only allow editor-only objects if they are subobjects of the UBlueprint.
#rnx
#rb eric.knapik

[CL 35422049 by matt peters in ue5-main branch]
2024-08-09 10:41:26 -04:00
devin doucette
281caadb03 Added creation of transient enums for IDOs to support unknown enumerators
#jira UE-211458
#rb Francis.Hurteau

[CL 35340774 by devin doucette in ue5-main branch]
2024-08-06 10:38:55 -04:00
andrew davidson
b4daf3cd25 Resubmit - Split IsInstanceDataObjectSupportEnabled into generic and per-object queries to avoid incorrect reporting with objects that were nulled due to unrecoverable serialization errors.
#jira UE-220661
#rb Devin.Doucette, jordan.hoffmann

[CL 35276395 by andrew davidson in ue5-main branch]
2024-08-02 11:44:35 -04:00
alex kahn
2538b4d895 [Backout] - CL35227832 - CIS UEFN Error
#rnx
[FYI] Andrew.Davidson
Original CL Desc
-----------------------------------------------------------------
Split IsInstanceDataObjectSupportEnabled into generic and per-object queries to avoid incorrect reporting with object that were nulled due to unrecoverable serialization errors.
#jira UE-220661
#rb Devin.Doucette, jordan.hoffmann

[CL 35237048 by alex kahn in ue5-main branch]
2024-07-31 22:13:00 -04:00
andrew davidson
2de6586f62 Split IsInstanceDataObjectSupportEnabled into generic and per-object queries to avoid incorrect reporting with object that were nulled due to unrecoverable serialization errors.
#jira UE-220661
#rb Devin.Doucette, jordan.hoffmann

[CL 35229918 by andrew davidson in ue5-main branch]
2024-07-31 17:45:36 -04:00
devin doucette
07287e4be5 Added tracking of unknown enum names
#jira UE-211458
#rb Francis.Hurteau

[CL 35192788 by devin doucette in ue5-main branch]
2024-07-30 14:56:36 -04:00
francis hurteau
e53fc8a61c Fixed instantiation involving placeholder objects to prevent them to be resolved in incompatible object property
added DecayTraits assertion on non resolved TObject
Also added helper to check if a class is an IDO class

#jira UE-220121
#rb Phillip.Kavan
#rnx

[CL 35120543 by francis hurteau in ue5-main branch]
2024-07-26 17:31:10 -04:00
francis hurteau
8b22b4be37 Add basic cooking / validation support when cooking with IDO enabled:
* Disable IDO impersonation when cooking, this result in not including loose property in cooked data if any
* Prevent cooking / saving if placeholder objects are found in the asset as data loss mitigation until placeholder object data can be properly serialized with prefabs

#rb Devin.Doucette
#jira UE-206749

[CL 35017215 by francis hurteau in ue5-main branch]
2024-07-23 09:35:17 -04:00
phillip kavan
6be5f860b2 Remove placeholder types at reinstancing time prior to reference replacement if class references are also being replaced.
Change summary:
- Added FPropertyBagRepository::RemovePropertyBagPlaceholderType().
- Modified FBlueprintCompileReinstancer::ReplaceInstancesOfClass_Inner() to explicitly remove placeholder types if also replacing references to old class objects. This will remove placeholder type objects from the internal property bag placeholder type registry prior to reference replacement.
- Fixed FPropertyBagRepository::ReassociateObjects() to use the pair's key rather than value in order to remove any placeholder type objects remapped to a new type at reinstancing time. Note: This path still applies when class references are not also being replaced at reinstancing time.
- Modified FPropertyBagRepository::CreatePropertyBagPlaceholderType() to ensure that placeholder type objects assemble the reference token stream at creation time (required for garbage collection).

#jira UE-207686, UE-218490, UE-218534
#rb jordan.hoffmann

[CL 34737296 by phillip kavan in ue5-main branch]
2024-06-28 09:41:53 -04:00
jordan hoffmann
f6dd4989df [BugFix] Fixed bug that caused CDOs to not get copied properly when generating IDOs
#rb Devin.Doucette
#jira UE-218244, UE-217948

[CL 34621857 by jordan hoffmann in ue5-main branch]
2024-06-24 17:27:36 -04:00
jordan hoffmann
7f04a77c76 - Changed "PropertiesSetBySerialization" to "SerializedProperties" and made the flag get set even for properties that were skipped during serialization. This way it's a better reflection of which properties were in the old class
- removed GMarkPropertiesSetBySerialization and added bTrackSerializedProperties flag to FUObjectSerializeContext to avoid race conditinons
#jira UE-217800
#rb Devin.Doucette

[CL 34385324 by jordan hoffmann in ue5-main branch]
2024-06-14 17:29:03 -04:00
devin doucette
b7be3b322a Added storage of unknown enum names
#jira UE-211458

[CL 34290747 by devin doucette in ue5-main branch]
2024-06-11 16:48:27 -04:00
jordan hoffmann
f892e8b1b6 [BugFix] Various UI bug fixes and updates for the InstanceDataObjectFixupTool
- changed the FRedirectedPropertyNode to use UE::FPropertyTypeName for it's types so that containers are distinguishable from one another
- made the fixup tool tabs have the name of the object they're fixing
- fixed the needs fixup warning to open several fixup tools if more than one object needs fixup rather than attempting multi-edit
- exluded VerseFunctionProperty from being made into loose properies since they can't realistically get fixed up
- fixed issue that caused incorrect properties to get marked as set by serialization during object copies

[CL 34210729 by jordan hoffmann in ue5-main branch]
2024-06-07 14:59:08 -04:00
ronald koppers
95d5fe7f46 Add TEDS' alert columns to the placeholder rows and components with loose properties.
The following additional changes were made:
- The fix up panel can now take an owning object. This is useful to lookup the object used by the component as in cases likes TEDS the object is used as the reference point.
- Added the central function `CreateInstanceDataObjectFixupDialog` to open up the fixup dialog with at least one tab. There are now multiple cases in code where this happens so helps keep consistency and reduce duplicated code.
- Added a new tag to identify loose properties.
- Added new TEDS queries for monitoring loose properties or placeholder tag and alerts so an alert action is added that pops up the fix-up tool.
- Expanded `RequiresFixup` to allow for recursively finding nested objects that require fixing up.
- Added `FindNestedInstanceDataObject` to allow IDOs to be retrieved for nested objects as well. An example is an entity with components that require fixing up, or all known IDOs under an object.
- Removed the memento registration for alerts. After a fix was done the memento would restore the alert again after it was cleared. A finer control over when alerts are recorded as mementos is needed.

#jira UE-215480
#rb jordan.hoffmann, Phillip.Kavan
[RN] Objects that fail to load now display an icon in the Outliner. Clicking the icon will bring up a tool that allows fixing issues.

[CL 34166340 by ronald koppers in ue5-main branch]
2024-06-06 14:06:27 -04:00
devin doucette
58c803af96 A few IDO-related changes
- Renamed CreateUnknownPropertyTree to FindOrCreateUnknownPropertyTree.
- Fixed an edge case where the property can be set wrong on the property tag.
- Fixed an edge case where the wrong property can be recorded as initialized.
- Added a test for unknown property tracking.

#rb Francis.Hurteau

[CL 33983975 by devin doucette in ue5-main branch]
2024-05-29 15:41:20 -04:00
devin doucette
8919a42a0c Made IDO functionality conditional on WITH_EDITORONLY_DATA
#rb Francis.Hurteau
#rnx

[CL 33930672 by devin doucette in ue5-main branch]
2024-05-27 16:26:24 -04:00
jordan hoffmann
d557375c7c [CrashFix] removed erronous code that was causing all transient objects to have IDOs, and also disabled IDOs for class default objects
#jira UE-213664
#jira UE-213682
[CrashFix] fixed a bug in CPFUO and in StaticDuplicate that was causing several objects to not get IDOs on reinstantiation
[Feature] added helper structs for enabling/disabling IDO flags on load and save
#jira UE-213135
#jira UE-213126
#jira UE-213908
#jira UE-213904
#rb Francis.Hurteau, Phillip.Kavan

[CL 33878733 by jordan hoffmann in ue5-main branch]
2024-05-23 18:36:23 -04:00
devin doucette
0aab94294a Added optional tracking and persistence of which properties have been initialized
#jira UE-212423
#rb Francis.Hurteau
#rnx

[CL 33798808 by devin doucette in ue5-main branch]
2024-05-21 12:17:02 -04:00
jordan hoffmann
d41fa50509 [Feature] Added bNeedsFixup flag to objects in the repository
#jira UE-210753

[CL 33733014 by jordan hoffmann in ue5-main branch]
2024-05-17 15:07:10 -04:00
devin doucette
5047df6573 Added loading of missing structs into IDOs
#jira UE-214628
#rb Francis.Hurteau
#rnx

[CL 33581357 by devin doucette in ue5-main branch]
2024-05-10 14:05:52 -04:00
phillip kavan
b888aac77b Revise TObjectPtr to use pointer semantics for type safety checks (editor only).
Notes:
- This replaces the previous solution that relied on indirection.
- This solution relies on packed ref handles which requires late resolve features to also be enabled.

Change summary:
- Modified FPropertyBagRepository::IsPropertyBagPlaceholderType()/IsPropertyBagPlaceholderObject() to make the parameter read-only.
- Re-enabled UE_WITH_OBJECT_HANDLE_TYPE_SAFETY for the editor context. This will unblock testing of IDO w/ placeholder type features.
- Modified UE::CoreUObject::Private::Pack() to include a new "type" trait bit in the packed object handle reference. If set, it will signal that the reference is also a placeholder-typed object.
- Modified UE::CoreUObject::Private::MakePackedObjectRef() to include a check for whether or not the given object reference is also a placeholder-typed object, and allow this case to pass.
- Added UE::CoreUObject::Private::IsObjectHandleTypeSafeNoReadNoCheck(). This allows the implementation of IsObjectHandleTypeSafe() to rely on packed reference semantics, which are implemented as internal inline definitions.
- Modified FLinkerLoad serialization of FObjectPtr values to register a packed object reference mapping for placeholder-typed objects. Note: This requires late resolve features to also be enabled.
- Modified the TObjectPtr equality test to handle the case when only the RHS side is NULL. This can occur if the RHS is a non-UObject-type bound ptr to a placeholder object while the LHS is not.
- Revised all object handle/ptr unit tests for type safety. Ensured that TObjectPtr stress tests are still in line both with/without type safety enabled.
- Added a GObjectIndexToPackedObjectRefDebug global ptr to assist with debugger visualization of resolved placeholder-typed object references to allow for removal of RF_HasPlaceholderType.
- Updated VS natvis file to revise queries for IsPlaceholderObject() on non-UObject-typed TObjectPtr values (removed ObjectFlags check and replaced w/ GObjectIndexToPackedObjectRefDebug).
- Deprecated/removed all usage of RF_HasPlaceholderType (no longer required).
- Removed FPropertyBagRepository::PropertyBagPlaceholderTypeRegistry and decoupled the current (static) API from the repo singleton instance.
- (Minor) Fixed up some handle tracking unit tests in ObjectPropertyTest.cpp that did not compile with UE_WITH_OBJECT_HANDLE_LATE_RESOLVE disabled.

#jira UE-212508, UE-197358
#rb Zousar.Shaker

[CL 33397676 by phillip kavan in ue5-main branch]
2024-05-02 11:25:44 -04:00