Commit Graph

1753 Commits

Author SHA1 Message Date
robert millar
9d74d688f9 Deprecate FNames containing full object paths.
#jira UE-161932
#rb none
#preflight https://horde.devtools.epicgames.com/job/6328da74331ace46b5c0c0f5?step=a789

[CL 22088586 by robert millar in ue5-main branch]
2022-09-20 00:46:13 -04:00
dave jones2
50533cba09 UE-145634 - Delegate fixup doesn't work when bound functions are not in the current BP
Another consequence of using doubles everywhere in Blueprints is that delegate binding can fail if a native delegate signature uses floats. The initial attempt at fixing this would update modify function pins in the current Blueprint to use PC_Float as a subcategory if it was used in a delegate binding. Unfortunately, this doesn't work if we're binding to a function in a different BP class. Attempting to fix up those functions would dirty several Blueprints, and likely confuse users.

The approach that we take here creates a proxy delegate function that matches the underlying signature. The proxy's function graph will then call the original bound function, which implicitly handles any double/float conversions. Additionally, we'll perform a "capture" of any actors that we need to call the bound function on. The compiler will add a new hidden property for the actor class, which we set in the original graph that had the bound delegate. The proxy function graph will then read this property when it calls the original function.

#jira UE-145634
#preflight 63191b1cb069eea9ab594ea2
#rb phillip.kavan

[CL 22087332 by dave jones2 in ue5-main branch]
2022-09-19 22:27:18 -04:00
Mattias Hornlund
15ec8ac39e Iris
- Fixed issue where custom property overrides was not properly initialzied for iris if set before beginplay/beginreplication
- Cleaned up delegates propagating custom property overrides to iris-replicationsystem
- Marked interface methods in IRepChangedPropertyTracker to be deprecated in the future and added routing of SetCustomActive override via FNetPropertyConditionManager::SetPropertyActiveOverride to allow for future removal of the interface

#jira https://jira.it.epicgames.com/browse/UE-158358
#rb Peter.Engstrom
#preflight 63285ec98131e92d65975851

[CL 22072998 by Mattias Hornlund in ue5-main branch]
2022-09-19 08:51:23 -04:00
nick darnell
4f276666f9 Making GetPath public for TObjectPtr to satisfy existing uses.
[CL 22064659 by nick darnell in ue5-main branch]
2022-09-16 21:00:29 -04:00
bryan sefcik
e5edfdd06d Added support to inline the gen.cpp files into the module cpp files.
This change does a few things:
* Improves compile times because the gen.cpp is inlined so less header parsing is required.
* Allows us to forward declare more types in the headers where we were not able to because the gen.cpp files did not have all the required headers included. The gen.cpp files required the header that generated it to include all the types because of the constructor and desructor in the gen.cpp need to know the full type.

#jira
#preflight 6323b43f8131e92d65aed1d9

[CL 22064061 by bryan sefcik in ue5-main branch]
2022-09-16 20:28:51 -04:00
nick darnell
4dc398d682 Fixing a COREUOBJECT_API being in the wrong spot on a struct for linux.
[CL 22064047 by nick darnell in ue5-main branch]
2022-09-16 20:28:05 -04:00
nick darnell
2a866db4f0 Core - Some more build fixes!
[CL 22064041 by nick darnell in ue5-main branch]
2022-09-16 20:27:52 -04:00
nick darnell
42c12e3776 Core - Adding support for getting the PathName from a ObjectPtr without resolving the Object*.
Core - Refactoring the Object Handle event callbacks so that we can hook and unhook them with delegates/delegatehandles.
Core - Adding support for detecting loads via object handles as a new event distinct from resolution callback.
Core - Expanding the utility functions on FObjectRef so that we can resolve it in a myraid of fashions to get the path, the class path, the full path and the export path.

[REVIEW] [at]Zousar.Shaker, [at]Joe.Pribele

[CL 22063982 by nick darnell in ue5-main branch]
2022-09-16 20:26:12 -04:00
nick darnell
4b6c70b5a6 Core - Changes the base CPPTYPE of FObjectProperty from UObject* to TObjectPtr<UObject>, this ensures that no matter how people access the value be it as a FObjectProperty or not, calling GetPropertyValue won't return a UObject* directly - which effectively would reinterpret cast a TObjectPtr, if it is one, and then if lazy loading is enabled would potentially result in a crash from trying to treat a non-pointer as a TObjectPtr.
Class - When iterating the classes sparse values, don't accidentally load deferred objects, or crash because you're reinterpret casting the value of something that isn't a pointer.

[REVIEW] [at]Zousar.Shaker, [at]Joe.Pribele

[CL 22063963 by nick darnell in ue5-main branch]
2022-09-16 20:25:31 -04:00
phillip kavan
33f35205b9 Defer import class verification to creation time when appropriate so that we don't emit load linker warnings for false positives.
#jira UE-163652
#rb Francis.Hurteau
#preflight 63224e239677b738f4118145

[CL 22041617 by phillip kavan in ue5-main branch]
2022-09-15 19:37:04 -04:00
Thomas Engel
f389bb820a Adding HDR playback capabilities to MediaFrameWork & Electra (PC, GDK, PS4, PS5)
#jira UE-163865
#fyi jens.petersam
#preflight 632357cdc225e8be3809214e

[CL 22034307 by Thomas Engel in ue5-main branch]
2022-09-15 14:30:21 -04:00
jamie dale
5f086b8c04 Allow existing FString/FName properties to be replaced by FTopLevelAssetPath without losing serialized data
#jira
#preflight 6320b7ea29254beccb77a340
#rb Robert.Millar

[CL 22020480 by jamie dale in ue5-main branch]
2022-09-14 19:57:38 -04:00
louisphilippe seguin
e738e717e3 Trace
* Added trace file created callback:  Useful to gather all trace files created during execution
* Added config option to disable or resize tail buffers via [Trace.Config]:TailSizeBytes
* Added config option for worker thread sleep time via [Trace.Config]:SleepTimeInMS
* Fixed init code so it never creates a workerthread in builds that don't support multithreading

#rb Martin.Ridgets, Ionut.Matasaru

[CL 22013173 by louisphilippe seguin in ue5-main branch]
2022-09-14 15:04:08 -04:00
robert millar
aecd0bd57f Update comment.
#rb none
#jira UE-161932
#preflight none

[CL 21997862 by robert millar in ue5-main branch]
2022-09-13 21:52:34 -04:00
joe pribele
b24a5bae94 [CoreUObject] fix for TObjectPtr.GetClass() crashing if TObjectPtr points to null.
#rb zousar.shaker
#p4v-preflight-copy 21901752

[CL 21985036 by joe pribele in ue5-main branch]
2022-09-13 12:24:17 -04:00
dmytro vovk
0050ce1cc7 Reverted change in //UE5/Main/Engine/Source/Runtime/CoreUObject/Public/UObject/Class.h revision 75
#rb none
#jira UE-163508
#preflight 63208095506f1a33e04756d4

[CL 21981922 by dmytro vovk in ue5-main branch]
2022-09-13 09:43:12 -04:00
Matt Peters
a8443cd211 TopLevelAssetPath: Fix constructors to allow UObject subclasses to use the UObject* constructor instead of trying and failing to use the CharType* constructor.
Allow UObject constructor to record a valid path to non-asset toplevelobjects, for consistency with the other constructors which are based on path strings rather than the virtual IsAsset function (which e.g. returns false for UClass).
#rb Robert.Millar
#rnx
#preflight 631f5eafd613b765fa391870

[CL 21967835 by Matt Peters in ue5-main branch]
2022-09-12 13:08:05 -04:00
dmytro vovk
48d468025d Replaced identical code in TCppStructOps to help older clang fold it.
#jira none
#rb none
#preflight 631b8f9fec45fbf3d784f0f7

[CL 21926120 by dmytro vovk in ue5-main branch]
2022-09-09 15:26:32 -04:00
Robert Millar
c11175e51c Fix GetLongPackageName and GetAssetName returning the string 'None' rather than empty strings when those components are empty.
#jira UE-163235
#rb carlmagnus.nordin
#preflight 631a4ba5967ffc68fbec609b

[CL 21902518 by Robert Millar in ue5-main branch]
2022-09-08 16:26:37 -04:00
nate strohmyer
5755e91904 Removing unacceptable words in Runtime/CoreUObject
#Jira UE-163059
#rb Marc.Audy
#preflight 6317c1452b7fe03eb650b501

[CL 21892698 by nate strohmyer in ue5-main branch]
2022-09-08 09:16:58 -04:00
joe pribele
3cdbbb2797 [CoreUObject] fix for PrintScriptCallstack not printing callstack to the immediate window
logging buffers any call not from the logging thread, added a call to Flush() to force the logger write.

added to improve efficiency in building a stacktrace

FFrame::GetStackDescription(FStringBuilderBase& StringBuilder)
FFrame::GetStackTrace(FStringBuilderBase& StringBuilder)
FFrame::GetScriptCallstack(FStringBuilderBase& StringBuilder, bool bReturnEmpty = false, bool bTopOfStackOnly = false)
UObjectBaseUtility::GetFullName(FStringBuilderBase& ResultString, const UObject* StopOuter = NULL, EObjectFullNameFlags Flags = EObjectFullNameFlags::None) const

#jira UE-161358
#rb zousar.shaker devin.doucette
#preflight 63178f86304480f8f8e1c961

[CL 21826435 by joe pribele in ue5-main branch]
2022-09-06 15:08:01 -04:00
Robert Millar
6a3da51ffd Removing FNames containing asset paths (/Path/To/Package.AssetName) or subobject paths (/Path/To/Package.AssetName:Inner).
These FNames can take 30mb+ of memory in a large project.
Refactor FSoftObjectPath to store a FTopLevelAssetPath instead of an FName for the top level asset part.
Refactor FAssetData to infer the object path from the PackageName and AssetName fields and an editor-only field called OptionalOuterPath for external actors which are non-top-level assets.
Refactor FAssetBundleData to only store top level asset references.
Increase EUnrealEngineObjectUE5Version for FSoftObjectPath invalidation.
Increase FAssetRegistryVersion to invalidate serialization of FAssetData and FAssetBundleData - asset registry serialization does not see EUnrealEngineObjectUE5Version.
Replace TMap in Asset Registry with TSet to avoid duplicating the key fields.
Remove object path FName fields from native blueprint make/break functions for FARFilter - those pins will be orphaned.
Refactor redirect collector to use soft object paths rather than FNames.

UE_DEPRECATED markers have been commented out in this change to allow separate submission of deprecation fixups across the engine.

#jira UE-161932
#rb matt.peters,francis.hurteau,ben.zeigler
#lockdown marc.audy
#preflight

[CL 21826272 by Robert Millar in ue5-main branch]
2022-09-06 15:02:43 -04:00
andy sonnenburg
6c474af8f6 Public change split off from internal change.
#rb andrew.scheidecker
#rb robert.manuszewski
#rb phil.pizlo


#preflight 63138222e11efde08fc159a9

[CL 21826267 by andy sonnenburg in ue5-main branch]
2022-09-06 15:02:33 -04:00
carlmagnus nordin
e582c065d7 ZenLoader: Initial support for loading packages in the editor
#rb pj.kack
#preflight 6310b0d1ea685939704bded6, 6311a3fa7778595cd69d7f6b
#jira UE-162812

[CL 21790081 by carlmagnus nordin in ue5-main branch]
2022-09-05 04:36:25 -04:00
nick darnell
8c6dccfce9 Core - Making some improvements to TObjectPtr, introducing some templating utilities so that we can better template match TObjectPtr vs UObject* pointers so that a single templated function can work for either.
Core - Added support for assigning a TObjectPtr<T> to a TScriptInterface just like you'd expect from a raw Object*.

Actor - Making a version of GetComponents that will work for TObjectPtr collections.  Additionally fixed several places in the engine where we're forcing the template parameter instead of allowing it to be determined automatically - which forced me to leave one of the GetComponent implementations, but I think we aught to remove it. e.g.

Don't Do

TArray<UPrimitiveComponent*> PrimComponents;
Actor->GetComponents<UPrimitiveComponent>(PrimComponents);

Do

TArray<UPrimitiveComponent*> PrimComponents;
Actor->GetComponents(PrimComponents);

Slate - Introducing support for collections of TObjectPtr<T>'s being used as source lists for the STableView.

#preflight 630f7af8e54ec9d581b03d65
[REVIEW] [at]Marc.Audy, [at]Steve.Robb, [at]Zousar.Shaker

[CL 21727328 by nick darnell in ue5-main branch]
2022-08-31 16:13:49 -04:00