Commit Graph

190 Commits

Author SHA1 Message Date
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
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
sebastian nordgren
57e39f65fa Scripted Asset Actions now work with collection parameters.
CPF_Parm was not being applied to child properties (ie. items in the array), and the IsPropertyVisible delegate wasn't checking parent properties for the flag, which was causing only the root to be visible. This is a result of a change made to the details view to run the IsPropertyVisible delegate more frequently - previously it was only run when initializing the property tree.

#jira UE-148027
#review-20008735 @jurre.debaare, @lauren.barnes
#preflight 6270dd90ae03caabf7103e9e

[CL 20023534 by sebastian nordgren in ue5-main branch]
2022-05-03 07:47:41 -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
vlad golovan
d2b2750c4a Adding a function that allows to specify ID to spawn a tab. Allows opening multiple copies of the same Editor Utility Widget.
#rb daren.cheng
[REVIEW] [at]marshall.beachy, [at]jay.Nakai

#ROBOMERGE-AUTHOR: vlad.golovan
#ROBOMERGE-SOURCE: CL 19982877 via CL 19982886 via CL 19982903
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19985940 by vlad golovan in ue5-main branch]
2022-04-29 17:07:20 -04:00
rex hill
428e0edbc8 Optimized editor utility level editor extensions to scale better with the number of actors selected
#rb Thomas.Sarkanen
#preflight skip

#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 19807799 via CL 19814115 via CL 19818185 via CL 19819291
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19821674 by rex hill in ue5-main branch]
2022-04-19 19:20:26 -04:00
Matt Peters
c1b46b1fed FAssetData: Callsites need to handle AssetData.GetClass() returning null. Added IsInstanceOf(UClass*) for the common operation GetClass() && GetClass->IsChildOf(BaseClass).
#jira UE-146521
#rb Zousar.Shaker
#rnx
#preflight 623874b789625f06129e466b

[CL 19450936 by Matt Peters in ue5-main branch]
2022-03-21 09:00:36 -04:00
ben hoffman
40bf799ab9 Add an input component to Editor Utility actor so that you can bind to enhanced input (and other runtime input delegates) in editor utilities outside of PIE. This will make it way easier for virtual production teams to bind input of physical camera equipment to actors in the level. They need these bindings available during the level editor and during PIE, which is why Enhanced Input is being used as it already has the good support for what they want, we just need to expose it in the editor.
Listening to input is opt in per utility, and would currently only be triggered if you create an associated Input Action that is available to the editor.

#jira UE-144959
#preflight 6230bb816d2227e2ef3f513b
#rb Lauren.Barnes
#rb Patrick.Boutot

[CL 19406938 by ben hoffman in ue5-main branch]
2022-03-16 12:09:09 -04:00
graham lewis
617d7ee557 UBlueprintAsyncActionBase:
- Made WorldContextObject parameter const in RegisterWithGameInstance.

UEditorUtilityBlueprintAsyncActionBase:
- Made WorldContextObject parameter const in overridden RegisterWithGameInstance.


#ROBOMERGE-AUTHOR: graham.lewis
#ROBOMERGE-SOURCE: CL 19371867 via CL 19371877 via CL 19372743 via CL 19373874 via CL 19373938
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19375204 by graham lewis in ue5-main branch]
2022-03-14 13:52:16 -04:00
daren cheng
7155dbbe04 Speculative fix crash FindUtilityWidgetFromBlueprint with invalid asset.
#preflight skip
#rb Patrick.Boutot

#ROBOMERGE-AUTHOR: daren.cheng
#ROBOMERGE-SOURCE: CL 19363746 via CL 19367188 via CL 19368473 via CL 19368520
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19369013 by daren cheng in ue5-main branch]
2022-03-12 20:50:59 -04:00
jeremy moore
fe453b026c Add support for warm up frames when doing an AsyncCaptureScene.
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 19322048 via CL 19322310 via CL 19322368 via CL 19327116 via CL 19328047 via CL 19328071
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19348318 by jeremy moore in ue5-main branch]
2022-03-10 22:04:48 -05:00
marc audy
cff01aa9fa Added support for native FProperty setters and getters.
Setters and getters are native functions called by FProperties when setting property values with *_InContainer functions.
Setters and getter function names can be manually specified with Setter = Func and Getter = Func keywords inside of UPROEPRTY macro but they will also be automatically parsed if the name is not explicitly specified if the setter or getter function name matches SetPropertyName and GetPropertyName pattern.
The latter behavior can be disabled in UHT's DefaultEngine.ini by setting AutomaticSettersAndGetters=False.
ImportText and ExportTextItem functions have been deprecated and should be replaced with *_InContainer or *_Direct variants.

#rb Steve.Robb
#preflight 6210a377a83e0bcefd03d9e1

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19070318 via CL 19098059 via CL 19104650 via CL 19104661 via CL 19110012
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19147839 by marc audy in ue5-main branch]
2022-02-25 10:39:39 -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
michael noland
6eb87c05e5 Moved BaseClassesToAllowRecompilingDuringPlayInEditor from experimental to *both* blueprint project settings and blueprint editor preferences (so it can be enabled for everyone in a given project for safe base classes as well as the existing 'local power user' cases)
- Also got rid of the loaded class cache in favor of a cached state for just opened BP editors that gets invalidated when settings are edited or the BP is (directly) reparented
#jira UE-81056
#rb marc.audy
#preflight 61e0aa1b6e49801093696899

#ROBOMERGE-AUTHOR: michael.noland
#ROBOMERGE-SOURCE: CL 18609404 in //UE5/Release-5.0/... via CL 18609465 via CL 18609499
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18609551 by michael noland in ue5-main branch]
2022-01-13 18:38:06 -05:00
daren cheng
ab6408adb6 Add PIE callbacks to editor utility subsystem.
#jira UE-136714
#rb lauren.barnes
#robomerge 5.0

[CL 18397325 by daren cheng in ue5-main branch]
2021-12-07 14:00:24 -05:00
Cody Albert
75bf9654c6 Added function to get the currently selected folder(s) path in utility widgets and Python
#rb none

[CL 18389906 by Cody Albert in ue5-main branch]
2021-12-06 18:23:49 -05:00
vincent gauthier
b5083323f8 Remove Callbacks to rebuild UMG Detail View as they are already handled at the Editor Utility Widget Blueprint level.
#jira UE-133916
#rb lauren.barnes, patrick.boutot

#ROBOMERGE-AUTHOR: vincent.gauthier
#ROBOMERGE-SOURCE: CL 18296375 in //UE5/Release-5.0/... via CL 18296382
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18296391 by vincent gauthier in ue5-release-engine-test branch]
2021-11-25 14:33:29 -05:00
vincent gauthier
0033bdf8dc Fix a crash when we force delete a Editor Utility Widget when it is running
#jira UE-111401
#rb daren.cheng

#ROBOMERGE-AUTHOR: vincent.gauthier
#ROBOMERGE-SOURCE: CL 18294166 in //UE5/Release-5.0/... via CL 18294173
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18294179 by vincent gauthier in ue5-release-engine-test branch]
2021-11-25 08:51:10 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04:00
daren cheng
77df5ea302 Fix checkbox style on editor utility widgets.
#jira UE-117887
#rb Vincent.Gauthier
#preflight 6148f759315f54000134958f

#ROBOMERGE-AUTHOR: daren.cheng
#ROBOMERGE-SOURCE: CL 17576768 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17576786 by daren cheng in ue5-release-engine-test branch]
2021-09-20 18:41:00 -04:00
MothDoctor
52d2066a58 PR #8391: Added UAssetActionUtility to Picker Common Classes (Contributed by MothDoctor)
#rb vincent.gauthier

#ROBOMERGE-AUTHOR: vincent.gauthier
#ROBOMERGE-SOURCE: CL 17520485 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17520491 by MothDoctor in ue5-release-engine-test branch]
2021-09-15 11:22:33 -04:00
vincent gauthier
08470f76ab Change to EditorUtilityWidgetBlueprint to use the Transient package as it's Outer. This prevents the World from being marked dirty when opening or changing a property on the EditorUtilityWidget object.
#rb patrick.boutot,lauren.barnes
#jira UE-115848

#ROBOMERGE-SOURCE: CL 17385608 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17385612 by vincent gauthier in ue5-release-engine-test branch]
2021-09-01 09:06:43 -04:00