115 Commits

Author SHA1 Message Date
ben zeigler
fc4832b020 Add the ability to set DeprecatedFunction="Note" (and DeprecatedVariable) metadata in C++ to lower the severity of a blueprint deprecation message.
Add a utility function and DeprecatedVariable static name to support this.
Use this to replace an old hack that ignored warnings for BeginSpawningActorFromBlueprint.
#jira UE-160577
#rb dan.oconnor

[CL 36448949 by ben zeigler in 5.5 branch]
2024-09-19 15:54:42 -04:00
dan oconnor
2bb1f01f07 Undo 33732803 - it does not properly handle Map variables
#rb Dan.Oconnor
#rnx
#jira UE-214774

[CL 33758047 by dan oconnor in ue5-main branch]
2024-05-18 19:25:07 -04:00
dan oconnor
1f589dd12e K2Node_Variable is more careful abound member reference usage to avoid resetting member name due to a stale guid. K2Node_FunctionEntry now generates a fresh local guid when it is duplicated. This fixes a phantom compile error after pasting local variable nodes, which resulted in NodeGuid collisions
#rb dave.jones2, Phillip.Kavan
#jira UE-214774

[RN] Fixed one cause of phantom blueprint compilation errors after duplicating a blueprint graph

[CL 33734182 by dan oconnor in ue5-main branch]
2024-05-17 15:40:08 -04:00
ben humphreys
c83a813e81 Function parameter and local variable nodes in Blueprint function graphs now have an icon above them. This can be changed through Editor Settings.
#jira UE-206598
#rb dave.jones2
[FYI] saad.nader

[CL 31659957 by ben humphreys in ue5-main branch]
2024-02-20 17:55:27 -05:00
zhikang shao
239e804676 Reverting blueprint editor shortcut Alt+Shift+F to search locally by mapping it to the singular Find References action. The singular Find References action, while not exposed to UI for nodes that have Find References By Name/Class Member support, can still be triggered with shortcut and will trigger a local By Name or By Class Member search based on what the previous behavior was for that node type. For function nodes it will search by function name, while for variable nodes it will do an exact search since Find References already did that for a while.
However: function searches will do a quoted search by native function name. The previous behavior was unquoted search by node title (usually function display name). As a result, the previous behavior for Find References would fail in functions with special characters in their name. Now that the name is surrounded in quotes, all function names are supported. The new Find References behavior now searches for correct function name for parent call nodes, interface implementations, event overrides, where the previous behavior failed due to searching for node title.
#rb Phillip.Kavan

[CL 30854644 by zhikang shao in ue5-main branch]
2024-01-24 13:55:51 -05:00
zhikang shao
5a4f3dadcf #jira UE-196209
Improves "Find References" in blueprints: now supports function search by [class, function] call-sites and definitions rather than a generic search for function name. Replaces the "Find References" context menu action with a sub-menu for variables and functions in BlueprintEditor, WidgetBlueprintEditor, SubobjectEditor and SubobjectEditor. That context sub-menu has 'By Name' and 'By Class Member' search options and local+global versions of both.

Made changes to Find-in-Blueprints metadata that is generated per blueprint asset to be able to do "specific function of a specific class" type queries; some search types were unsupported with previous metadata. Incremented the EFiBVersion so that the Find-in-Blueprints search window will ask to re-index all blueprints and resave. Added an opt-out editor setting "Allow Index All Blueprints" (default: true) to disable the button, which can be decided per project. Added an action in the Find-in-Blueprints modal when outdated metadata is detected to export the list of affected assets.
#rb Phillip.Kavan

[CL 30316851 by zhikang shao in ue5-main branch]
2023-12-14 06:34:39 -05:00
zhikang shao
15c016080d [Backout] - CL30289707
[FYI] zhikang.shao
Original CL Desc
-----------------------------------------------------------------
#jira UE-196209
Improves "Find References" in blueprints: now supports function search by [class, function] call-sites and definitions rather than a generic search for function name. Replaces the "Find References" context menu action with a sub-menu for variables and functions in BlueprintEditor, WidgetBlueprintEditor, SubobjectEditor and SubobjectEditor. That context sub-menu has 'By Name' and 'By Class Member' search options and local+global versions of both.

Made changes to Find-in-Blueprints metadata that is generated per blueprint asset to be able to do "specific function of a specific class" type queries; some search types were unsupported with previous metadata. Incremented the EFiBVersion so that the Find-in-Blueprints search window will ask to re-index all blueprints and resave. Added an opt-out editor setting "Allow Index All Blueprints" (default: true) to disable the button, which can be decided per project. Added an action in the Find-in-Blueprints modal when outdated metadata is detected to export the list of affected assets.
#rb Phillip.Kavan

[CL 30289794 by zhikang shao in ue5-main branch]
2023-12-13 07:33:50 -05:00
zhikang shao
68c300ecfa #jira UE-196209
Improves "Find References" in blueprints: now supports function search by [class, function] call-sites and definitions rather than a generic search for function name. Replaces the "Find References" context menu action with a sub-menu for variables and functions in BlueprintEditor, WidgetBlueprintEditor, SubobjectEditor and SubobjectEditor. That context sub-menu has 'By Name' and 'By Class Member' search options and local+global versions of both.

Made changes to Find-in-Blueprints metadata that is generated per blueprint asset to be able to do "specific function of a specific class" type queries; some search types were unsupported with previous metadata. Incremented the EFiBVersion so that the Find-in-Blueprints search window will ask to re-index all blueprints and resave. Added an opt-out editor setting "Allow Index All Blueprints" (default: true) to disable the button, which can be decided per project. Added an action in the Find-in-Blueprints modal when outdated metadata is detected to export the list of affected assets.
#rb Phillip.Kavan

[CL 30289718 by zhikang shao in ue5-main branch]
2023-12-13 07:25:05 -05:00
robert millar
f9d7673020 Improve missing-property error messages to use full paths and use specified scope instead of self-class.
#rb dan.oconnor

[CL 27965251 by robert millar in ue5-main branch]
2023-09-18 13:28:37 -04:00
steve robb
51f3ea53ae Removed ChooseClass.h includes.
#rb trivial

[CL 27823723 by steve robb in ue5-main branch]
2023-09-13 05:43:01 -04:00
dave jones2
d59513adb3 Fixed Blueprint type autoconversion for variable nodes. (resubmit)
Unlike other nodes, the variable node is the only that has a ArePinTypesCompatible check. This created a discrepancy: type changes on function nodes would preserve the link and create a compilation error, but type changes on variable nodes would orphan the pin.

For consistency, this removes the ArePinTypesCompatible check. More importantly, this also fixes auto type conversion, which will analyze the link and insert a cast node at a later stage. However, there's also some legacy cruft that only applied to object pins with mismatched types. This particular edge case has been preserved, but it might need follow up to see if it's still needed.

Additionally, fixed a logic bug with bCanMatchSelfs.

#rb phillip.kavan

[CL 26032689 by dave jones2 in ue5-main branch]
2023-06-15 21:07:53 -04:00
dave jones2
22c3013bf4 [Backout] - CL26019059
[FYI] dave.jones2
Original CL Desc
-----------------------------------------------------------------
Fixed Blueprint type autoconversion for variable nodes.

Unlike other nodes, the variable node is the only that has a ArePinTypesCompatible check. This created a discrepancy: type changes on function nodes would preserve the link and create a compilation error, but type changes on variable nodes would orphan the pin.

For consistency, this removes the ArePinTypesCompatible check. More importantly, this also fixes auto type conversion, which will analyze the link and insert a cast node at a later stage. However, there's also some legacy cruft that only applied to object pins with mismatched types. This particular edge case has been preserved, but it might need follow up to see if it's still needed.

#rb phillip.kavan

[CL 26021408 by dave jones2 in ue5-main branch]
2023-06-15 14:29:54 -04:00
dave jones2
8d184e470b Fixed Blueprint type autoconversion for variable nodes.
Unlike other nodes, the variable node is the only that has a ArePinTypesCompatible check. This created a discrepancy: type changes on function nodes would preserve the link and create a compilation error, but type changes on variable nodes would orphan the pin.

For consistency, this removes the ArePinTypesCompatible check. More importantly, this also fixes auto type conversion, which will analyze the link and insert a cast node at a later stage. However, there's also some legacy cruft that only applied to object pins with mismatched types. This particular edge case has been preserved, but it might need follow up to see if it's still needed.

#rb phillip.kavan

[CL 26020052 by dave jones2 in ue5-main branch]
2023-06-15 13:56:38 -04:00
dave jones2
e203cea604 UE-183502 - BP autoconversion adds extraneous conversion nodes (resubmit)
(Resubmit: added check for "multiple self" connections. Even though the types mismatch, we permit these connections.)

The previous attempt to add automatic conversion nodes (24029327) had a flawed design: checking pin connections during rewiring might have an incomplete view of the types of the linked pins.

For example, suppose we have two native, BlueprintCallable functions. One returns a float, and the other accepts a single float. In a Blueprint, we have the output of one linked to the input of the other.

Later, we update both functions to use ints. During rewiring of the function with the return value, it might see that its connection is a float (because that node hasn't been rewired yet). As a result, it'll insert a cast node. Subsequently, when we later rewire the function with the input, it'll see that it's connected to a float, because of the recently inserted cast node. This will add yet another cast node. Since both pin types are the same, there shouldn't be any cast nodes to begin with.

The only safe way to insert cast nodes is after node construction has finished. Instead of handling this during rewiring, we can defer the type checking to early validation. Overall, this simplifies the autoconversion since we just need to iterate over pairs of pins, check for type mismatches, and insert cast nodes where appropriate.

This change effectively reverts CLs 24174262, 24029327, 24218437, and 25444139, and moves the type checking logic to EarlyValidation.

#jira UE-183502
#rb phillip.kavan

[CL 25834276 by dave jones2 in ue5-main branch]
2023-06-06 21:17:28 -04:00
bob tellez
89ca3b4813 [Backout] - CL25727793
[FYI] dave.jones2
Original CL Desc
-----------------------------------------------------------------
UE-183502 - BP autoconversion adds extraneous conversion nodes

The previous attempt to add automatic conversion nodes (24029327) had a flawed design: checking pin connections during rewiring might have an incomplete view of the types of the linked pins.

For example, suppose we have two native, BlueprintCallable functions. One returns a float, and the other accepts a single float. In a Blueprint, we have the output of one linked to the input of the other.

Later, we update both functions to use ints. During rewiring of the function with the return value, it might see that its connection is a float (because that node hasn't been rewired yet). As a result, it'll insert a cast node. Subsequently, when we later rewire the function with the input, it'll see that it's connected to a float, because of the recently inserted cast node. This will add yet another cast node. Since both pin types are the same, there shouldn't be any cast nodes to begin with.

The only safe way to insert cast nodes is after node construction has finished. Instead of handling this during rewiring, we can defer the type checking to early validation. Overall, this simplifies the autoconversion since we just need to iterate over pairs of pins, check for type mismatches, and insert cast nodes where appropriate.

This change effectively reverts CLs 24174262, 24029327, 24218437, and 25444139, and moves the type checking logic to EarlyValidation.

#jira UE-183502
#preflight 647102108145a219b1209905
#rb phillip.kavan

[CL 25748352 by bob tellez in ue5-main branch]
2023-06-01 19:38:24 -04:00
dave jones2
58bc468b87 UE-183502 - BP autoconversion adds extraneous conversion nodes
The previous attempt to add automatic conversion nodes (24029327) had a flawed design: checking pin connections during rewiring might have an incomplete view of the types of the linked pins.

For example, suppose we have two native, BlueprintCallable functions. One returns a float, and the other accepts a single float. In a Blueprint, we have the output of one linked to the input of the other.

Later, we update both functions to use ints. During rewiring of the function with the return value, it might see that its connection is a float (because that node hasn't been rewired yet). As a result, it'll insert a cast node. Subsequently, when we later rewire the function with the input, it'll see that it's connected to a float, because of the recently inserted cast node. This will add yet another cast node. Since both pin types are the same, there shouldn't be any cast nodes to begin with.

The only safe way to insert cast nodes is after node construction has finished. Instead of handling this during rewiring, we can defer the type checking to early validation. Overall, this simplifies the autoconversion since we just need to iterate over pairs of pins, check for type mismatches, and insert cast nodes where appropriate.

This change effectively reverts CLs 24174262, 24029327, 24218437, and 25444139, and moves the type checking logic to EarlyValidation.

#jira UE-183502
#preflight 647102108145a219b1209905
#rb phillip.kavan

[CL 25727812 by dave jones2 in ue5-main branch]
2023-06-01 11:29:35 -04:00
dan oconnor
c2b222968e Make sure we don't select skel class when accessing a sparse clas datamember that has been moved from a member variable
#preflight https://horde.devtools.epicgames.com/job/6467da78434f5536a3950d5b
#jira UE-186566
#rb Phillip.Kavan

[CL 25554705 by dan oconnor in ue5-main branch]
2023-05-19 19:05:49 -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
dave jones2
d9397ab592 UE-172222 - Improve redirect support for Blueprints. (resubmit)
A reflected Blueprint type can now be changed without breaking existing content, so long as an autocast function exists for the two types.

Previously, pin reconstruction would give up if two pin types didn't match exactly, which resulted in orphaned pins and compilation errors. Now, it'll first try to find an autocast function for the two types, and insert a cast node into the graph if one is found.

Additionally, notes will be added whenever a new cast node was added, which serves as a notice that users might want to update their API to use the new type change.

#jira UE-172222
#preflight 63d85cf57a39a1802189bdda
#rb phillip.kavan

[CL 24029327 by dave jones2 in ue5-main branch]
2023-02-06 09:08:45 -05:00
dave jones2
7b2e42b662 [Backout] - CL23629872 (Assorted BP compilation issues)
#fyi dave.jones2
Original CL Desc
-----------------------------------------------------------------
UE-172222 - Improve redirect support for Blueprints.

A reflected Blueprint type can now be changed without breaking existing content, so long as an autocast function exists for the two types.

Previously, pin reconstruction would give up if two pin types didn't match exactly, which resulted in orphaned pins and compilation errors. Now, it'll first try to find an autocast function for the two types, and insert a cast node into the graph if one is found.

Additionally, notes will be added whenever a new cast node was added, which serves as a notice that users might want to update their API to use the new type change.

#jira UE-172222
#preflight 63b72580af3ebedd9988ae4c
#rb benjamin.fox,dan.oconnor

[CL 23657454 by dave jones2 in ue5-main branch]
2023-01-11 18:54:32 -05:00
dave jones2
1f3ca97244 UE-172222 - Improve redirect support for Blueprints.
A reflected Blueprint type can now be changed without breaking existing content, so long as an autocast function exists for the two types.

Previously, pin reconstruction would give up if two pin types didn't match exactly, which resulted in orphaned pins and compilation errors. Now, it'll first try to find an autocast function for the two types, and insert a cast node into the graph if one is found.

Additionally, notes will be added whenever a new cast node was added, which serves as a notice that users might want to update their API to use the new type change.

#jira UE-172222
#preflight 63b72580af3ebedd9988ae4c
#rb benjamin.fox,dan.oconnor

[CL 23629872 by dave jones2 in ue5-main branch]
2023-01-10 13:35:44 -05:00
dave jones2
8c46603276 UE-169957 - Rewiring split pins after a type change creates an orphaned pin
Allow rewiring split pins that have had their type changed, which ERedirectType_Name permits. Oddly, the Break Struct nodes already work in this case, but that's because they completely bypass UK2Node_Variable::DoPinsMatchForReconstruction, and call the implementation in UK2Node::DoPinsMatchForReconstruction instead.

#jira UE-169957
#preflight 6377b83af514e1ded9b9258f
#rb phillip.kavan,ben.hoffman

[CL 23197324 by dave jones2 in ue5-main branch]
2022-11-18 12:10:46 -05:00
bryan sefcik
925161d3e2 Another IWYU pass on Engine/Source/Editor/...
#jira

[CL 21716486 by bryan sefcik in ue5-main branch]
2022-08-30 23:04:40 -04:00
bryan sefcik
0837230669 Ran IWYU again on half of the Engine/Source/Editor/... source files.
#jira

[CL 21716414 by bryan sefcik in ue5-main branch]
2022-08-30 23:03:03 -04:00
benjamin fox
afdf0e750d Fix conflicting LOCTEXT keys
#jira UE-161692
#rb trivial
#preflight skip

[CL 21509489 by benjamin fox in ue5-main branch]
2022-08-23 11:48:15 -04:00