Commit Graph

176 Commits

Author SHA1 Message Date
Phillip Kavan
8e3e596f9b Exclude node spawner actions for non-imported component types from the Blueprint graph context menu when Blueprint namespace editor features are enabled.
Change summary:
- Extended FBlueprintActionContext to include a weak ptr to the current IBlueprintEditor context.
- Added ENUM_CLASS_FLAGS() for the FBlueprintActionFilter::EFlags enumeration (for use as bitflags).
- Deprecated the current FBlueprintActionFilter constructor, replaced with a more explicitly-typed EFlags param.
- FBlueprintActionFilter now internally stores its filter flags. Also added FBlueprintActionFilter::HasAnyFlags/HasAllFlags().
- Minor refactor to a few action filter delegates to query the filter flags locally rather than add bool flags to delegate payloads.
- The FBlueprintActionFilter constructor now unsets the non-imported filter flag if Blueprint namespace editor settings are disabled.
- BlueprintActionFilterImpl::IsNonImportedObject() now utilizes the filter context rather than iterate the Blueprints array to find open asset editors.
- Added an override for UBlueprintComponentNodeSpawner::IsTemplateNodeFilteredOut(). This is now used to filter out any loaded or unloaded BP component types from the context menu.
- Cleaned up display inconsistencies in the menu UI spec between loaded vs. unloaded "Add Component" node spawner actions in the context menu.
- Added an FSoftObjectPath variant of IBlueprintEditor::IsNonImportedObject() (to support unloaded non-native component type entries which store the class object path). Implemented as FBlueprintEditor::IsNonImportedObject(FSoftObjectPath).
- Added an override for UK2Node_DynamicCast::IsActionFilteredOut() to exclude cast operator actions for non-native component types if they are not imported into the current editor context.
- Modified SBlueprintActionMenu, SBlueprintFavoritesPalette and SBlueprintLibraryPalette to include the current editor context in applicable action filter context(s).

#jira UE-149760
#rb Ben.Hoffman
#preflight 62753dd9e31cfc52d5bd0539

[CL 20077282 by Phillip Kavan in ue5-main branch]
2022-05-06 11:49:20 -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
dave jones2
939f991649 UE-146987 - Cleaned up the original fix for erroneous implicit casts in python script nodes.
Since UK2Node_ExecutePythonScript uses wildcards for its pins, it's dependent on its linked inputs. During node reconstruction, we were updating the python node's pins based on incorrect data. For example, one of the input nodes needed to change its pin type from real/double to real/float during reconstruction. However, this reconstruction occurred after the linked python node was reconstructed. As a result, the python node assumed that its linked input node was using a real/double type.

We can fix this by simply changing the priority of UK2Node_ExecutePythonScript to Low_UsesDependentWildcard. Additionally, this change reverts 19482561.

#rb jamie.dale
#preflight 625882d8010ebc5d4e8a5cc7
#jira UE-146987

[CL 19810564 by dave jones2 in ue5-main branch]
2022-04-19 12:18:56 -04:00
Phillip Kavan
f64e3e18d7 Some minor refactoring to assist with auto-importing external type object dependency namespaces into the Blueprint editor context in response to user actions.
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]
2022-03-24 19:50:46 -04:00
Phillip Kavan
8bffee0ba1 Auto-import the associated namespace after selecting a non-imported action in the Blueprint graph context menu.
Change summary:
- Added UBlueprintNodeSpawner::ImportTarget to store/serialize an object reference to allow for resolving action namespace scope on selection.
- Modified UBlueprintFieldNodeSpawner::SetField() to determine and store the import target object reference for a field-based node spawner type.
- Modified FBlueprintNodeSpawnerFactory::MakeMacroNodeSpawner() to determine and store the import target object for a macro instance node spawner.
- Modified SBlueprintActionMenu::OnActionSelected() to auto-import the associated namespace after selecting an action item containing a valid node spawner.

#jira UE-146803
#rb Benjamin.Fox
#preflight 623b56df9304d833f40d422a

[CL 19485593 by Phillip Kavan in ue5-main branch]
2022-03-23 16:51:27 -04:00
dave jones2
135eb09732 UE-146778 - CIS Content Error: Unhandled implicit casts found during compilation of function
The BP compiler erroneously reports that python nodes might be missing implicit casts. However, UK2Node_ExecutePythonScript nodes handle argument slightly differently than conventional function nodes. The pins don't actually correspond to actual arguments on ExecutePythonScript. Instead, they more or less serve as references to their linked inputs, which ExecutePythonScript will pop from the stack and perform a direct conversion to a Python type. As a result, there's nothing to cast, and we can safely remove the entries from the ImplicitCastMap on the current content.

#rb jamie.dale
#jira UE-146778
#preflight 623b4fbeca34ffd7bf7db3e8

[CL 19482561 by dave jones2 in ue5-main branch]
2022-03-23 14:24:22 -04:00
Phillip Kavan
38e6b760c3 Customized Blueprint editor and project settings for global namespace imports entry.
Change summary:
- Moved base "managed list" customization out into its own class so that it can be shared with editor/project settings customization.
- Refactored Blueprint global options (i.e. Class Settings) details customization to utilize the new "managed list" base class.
- Removed filter text as a customizable managed list display option and redefined it to be more consistent with property editor nodes.
- Fixed the "Imports" display in Class Settings to no longer list global imports in the non-default section.
- Added a new details customization for UBlueprintEditorSettings.
- Added a customized editor for the 'NamespacesToAlwaysInclude' property for both local user settings and shared project settings.
- Moved the "Add" button for imports and interfaces to be on the same line as the header row (eliminates some wasted space in the details view).
- Fixed up global import property display names and tooltips to be more descriptive.
- Fixed an issue that prevented reselection of the previous namespace setting in the Blueprint namespace entry combo box after clearing it.
- Fixed the incorrect vertical alignment of import/interface item rows.

#jira UE-143552, UE-133369, UE-136904, UE-142557
#rb Ben.Hoffman
#preflight 622ba26c46679d56c31dddda

[CL 19365260 by Phillip Kavan in ue5-main branch]
2022-03-11 19:47:16 -05:00
Phillip Kavan
b5863c2b95 Some minor refactoring to assist with handling removal/reassignment of Blueprint namespaces.
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]
2022-03-02 20:48:04 -05:00
phillip kavan
89891c4b41 Add an edit condition to global namespace config settings to avoid confusion when Blueprint namespace editor features are disabled.
#jira UE-142130
#rb Benjamin.Fox
#preflight 620aa8cb583261b0a664ee21
#lockdown Julien.Marchand

#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 18986162 in //UE5/Release-5.0/... via CL 18986489 via CL 18987780
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18988109 by phillip kavan in ue5-main branch]
2022-02-14 18:35:09 -05:00
dave jones2
c8574d3b74 Merging //UE5/Dev-LargeWorldCoordinates [at] 18802167 to //UE5/Release-5.0
Blueprint real number support.

This change deprecates the use the of "float" and "double" types in Blueprints in favor of a new "real". By default, "real" is back by a double precision floating point number. However, it can be single precision if the number is a native float property or function parameter. This distinction won't be visible to the Blueprint user: in both instances, they'll be represented by "real" pin types. During deserialization, we'll automatically convert Blueprint pin types to use real/doubles, unless they're used to represent native code (including delegate signatures).

One consequence of this change is that we need to perform implicit casts between single and double precision real numbers. During Blueprint compilation, the compiler will detect points in the graph for when either a widening or narrowing conversion needs to occur. Subsequently, the script bytecode will contain a new cast instruction that performs the conversion. This also works on container types, but each entry in the container will have to be converted. This can introduce unwanted overhead for large containers that are frequently passed between Blueprint and native code.

The scope of this change affects Blueprints used by Gameplay, Animation, Control Rig, and UMG.

#rb marc.audy (serialization changes)
#jira UE-116484
#preflight 61f8bdd5a2514ba12ff7bdfc

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 18809077 in //UE5/Release-5.0/... via CL 18809455 via CL 18822548
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18823569 by dave jones2 in ue5-main branch]
2022-02-02 05:50:50 -05:00
jamie dale
f5b0f7b31c Added the ability to override the list of default Blueprint categories
#jira
#preflight 61f32e238255dba0d6be0386
#rb Rex.Hill, Dave.Belanger, Phillip.Kavan

#ROBOMERGE-OWNER: jamie.dale
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 18779434 via CL 18779439 via CL 18779548 via CL 18779636 via CL 18779688 via CL 18780036 via CL 18780261
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18780264 by jamie dale in ue5-main branch]
2022-01-28 18:22:37 -05:00
phillip kavan
648232be02 Expose an editor setting that will more easily allow users to toggle Blueprint namespace-related editor features on/off.
#jira UE-139971
#rb Benjamin.Fox
#preflight 61eeef014018b3d62e6e902b

#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 18712084 in //UE5/Release-5.0/... via CL 18712094 via CL 18712339
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18712359 by phillip kavan in ue5-main branch]
2022-01-24 14:14:32 -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
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
phillip kavan
3c5db8f4f5 Add a new Blueprint editor workflow setting to allow the user to choose how to restore breakpoints on Blueprint asset reload.
#jira UE-124598
#rb Justin.Hare
#preflight 6138e92c9c40ec000129baeb

#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 17471835 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17471845 by phillip kavan in ue5-release-engine-test branch]
2021-09-09 09:37:41 -04:00
phillip kavan
c1eff83c4a Fix for a regression in which we could fail to resolve object paths for certain Blueprint assets during BP graph node pin reference initialization at load time.
Change summary:
- Reverted FEdGraphPinReference back to using TWeakObjectPtr (fixes the regression by restoring previous behavior).
- Added FBlueprintWatchedPin as a new type intended for FBlueprintEditorSettings config data; this internally uses TSoftObjectPtr to match the existing behavior that was being used to export pin objects as soft rather than weak. It also matches how breakpoints are being stored, and allows for future extensions to watched pin context without affecting the underlying pin reference type used by the rest of the engine code.
- Modified the FKismetDebugUtilities APIs for watched pins to utilize the new type in place of FEdGraphPinReference.

#jira UE-122163, UE-122339
#rb Ben.Hoffman
#preflight 61314857d031a400010a709a

#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 17443581 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17443598 by phillip kavan in ue5-release-engine-test branch]
2021-09-07 08:58:16 -04:00
ben hoffman
05a1ac0ed8 Add an edit condition to the blueprint editor settings to only allow changing type promotion black list if it is enabled.
#jira none
#rb trivial
#rnx

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

[CL 17424652 by ben hoffman in ue5-release-engine-test branch]
2021-09-03 14:17:38 -04:00
ben hoffman
5f7ed374e9 Add a blacklist of pin types to blueprint type promotion to allow users to disallow types that they want explicit functions. Add the string type by default as it has multiple compare functions that should be a choice for the user.
#jira UE-115454
#rb phillip.kavan
#rnx

#ROBOMERGE-SOURCE: CL 17215485 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17218009 by ben hoffman in ue5-release-engine-test branch]
2021-08-18 13:34:50 -04:00
jordan hoffmann
207f3e6549 Moving Watch pins to live with breakpoints in their new home: FPerBlueprintSettings
#preflight 611afb3eaabad10001d15245

#ROBOMERGE-SOURCE: CL 17186159 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17186170 by jordan hoffmann in ue5-release-engine-test branch]
2021-08-16 23:19:04 -04:00
phillip kavan
ff0501b1bd Add a context target menu option to allow non-imported type filtering in the context menu to be toggled on/off.
The option will be visible only if namespace filtering features are turned on (currently via CVar).

Also revised filter behavior to route through the shared import set and apply to actions that pass the non-target member test (i.e. global fields).

#jira UE-108316
#rb Ben.Hoffman
#preflight 610d98d7cf0cdd000136401a

#ROBOMERGE-SOURCE: CL 17088653 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17089023 by phillip kavan in ue5-release-engine-test branch]
2021-08-06 17:54:15 -04:00
jordan hoffmann
347cbc497e Feature: Move breakpoint storage out of the uasset file
Description: Make it so breakpoints are saved in the EditorPerProjectUserSettings ini rather than blueprint uasset files so that they can be excluded from version control and be unique to the user

#jira UE-119540
#rb Ben.Zeigler

#ROBOMERGE-SOURCE: CL 16959614 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16959625 by jordan hoffmann in ue5-release-engine-test branch]
2021-07-26 15:05:16 -04:00
jordan hoffmann
fc1e2f1624 [Backout] - CL16933419
[FYI] jordan.hoffmann
Original CL Desc
-----------------------------------------------------------------
Feature: Move breakpoint storage out of the uasset file
Description: Make it so breakpoints are saved in the EditorPerProjectUserSettings ini rather than blueprint uasset files so that they can be excluded from version control and be unique to the user

#jira UE-119540
#preflight 60fa0407224826000161cd31

#ROBOMERGE-SOURCE: CL 16934737 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16934748 by jordan hoffmann in ue5-release-engine-test branch]
2021-07-23 01:07:21 -04:00
jordan hoffmann
a634abbbdd Feature: Move breakpoint storage out of the uasset file
Description: Make it so breakpoints are saved in the EditorPerProjectUserSettings ini rather than blueprint uasset files so that they can be excluded from version control and be unique to the user

#jira UE-119540
#preflight 60fa0407224826000161cd31

#ROBOMERGE-SOURCE: CL 16933419 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16933421 by jordan hoffmann in ue5-release-engine-test branch]
2021-07-22 21:20:28 -04:00
jordan hoffmann
e099a701f5 [Backout] - CL16915099
[FYI] jordan.hoffmann
Original CL Desc
-----------------------------------------------------------------
Feature: Move breakpoint storage out of the uasset file
Description: Make it so breakpoints are saved in the EditorPerProjectUserSettings ini rather than blueprint uasset files so that they can be excluded from version control and be unique to the user

#jira UE-119540

#ROBOMERGE-SOURCE: CL 16929845 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16929852 by jordan hoffmann in ue5-release-engine-test branch]
2021-07-22 15:40:59 -04:00