Also changed the UX to not show the auto-import alert unless a namespace was added into the current editor context. We technically auto-import a namespace once it's used but we don't necessarily need to tell the user about it in certain scenarios (e.g. when it's already part of the default set). The reason we do it that way is that if it is no longer present in the default set (e.g. after reparenting the child BP), the child will then display it as an explicit import.
#rnx
#jira UE-149265
#rb Benjamin.Fox
#preflight 6259e39db53385f954a62802
[CL 19778028 by Phillip Kavan in ue5-main branch]
Change summary:
- Moved base definition of UK2Node::HasExternalDependencies() up one level to UEdGraphNode (to avoid blind casts in a context where we may not necessarily have a UK2Node subtype).
- Updated subtype headers that override HasExternalDependencies() to relocate the declaration into the class declaration's 'UEdGraphNode overrides' section (for clarity).
- Reverted previous UBlueprintNodeSpawner::ImportTarget solution in favor of using node dependencies; this allows auto-import actions to scale more easily to all existing node subtypes and avoids data duplication.
- Modified SBlueprintActionMenu::OnActionSelected() to utilize the new method for determining which namespace(s) to auto-import after executing a node spawner action in response to a context menu item selection (UE-146803).
- Reverted FBlueprintNamespaceUtilities::GetPropertyValueNamespaces() back to its original 5.0 signature so that it uses a TSet<FString> for the output rather than a TArray<FString>; this fits in better with input to other APIs.
- Renamed FBlueprintEditor::FImportNamespaceParameters to FImportNamespaceExParameters (for clarity).
- Changed the 'FBlueprintEditor::FImportNamespaceParameters::AdditionalNamespaces' member to a TSet<FString> containing *all* namespaces to import rather than limiting to only additional ones.
- Reverted FBlueprintEditor::ImportNamespace() back to its original 5.0 signature and added/implemented FBlueprintEditor::ImportNamespaceEx() as the "extended" version that allows for batched imports and future customizations.
- Revised existing FBlueprintEditor::ImportNamespace() call sites to utilize and/or conform to the extended ImportNamespaceEx() API where appropriate.
#jira UE-146803
#rb Benjamin.Fox
#preflight 623cf3a433709ff50128e8d4
[CL 19505118 by Phillip Kavan in ue5-main branch]
This may occur during one of the following events:
- Reverting or reassigning a Blueprint asset's namespace.
- Removing a Blueprint asset (i.e. deleting it in the browser).
- Renaming a Blueprint asset (i.e. moving it to another location).
- Note: this only applies when using package paths as a default namespace identifier (which is currently disabled by default).
Change summary:
- Added FBlueprintNamespaceRegistry::Rebuild().
- Exposed FBlueprintNamespaceUtilities::ConvertPackagePathToNamespacePath().
- Implemented FBlueprintNamespaceRegistry::OnAssetRemoved() and OnAssetRenamed().
- Modified FBlueprintNamespaceRegistry::FindAndRegisterAllNamespaces() with an exclusion set (to assist with asset removal).
- Added FBlueprintGlobalOptionsDetails::HandleNamespaceValueChange() to consolidate shared logic between reverting and reassignment.
- Extended Blueprint namespace member property details customization to refresh the namespace registry and editor context after updating the value.
#jira UE-142190
#rb Benjamin.Fox
#preflight 6238ea0a10251d53d564b55a
[CL 19466203 by Phillip Kavan in ue5-main branch]
Change summary:
- Added a code path for removing a namespace from the BP editor context.
- Consolidated namespace helper instances into a single BP editor context.
- Extended the FBlueprintEditor::ImportNamespace() API to accept additional options and a post-import callback.
- Refactored the auto-import code path to fix issues with reassignment to/from an imported namespace.
- Decoupled SSubobjectBlueprintEditor from a namespace-aware callback in favor of a generalized "add" callback.
- Linked the CVar for inheriting parent BP imports to a transient BP setting (experimental/not user-facing).
- Consolidated code to gather global/default imports into a utility API so that namespace sets are consistent.
- Modified "Imports" view to include a "default imports" section (similar to inherited interfaces) - these are not removable.
- Moved "Inherited Interfaces" section to be sorted above the "Implemented Interfaces" section for consistency.
- Fixed SBlueprintNamespaceEntry to query for the current text rather than only setting it at construction time.
#jira UE-133288
#rb Ben.Hoffman
#preflight 621ff4b337049be51738bafe
[CL 19236263 by Phillip Kavan in ue5-main branch]
Additionally auto-import any namespace associated with the selected component class type when a new component is added.
Change summary:
- Modified the component type registry to internally create/store unloaded BP data to assist with unloaded BP component type filtering.
- Added FEditorClassUtils::GetImplementedInterfaceClassPathsFromAsset() to move BP interface asset tag processing into a shared utility API.
- Modified SComponentClassCombo to work with IClassViewFilter-style filtering and added a filter options menu (currently only visible when namespace filtering features are enabled via CVar).
- A few minor modifications/additions to SSubobjectEditor/SSubobjectBlueprintEditor to assist with interfacing with the owning FBlueprintEditor context for filtering, updating etc.
#jira UE-133294
#rb Ben.Hoffman
#preflight 61b7c0601a4451f7ba1d0c46
#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 18449755 in //UE5/Release-5.0/... via CL 18449768
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)
[CL 18449772 by phillip kavan in ue5-release-engine-test branch]
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971
[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]