Commit Graph

440 Commits

Author SHA1 Message Date
Benn Gallagher
8757cb3641 Physics interface cleanup.
* Removed deprecated or dead code paths
* Simplified build system setup for physics support
* Deprecated build system flags and unsupported macros

#jira none
#rb Chris.Caulfield, Kriss.Gossart
#preflight 62963ec0fe779f23c8ea0c5e

[CL 20450744 by Benn Gallagher in ue5-main branch]
2022-06-01 06:59:18 -04:00
robert manuszewski
d1443992e1 Deprecating ANY_PACKAGE.
This change consists of multiple changes:

Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used  in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values

AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes

Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names

#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32

#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20448496 by robert manuszewski in ue5-main branch]
2022-06-01 03:46:59 -04:00
jason hoerner
11ea386451 RHI validation fix: avoid redundant RHI frame begin/end when cubemap capture occurs during UEngine::Tick, and other Tick related functions where the RHI frame will already be active. A boolean "bInsideTick" flag is passed to UReflectionCaptureComponent::UpdateReflectionCaptureContents, specifying whether the cubemap capture is happening during Tick.
The four places this applies include UEditorEngine::Tick, UGameEngine::Tick, FAdvancedPreviewScene::Tick, and FPreviewScene::UpdateCaptureContents.  The last example is called from FBlueprintEditor::Tick and FThumbnailPreviewScene::Tick.

The counter-example is "UEditorEngine::BuildReflectionCaptures", which doesn't appear to be called anywhere from a Tick related function.  It's called in startup functions, various commands, and as part of static lighting generation.  If we run into further validation errors, we could add a flag to that function to differentiate those cases.  Even though there's only one counter-example, I figured it was best to err on the side of not changing behavior of client code that may also be using the function, so by default "bInsideTick" is set to false.

#jira UE-153604
#rb mihnea.balta jason.nadro
#rnx
#preflight 628d89082f2409bc1e08a42e

[CL 20362380 by jason hoerner in ue5-main branch]
2022-05-25 07:11:28 -04:00
richard malo
879c5c42c6 Added support of Data Layers inside Level Instances.
#rb jeanfrancois.dube, patrick.enfedaque, philippe.deseve
#jira UE-151266
#preflight 62796854a35fb5cb3f55e9e6

#ROBOMERGE-OWNER: richard.malo
#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 20121141 via CL 20121608 via CL 20121618
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20122781 by richard malo in ue5-main branch]
2022-05-10 10:22:54 -04:00
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -04:00
Jason Adcock
40f4bb3c85 open BogusMapName exits PIE instead of opening the default map
#jira UE-145700
#rb ryan.gerleve
#preflight

[CL 20031481 by Jason Adcock in ue5-main branch]
2022-05-03 16:03:17 -04:00
Matt Peters
9e62171ea4 EditorEngine::OnPreSaveWorld: do not CollectGarbage from EditorDomain saves. Keep the existing do-not-GC for cook saves, but extend it to cook saves when cooking in editor. Keep the existing special behavior (and do-not-GC) for autosaves. Autosaves cannot occur in commandlet, so we can simplify the branching paths somewhat.
#jira UE-150759
#rb Francis.Hurteau
#rnx
#preflight 627185069d6c2f8f5b298a7d

[CL 20030944 by Matt Peters in ue5-main branch]
2022-05-03 15:44:10 -04:00
Matt Peters
7ad238a806 AssetRegistry includes (Engine/Source): change #include "AssetData.h" -> #include "AssetRegistry/AssetData.h", and similar for the other moved AssetRegistry headers.
#rb Zousar.Shaker
#rnx
#preflight 6270509a220f89f0ad573030

[CL 20016982 by Matt Peters in ue5-main branch]
2022-05-02 18:06:48 -04:00
Matt Peters
cafc7ab8d9 Delete SavePackage1. It has been replaced by SavePackage2 and is no longer supported.
#preflight 626fd27dad00dced62bd9c52

[CL 20007527 by Matt Peters in ue5-main branch]
2022-05-02 09:04:05 -04:00
Patrick Enfedaque
571e57be04 Fix regression crash on App exit because of Initialized Inactive worlds (with initialized subsystems) that haven't been cleaned up
#rb Matt.Peters
#preflight 626c42fb0b45792efb65292e
#rnx

[CL 19984838 by Patrick Enfedaque in ue5-main branch]
2022-04-29 16:15:07 -04:00
Matt Peters
e6c9db19fb EditorDomain saving and UWorld: Add a tag that informs editor domain saves to keep the UWorld initialized, because UEditorEngine::Map_Load requires that it either be not-yet-initialized or that it is still fully initialized.
#rb Patrick.Enfedaque
#rnx
#preflight 626bdd5044703e0a24bf0123

[CL 19977055 by Matt Peters in ue5-main branch]
2022-04-29 08:53:53 -04:00
zach brockway
3a3ce4869b Virtual Scouting: Changes required for compatibility with OpenXR.
This migrates the mostly declarative action mappings in UVREditorInteractor::Init_Implementation into a new GetKnownActionMappings method, which we can poll in order to translate them into an OpenXR action set at the point during early initialization which OpenXR requires them to be registered. This also adds a `bIsAxis` flag to FViewportActionKeyInput, because axis mappings need to be handled differently.

The glue code leveraging this is introduced in a new VirtualScouting plugin, where we'll ultimately migrate the existing code as well (away from VirtualProductionUtilities).

#jira UE-146105
#rb Lauren.Barnes
#preflight 6261d5b00a1b9c4e192825ce

[CL 19857480 by zach brockway in ue5-main branch]
2022-04-21 18:49:47 -04:00
Cody Albert
cf44d611ed Fixed typo in GetScratchRenderTarget when generating 512x512 RT
#rb none
#preflight 6255be00cd5ed4dd091ffe6b

[CL 19725515 by Cody Albert in ue5-main branch]
2022-04-12 14:05:18 -04:00
simon tovey
d02d5f41ea Custom view frustum culling in Niagara.
- Reworked visibility settings into their own structure. Now has separete times for render based culling and view frustum culling.
- Improved Scalability Overrides UI.
- Now caching various view matrices on the world.
- Some 2D debug rendering helpers in Niagara Debug HUD.

#rb stu.mckenna
[FYI] mateo.egey
#preflight 62457713b6084b9832462147

#ROBOMERGE-OWNER: simon.tovey
#ROBOMERGE-AUTHOR: simon.tovey
#ROBOMERGE-SOURCE: CL 19571006 via CL 19571062 via CL 19571069
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19575801 by simon tovey in ue5-main branch]
2022-03-31 14:24:57 -04:00
mihnea balta
8b46b24b35 Don't force-flush render resources from UEditorEngine::Tick when PIE is running.
If realtime was disabled, the force-flush was happening even when PIE was active, which cost a lot of performance.

#jira UE-144517
#rnx
#lockdown Cristina.Riveron
#rb Jeannoe.Morissette
#preflight 622768a6e83598518f2e8268

#ROBOMERGE-AUTHOR: mihnea.balta
#ROBOMERGE-SOURCE: CL 19302848 in //UE5/Release-5.0/... via CL 19303931
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19346857 by mihnea balta in ue5-main branch]
2022-03-10 20:49:18 -05:00
patrick enfedaque
3387b5b97c CleanupPhysicsSceneThatWasInitializedForSave: Bring back CleanupWorld call to pre CL 16574665.
- Fix crash because of Subsystem Init call done through InitializePhysicsSceneForSaveIfNecessary not being matched with Deinit in CleanupPhysicsSceneThatWasInitializedForSave.
  This was delaying it to StaticExit() IncrementalPurgeGarbage causing some Subsystem objects to become invalid before the FSubsystemCollectionBase that contained them.
- Original change no longer necessary because CleanupWorldPartition is no longer called from within CleanupLevel

#jira UE-143535
#preflight 6217743b335015645d962f36
#rb matt.peters
#lockdown aurel.cordonnier
#rnx

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 19114405 in //UE5/Release-5.0/... via CL 19114673
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19152884 by patrick enfedaque in ue5-main branch]
2022-02-25 14:20:29 -05:00
Dan Thompson
d412b366a3 Adding support to writing platform specific tags to the asset registry during cook by the book.
FArchive now holds a "CookData" blob that contains relevant information for cooking. The TargetPlatform has been moved to this structure, and it has a reference to a CookContext that can hold data generated during the cook that doesn't get serialized to the uasset (in this case, the asset registry tags).
#rb Matt.Peters
#preflight 62151bc4797dbbeb472af77d
#preflight 621011f6ff52bfecfc032b15
#preflight 62152777141b500e17eb24ef

[CL 19076066 by Dan Thompson in ue5-main branch]
2022-02-22 13:32:02 -05:00
florin pascu
182d4743f3 Allow feature levels that do not work with Ray tracing to still be active in editor when Ray Tracing is turned on for the project.
#rb Jack.Porter
#jira UE-106873
#preflight 620a54f06e5d06a5428d512e
#lockdown Jack.Porter

#ROBOMERGE-AUTHOR: florin.pascu
#ROBOMERGE-SOURCE: CL 18979622 in //UE5/Release-5.0/... via CL 18979686 via CL 18979777
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18979784 by florin pascu in ue5-main branch]
2022-02-14 10:44:18 -05:00
daren cheng
0eb73b32d2 Fix editor throttling while VR headset attached.
#jira UE-139058
#preflight 620576a26d374b98b094d868
#rb Matt.Kuhlenschmidt
#lockdown JeanMichel.Dignard

#ROBOMERGE-OWNER: daren.cheng
#ROBOMERGE-AUTHOR: daren.cheng
#ROBOMERGE-SOURCE: CL 18952596 in //UE5/Release-5.0/... via CL 18952719 via CL 18952885
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)
#ROBOMERGE-CONFLICT from-shelf

[CL 18952956 by daren cheng in ue5-main branch]
2022-02-11 11:06:44 -05:00
Robert Manuszewski
0806c88f60 Terminating PIE will no longer assert when PendingKill is disabled and level leaks are detected. Added an ensure when reporting level leaks through UEngine::FindAndPrintStaleReferencesToObject() with PendingKill disabled.
#preflight 62066f7754003c49ad37ea0a
#rb Markus.Breyer

[CL 18951753 by Robert Manuszewski in ue5-main branch]
2022-02-11 09:28:34 -05:00
Robb Surridge
65a3c1236d Move IntroTutorials to a plugin. Part 1: move code module and clean up references.
#jira 141830
#preflight 6202f3e4bd4f846436f1dfc6
#rb lauren.barnes

[CL 18920903 by Robb Surridge in ue5-main branch]
2022-02-09 13:00:06 -05:00
Jason Nadro
135472bdb0 Adding functionality to compile remaining shaders for materials.
When running with ODSC in the editor Materials can have incomplete or partial shader maps.  In other words some shaders _might_ be missing.  If a render system requires all shaders to be present and can't use ODSC functionality to compile the necessary shaders we need a mechanism for compiling just the missing shaders.

- Added UMaterialInterface::CacheShaders() which is implemented for UMatetrial and UMaterialInstance.  The call is just forwarded along to CacheResourceShadersForRendering and InitStaticPermutation respectively.
- You can call CacheResourceShadersForRendering multiple times (even with a completed shader map) and it will not recache uniform expressions.  If the Resource's shader map is complete the function is a no-op.
- FObjectCacheContext can accept a UWorld and will only return primitives that are in that world.
- Added a function SubmitRemainingJobsForWorld(UWorld* World, EMaterialShaderPrecompileMode CompileMode) that will iterate all materials used by primitives in the world and compile the missing shaders.
- SubmitRemainingJobsForWorld() is used in various scenarios in the editor to ensure _all_ shaders are compiled for all materials before proceeding.
- Explicitly try to compile UI and PP materials.  Since we don't know which ones are used in the given world we just have to iterate all loaded ones.  This is a potential area of optimization.
- If there are already complete shader maps (if you are not running with the shader job cache), SubmitRemainingJobsForWorld is fast and results in a no-op for each material.

#rb Arciel.Rekman, Danny.Couture
#jira UE-136442, UE-136447
#preflight 61fc0e9c176256ec4f764206

[CL 18848560 by Jason Nadro in ue5-main branch]
2022-02-03 15:12:58 -05:00
bart hawthorne
7a1d76f765 Re-enable delegate calling in EEditorEngine::ShouldThrottleCPUUsage and reverse the action taken by Execute to make better sense with the delegate name
#rb rex.hill, eric.knapik
#preflight skip

#ROBOMERGE-AUTHOR: bart.hawthorne
#ROBOMERGE-SOURCE: CL 18812401 via CL 18812454 via CL 18817739 via CL 18817828 via CL 18817908 via CL 18835213 via CL 18835916
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18835946 by bart hawthorne in ue5-main branch]
2022-02-02 18:05:04 -05:00
Matt Kuhlenschmidt
521b360c9e Do not throttle cpu usage when benchmarking or automation testing
#rb none
#preflight none

[CL 18829200 by Matt Kuhlenschmidt in ue5-main branch]
2022-02-02 12:26:29 -05:00
patrick enfedaque
e6b2f88b02 Volume Factories: Avoid creating incompatible VolumeFactoryClass <-> VolumeClass pairings
#jira UE-140464
#rb brooke.hubert
#lockdown cristina.riveron
#preflight 61fa88e6cc4b837d9c5d1bba

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 18825947 in //UE5/Release-5.0/... via CL 18825951 via CL 18826477
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18826510 by patrick enfedaque in ue5-main branch]
2022-02-02 10:02:32 -05:00