Commit Graph

73 Commits

Author SHA1 Message Date
ben hoffman
a2be3384f8 Keep track of visited subobject data handles in USubobjectDataSubsystem::GetActorRootHandle. This is a safegaurd to stop an editor freeze during re-parenting of components which cannot be repro'd internally. Add an error log to get some more info from users who may encounter this.
#jira UE-214965
#rb jodon.karlik

[CL 35625116 by ben hoffman in ue5-main branch]
2024-08-19 10:00:54 -04:00
phillip kavan
5bca809e17 Fix a regression that incorrectly caused a source Blueprint to be modified when adding a new component to an instance of it in the editor.
#jira UE-211396
#rb dan.oconnor
#rnx

[CL 34550161 by phillip kavan in ue5-main branch]
2024-06-20 19:10:10 -04:00
kevin macaulayvacher
276d09f6df Remove all simple usage of REN_ForceNoResetLoaders from the codebase since the flag has been deprecated and currently does nothing. Simple in this case is direct use of the flag with no conditional logic. More complex uses were removed in another change.
#rnx
#rb Francis.Hurteau

[CL 34424068 by kevin macaulayvacher in ue5-main branch]
2024-06-17 11:55:02 -04:00
dan oconnor
edb43ae3ac AddNewSubobject intelligently finds the blueprint being edited, if any
#rb ben.hoffman
#jira UE-182283

[CL 32413950 by dan oconnor in ue5-main branch]
2024-03-21 16:29:38 -04:00
dan oconnor
9c1c9be4a7 Update class's overridden components immediately upon creating the overrridden component, so that the class can be safely loaded if it is saved
#rb ben.hoffman

[CL 32312296 by dan oconnor in ue5-main branch]
2024-03-18 17:11:07 -04:00
dan oconnor
853ce85d69 Fix for crash when adding a component in the level editor after its scene root has been deleted, which is permitted for actors based on native classes that do not have a required scene root
#rb ben.hoffman
#jira UE-209295

[CL 32191166 by dan oconnor in ue5-main branch]
2024-03-12 16:37:05 -04:00
ben hoffman
badcceb056 Fix for a crash when changing the class or a subobject marked as "Within" to a BP subclass instead.
#jira UE-201528
#rb dan.oconnor

[CL 31257028 by ben hoffman in ue5-main branch]
2024-02-07 10:05:11 -05:00
dan oconnor
ff8bfcb552 Remove overzealous ensure
#jira UE-201224
#rb jodon.karlik, Phillip.Kavan

[CL 30365837 by dan oconnor in ue5-main branch]
2023-12-15 19:30:55 -05:00
dan oconnor
31c63dde53 Flatten FSubobjectData hierarchy to prevent slicing, the occurence of slicing necessitated removal of subtypes and associated machinery. They were not supportable.
#rb ben.hoffman, Phillip.Kavan
#jira UE-201295, FORT-686637

[CL 29968056 by dan oconnor in ue5-main branch]
2023-11-28 15:19:59 -05:00
logan harvell
ed4aeeee71 [Backout] - CL28194645
[FYI] dan.oconnor
Original CL Desc
-----------------------------------------------------------------
Fix several regressions created by 27427693. With these fixes we can also copy components (via the blueprint editor context menu) that are overrides of SCS components (e.g. live in the ICH). This is the 'root' bug that requires I stick with 27427693 despite the instability it has introduced.

Regressions fixed:
Crash on duplicate of instance added component
Crash on copy of ICH component (in blueprint editor)
Ensure on reparent of level editor component to SCS or ICH component

Existing bus fixed:
Failure to reparent component in the level editor if it is changed in a blueprint that inherited the component from another blueprint (which added it via the blueprint editor)
#jira UE-194833
#rb Phillip.Kavan

[CL 28255503 by logan harvell in ue5-main branch]
2023-09-26 19:36:28 -04:00
dan oconnor
5b8bb3021a Fix several regressions created by 27427693. With these fixes we can also copy components (via the blueprint editor context menu) that are overrides of SCS components (e.g. live in the ICH). This is the 'root' bug that requires I stick with 27427693 despite the instability it has introduced.
Regressions fixed:
Crash on duplicate of instance added component
Crash on copy of ICH component (in blueprint editor)
Ensure on reparent of level editor component to SCS or ICH component

Existing bus fixed:
Failure to reparent component in the level editor if it is changed in a blueprint that inherited the component from another blueprint (which added it via the blueprint editor)
#jira UE-194833
#rb Phillip.Kavan

[CL 28195603 by dan oconnor in ue5-main branch]
2023-09-25 14:00:42 -04:00
dan oconnor
02cc623729 Silence warning when subobject deletion is forced
#jira UE-184057
#rb Ben.Hoffmann

[CL 26787162 by dan oconnor in ue5-main branch]
2023-08-02 16:47:02 -04:00
jordan hoffmann
6281e28298 [BugFix] Components copy/pasted from an actor instance's SCS can't be deleted from a Blueprint
#rb ben.hoffman
#jira UE-175707
#preflight 646fc16f5b484acfee661577

[CL 25628233 by jordan hoffmann in ue5-main branch]
2023-05-25 16:35:45 -04:00
Dominik Peacock
b86a8ba6b2 Fix fallout of not being able to rename instanced component of native C++ classes
#jira UE-185549
#rb Ben.Hoffman
#preflight https://horde.devtools.epicgames.com/job/64639e45f033744ae6f8adb4
#fyi Jason.Walter

[CL 25498319 by Dominik Peacock in ue5-main branch]
2023-05-16 17:29:19 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
Dominik Peacock
5a2b491eb5 Fix subobject editor allowinginstanced components to have a dot in its name
#jira UE-185549
#rb Ben.Hoffman
#preflight https://horde.devtools.epicgames.com/job/645bb51d1f5692cc7a6e3dbb
#fyi Jason.Walter

[CL 25431401 by Dominik Peacock in ue5-main branch]
2023-05-11 13:34:33 -04:00
ben hoffman
334bd991a6 Prevent a crash when attempting to add an invalid subobject class type with the Subobject Data Subsystem. In an ideal world, a subobject does not have to be a component, but that is a current limitation of the UE object model that is exposed to blueprints.
#jira UE-185001
#rb nate.strohmyer
#preflight skip

[CL 25343870 by ben hoffman in ue5-main branch]
2023-05-04 18:08:58 -04:00
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
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
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
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
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