Commit Graph

86 Commits

Author SHA1 Message Date
phillip kavan
a223b133e1 Fix the component hierarchy display in the Actor details tab to remain static/deterministic in terms of tree node order after its Blueprint class is compiled and/or Actor reconstruction occurs.
#rb Ben.Hoffman, Marc.Audy
#preflight 63b5ea12d067708b9b1f1dab

[CL 23584427 by phillip kavan in ue5-main branch]
2023-01-04 20:25:44 -05:00
phillip kavan
6848d0a218 Back out CL 21894681 for 5.1.
#jira UE-55663
#rb David.Garza
#preflight 6358356f734237a3deb444ec

[CL 22795894 by phillip kavan in ue5-main branch]
2022-10-26 18:17:40 -04:00
ben hoffman
13e0cf12ec When recursively creating parent subobjects, pass in the correct component template instead of incorrectly passing the same one. This fixes a bug where a native subobject could be attached to itself, and display as a duplicate.
#jira UE-155798
#rb phillip.kavan
#preflight 6328c954a236a029de86a986
#rnx

[CL 22141891 by ben hoffman in ue5-main branch]
2022-09-22 14:57:52 -04:00
ben hoffman
8a5e83a821 Fix a bug where you could not delete an instance-added subobject after it was added to an actor
#jira UE-149833
#rb benjamin.fox
#rnx
#preflight 6328b4e8b40000c8f021359f

[CL 22087368 by ben hoffman in ue5-main branch]
2022-09-19 22:29:10 -04:00
phillip kavan
680e8fb754 Defer re-running construction scripts until after we fix up the template hierarchy when duplicating a component in the Blueprint editor.
#jira UE-160829
#rb Ben.Hoffman
#preflight 6323463f67163bf66003dde8

[CL 22041532 by phillip kavan in ue5-main branch]
2022-09-15 19:34:36 -04:00
bryan sefcik
cb0456c6d4 Cleaned up build.cs files by removing any include paths that were already being added by UBT. This was done to help identify how include paths are being added and to help with future refactoring.
#jira
#preflight 631a5c04967ffc68fbf0dd8f

[CL 21911226 by bryan sefcik in ue5-main branch]
2022-09-08 21:44:02 -04:00
phillip kavan
0ab1913715 Ensure that Blueprint subobject (component) names conform to UObject conventions on entry.
#jira UE-55663
#rb Ben.Hoffman
#preflight 63191175304480f8f820bf16

[CL 21908744 by phillip kavan in ue5-main branch]
2022-09-08 20:27:54 -04:00
phillip kavan
a5b516dcc9 Add missing imports after dragging one or more non-imported namespaced type assets into the components tree in the Blueprint editor.
Change summary:
- Removed SSubobjectBlueprintEditor::FOnNewSubobjectAdded typedef and OnNewSubobjectAdded delegate members. Deprecation was not needed as these were added after the 5.0 release.
- Restored SSubobjectBlueprintEditor::AddNewSubobject() back to its original implementation (prior to adding the now-defunct OnNewSubobjectAdded event).
- Added USubobjectDataSubsystem::OnNewSubobjectAdded() to allow potential listeners to register for and receive successful subobject "add" event notifications.
- Modified USubobjectDataSubsystem::AddNewSubobject() to broadcast new subobject data to any registered listener(s) after a successful add.
- Added FBlueprintEditor::DeferredNamespaceImports to stack auto-imports for events that can be triggered more than once within a single frame.
- Modified FBlueprintEditor::OnComponentAddedToBlueprint() to handle subobject add events that target editor Blueprint objects. Also fixed to query the subobject class for its default import set instead of the subobject itself.
- Modified the FBlueprintEditor dtor to unregister the OnBlueprintUnloaded() event handler as I noticed this was not previously being done (benign as the shared ptr was skipped for being invalid, but this now removes us from the broadcast chain).
- Fixed up minor formatting inconsistencies in some legacy FBlueprintEditor analytics-related code paths.

#jira UE-148495
#rb Ben.Hoffman
#preflight 63078bf937470da4bf38fcf2

[CL 21688272 by phillip kavan in ue5-main branch]
2022-08-29 16:50:08 -04:00
bryan sefcik
8cc129f2b6 IWYU Pass 1 - Engine/Source/Editor/...
#jira
#preflight 6306736ac85b7fef22be7751

[CL 21558583 by bryan sefcik in ue5-main branch]
2022-08-24 22:45:13 -04:00
ben hoffman
36e74ea744 Expose the GetObjectForBlueprint function in the SubobjectDataBluepriuntFunctionLibrary. This allows you to get inherited subobject data for a blueprint.
#jira none
#rb trivial
#rnx
#preflight skip

[CL 21497905 by ben hoffman in ue5-main branch]
2022-08-22 19:35:20 -04:00
jamie dale
ec52d6575c Adding additional includes in preparation for removing a global include
#preflight skip
#rb none
#rnx

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 21286944 via CL 21293031 via CL 21293289 via CL 21293403
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21296407 by jamie dale in ue5-main branch]
2022-08-09 15:44:33 -04:00
jamie dale
931f82ff1c Add WithIdenticalViaEquality type-trait for FSubobjectDataHandle
This ensures that it compares correctly when used via a UScriptStruct, eg, within Python.

#jira
[FYI] Bryce.Lumpkin, Ben.Hoffman
#rnx

#ROBOMERGE-OWNER: jamie.dale
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 21182599 via CL 21182750 via CL 21182943 via CL 21182968
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21192673 by jamie dale in ue5-main branch]
2022-07-20 18:33:40 -04:00
bryan sefcik
98b51354ed Ran IWYU on Public headers under Engine/Source/Editor/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065253 by bryan.sefcik
#jira
#preflight 62d5b3e91062f2e63014598e

#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21152630 via CL 21156388 via CL 21157044
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21181817 by bryan sefcik in ue5-main branch]
2022-07-20 11:56:29 -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
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
ben hoffman
d36fd1b7cc Fix static analysis warning in subobject subsystem
#jira UE-149811
#rb trivial
#rnx
#preflight 6261c0f06119a1a496c3e677

[CL 19856185 by ben hoffman in ue5-main branch]
2022-04-21 17:21:26 -04:00
ben hoffman
3138e1a21c Fix a PVS warning in subobject editor
#jira none
#rb trivial
#rnx
#preflight skip

[CL 19557039 by ben hoffman in ue5-main branch]
2022-03-30 10:39:46 -04:00
ben hoffman
a53ba31ea0 Keep absolute location when reparenting a subobject in blueprints
#jira UE-147382
#rb marc.audy
#rnx
#preflight 62433961323cb7b991f0f01d

[CL 19544913 by ben hoffman in ue5-main branch]
2022-03-29 13:18:01 -04:00
ben hoffman
e629c84afb Only create a new default subobject when destroying a component if the owner's class is not native. Native owner classes do not have to have a DefaultSceneRoot when you drag in the C++ class directly from the content browser into the level.
#jira UE-130740
#rb marc.audy
#preflight 623a33f4b3653cf6afe52385

[CL 19482791 by ben hoffman in ue5-main branch]
2022-03-23 14:41:32 -04:00
marc audy
4ab0c3a671 Fix crashing when undoing a native component class change in a blueprint
Fix asserts as a result of replacing actor components without going through proper register/unregister lifecycle
Move logic for component class changing out of the details customization and in to the subobject data subsystem
#jira UE-114303
#preflight 621a7ca51d1c5017996c2a01
#rb ben.hoffman
#lockdown julien.marchand

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 19179312 in //UE5/Release-5.0/... via CL 19180540
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19204194 by marc audy in ue5-main branch]
2022-03-01 14:57:56 -05:00
ben hoffman
11d9f2db5b Fix an ensure that was caused when adding a runtime subobject to an editor only subobject.
#jira none
#rb marc.audy
#rnx
#preflight 61dc99354455f00ccd2eae99

#ROBOMERGE-AUTHOR: ben.hoffman
#ROBOMERGE-SOURCE: CL 18564998 in //UE5/Release-5.0/... via CL 18565017
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18565049 by ben hoffman in ue5-release-engine-test branch]
2022-01-10 16:02:14 -05:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04: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
ben hoffman
c968dafbd0 [Subobject Editor] Allow deletion of subobjects that are the default scene root so that they get properly replaced with a "DefaultSceneRoot" in the subobject blueprint editor.
#jira UE-125204
#rb phillip.kavan
#rnx

#ROBOMERGE-AUTHOR: ben.hoffman
#ROBOMERGE-SOURCE: CL 17621477 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17621478 by ben hoffman in ue5-release-engine-test branch]
2021-09-24 11:06:45 -04:00
ben hoffman
0775db0dbb [Subobject Editor] Use the correct previous subobject transform when conforming a subobject to it's new parent during reparenting. Previously it was incorrectly using the same "Dropped On" subobject (which would be the new parent) thus always giving it a relative position/rotation/scale of 0 when conforming.
#jira UE-126632
#rb colin.mcginley
#rb benjamin.fox
#rnx

#ROBOMERGE-AUTHOR: ben.hoffman
#ROBOMERGE-SOURCE: CL 17588190 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17588217 by ben hoffman in ue5-release-engine-test branch]
2021-09-21 17:03:29 -04:00