[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]
- 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]
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]
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]
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]
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]
[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]
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]
(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]
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]
#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]
`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]
[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]
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]