Commit Graph

1894 Commits

Author SHA1 Message Date
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
stan hormell
37bad2d07b [Backout] - CL27731288 - CIS / Build Errors
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
- Deprecated GetSectionPrivate and FindOrAddSection, and accessors in FConfigFile that could return a non-const FConfigSection (this is so we can track modifications to config values)
- Added AddToSection, RemoveKeyFromSection, etc to replace directly accessing a FConfigSection
- Fixed up Epic code for the deprecations (at least the majority, some projects that aren't built by Horde presubmit may have some that we will address going forward)
#jira UE-194955
#rb david.harvey and various others

[CL 27745141 by stan hormell in ue5-main branch]
2023-09-10 22:58:21 -04:00
josh adams
a8a9a0b759 - Deprecated GetSectionPrivate and FindOrAddSection, and accessors in FConfigFile that could return a non-const FConfigSection (this is so we can track modifications to config values)
- Added AddToSection, RemoveKeyFromSection, etc to replace directly accessing a FConfigSection
- Fixed up Epic code for the deprecations (at least the majority, some projects that aren't built by Horde presubmit may have some that we will address going forward)
#jira UE-194955
#rb david.harvey and various others

[CL 27731364 by josh adams in ue5-main branch]
2023-09-08 17:58:55 -04:00
ben hoffman
18eb67c78c Implement GetOptions for UPARAM and add it for ByProfile traces
#rb dave.jones2

#ushell-cherrypick of 27593453 by kristof.morva1

[CL 27597870 by ben hoffman in ue5-main branch]
2023-09-05 11:33:21 -04:00
charles lefebvre
061b009699 Kismet Compiler: Deprecate SpawnIntermediateEventNode
#rnx
#rb dan.oconnor

[CL 27365052 by charles lefebvre in ue5-main branch]
2023-08-24 20:56:35 -04:00
dan oconnor
07e729f515 Optimize anim blueprint context menu construction, mostly by avoiding asset registry tag gathering, but also by reducing temporary allocations
#rb Jodon.Karlik

[CL 27215203 by dan oconnor in ue5-main branch]
2023-08-18 15:08:37 -04:00
ben zeigler
e3b7df8297 Change the blueprint action database to refresh type promotion instead of doing it from the module change callback.
This ensures the type promotion is refreshed right before it is needed and avoids redundant refreshes when multiple modules load at once.
#rb ben.hoffman

[CL 27177959 by ben zeigler in ue5-main branch]
2023-08-17 13:25:12 -04:00
ben hoffman
1737e87228 Allow you to convert operator nodes even if there are no default values or pin connections to the node
#jira UE-192879
#jira UE-192884
#rb trivial
#rnx

[CL 27074100 by ben hoffman in ue5-main branch]
2023-08-14 12:22:51 -04:00
ben hoffman
bb75a67657 Fix incorrect LOCTEXT namespace keys
#jira UE-192868
#rb trivial
#pf skip
#rnx

[CL 27069727 by ben hoffman in ue5-main branch]
2023-08-14 10:30:07 -04:00
ben hoffman
277fcfc08f Add an option to convert a comparison operator node to another comparison, like == to !=.
Add the symbol to the user facing operator name for comparison operators for a nicer menu

#rb dan.oconnor

[CL 27027544 by ben hoffman in ue5-main branch]
2023-08-11 10:30:15 -04:00
phillip kavan
8ed81e1723 Fix for a potential restricted editor crash in shipping builds.
#rb Ben.Zeigler, Ben.Hoffman

[CL 26864167 by phillip kavan in ue5-main branch]
2023-08-04 18:44:58 -04:00
geordiemhall
57ee928f20 PR #9389: Allow using "spawn node" keyboard shortcuts while dragging from a pin
#jira UE-159588

[CL 26780272 by geordiemhall in ue5-main branch]
2023-08-02 14:08:05 -04:00
ben hoffman
69f5ebcc13 Fixed const-correctness of UK2Node_Event::FindEventSignatureFunction
#rb marc.audy

#ushell-cherrypick of 26366689 by kristof.morva1

[CL 26407923 by ben hoffman in ue5-main branch]
2023-07-17 11:13:19 -04:00
dave jones2
817808ee4c UE-188291 - Blueprint autoconversions can't handle default values
Blueprint autoconversions normally work by checking pairs of linked pins and inserting cast nodes. However, default literal values on nodes aren't linked, so they must be treated differently.

Since default values aren't linked, we need to check the old and new pin types during rewiring. We can't do this during validation stage since we've forgotten the old pin type by that point. Additionally, we should prevent any sort of data loss when handling the default values. The safest way to do so is:

1. Create a literal node from the old type.
2. Create a conversion node between the old and new type.
3. Link the nodes to the pin that has the default value.

The drawback to this technique is that it inserts nodes, but it's safer than directly modifying the default value on the new pin (eg: "1.1" could end up as "1"). We still provide a note that nodes were inserted, which gives the developer the choice of how to handle the conversion change.

#jira UE-188291
#rb phillip.kavan

[CL 26034634 by dave jones2 in ue5-main branch]
2023-06-15 23:29:55 -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
ben hoffman
4759599dff [Backout] - CL25790092
Add a small bug fix to it. When attempting to create an auto-cast node from an Interface -> Object type, the UEdGraphSchema_K2::FindSpecializedConversionNode will NewObject whatever node type is required as a template to copy. This Template node does not have a parent graph (rightfully so) which means that the call to GetSchema would return null. When this happened with a Dynamic Cast node, it was checking on the schema being available in the SetPurity function where it was not before.

We don't want to set the parent graph on the template node during conversion because that isn't accurate because its a dummy template node, not something that is actually on the graph. It would also be adding references to that parent graph unnecessarily.
#rb Phillip.Kavan

Original CL Desc
-----------------------------------------------------------------
Fix potential crash when `bFavorPureCastNodes` is enabled.

`K2Node_Message` attempted to create an impure cast node when expanded, but `SetPurity(false)` had no effect in this case because inside it `IsNodePure` returned `false` even if the default cast purity was `Pure`. It resulted in the creation of a pure node, causing a crash because the Message node attempted to work with its (non-existent) exec pins.

#rb Phillip.Kavan

#ushell-cherrypick of 25757919 by kristof.morva1

[CL 25792482 by ben hoffman in ue5-main branch]
2023-06-05 11:05:42 -04:00
ben hoffman
4171fe00ac [Backout] - CL25758302
#fyi Phillip.Kavan
Original CL Desc
-----------------------------------------------------------------
Fix potential crash when `bFavorPureCastNodes` is enabled.

`K2Node_Message` attempted to create an impure cast node when expanded, but `SetPurity(false)` had no effect in this case because inside it `IsNodePure` returned `false` even if the default cast purity was `Pure`. It resulted in the creation of a pure node, causing a crash because the Message node attempted to work with its (non-existent) exec pins.

#rb Phillip.Kavan
#preflight 6479d868e319748a83f72c54

#ushell-cherrypick of 25757919 by kristof.morva1

[CL 25790092 by ben hoffman in ue5-main branch]
2023-06-05 08:30:10 -04:00
dan oconnor
ab70c4393b Automatically create ref terms for BP functions, this makes it easier to toggle a blueprint paramter to pass by reference
#preflight 6479399e947ff6973c60580f
#rb Phillip.Kavan, Dave.Jones
#jira UE-54695

[CL 25770430 by dan oconnor in ue5-main branch]
2023-06-02 15:10:08 -04:00
ben hoffman
10c18ce23e Fix potential crash when bFavorPureCastNodes is enabled.
`K2Node_Message` attempted to create an impure cast node when expanded, but `SetPurity(false)` had no effect in this case because inside it `IsNodePure` returned `false` even if the default cast purity was `Pure`. It resulted in the creation of a pure node, causing a crash because the Message node attempted to work with its (non-existent) exec pins.

#rb Phillip.Kavan
#preflight 6479d868e319748a83f72c54

#ushell-cherrypick of 25757919 by kristof.morva1

[CL 25758302 by ben hoffman in ue5-main branch]
2023-06-02 08:24: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