Commit Graph

437 Commits

Author SHA1 Message Date
nate strohmyer
c4b2e38146 Making a Drag/Drop action for Input Actions into the Blueprint Graph
#Jira UE-161947
#rb ben.hoffman
#preflight 635c52813c0af539fd66d17c

[CL 23040016 by nate strohmyer in ue5-main branch]
2022-11-08 16:28:09 -05:00
danny couture
df8be2ca9a Fix some edgraph node trying to create transactions on async loading thread
#rb Dan.OConnor
#preflight 6340d28e607039cbc18da002

[CL 22414925 by danny couture in ue5-main branch]
2022-10-07 21:59:36 -04:00
joe pribele
527323e1d4 [Engine] added IsDefaultAsString to optimize and compare to default value
#rb dan.oconnor
#p4v-preflight-copy 21907138

[CL 21976407 by joe pribele in ue5-main branch]
2022-09-12 19:53:27 -04:00
dave jones2
1b50b70aee UE-160862 - Fix FW-Gameplay miscellaneous module truncation warnings
#jira UE-160862
#preflight 63191b1cb069eea9ab594ea2
#rb andrew.davidson

[CL 21974045 by dave jones2 in ue5-main branch]
2022-09-12 18:16:22 -04:00
Robert Millar
d2a8b279ca FNames containing asset paths are deprecated. FSoftObjectPath or FTopLevelAssetPath should be used instead.
Fixups for blueprints in editor.

#jira UE-161932
#rb ben.zeigler
#preflight 631820e4d135b61bc59b9981

[CL 21841686 by Robert Millar in ue5-main branch]
2022-09-07 01:06:47 -04:00
dave jones2
2cf80c3b71 Misc cleanup:
* Constify CreateFunctionGraphTerminators
* Update the definition of RegisterCompilerForBP to use same the same typedef parameter as its declaration.

#jira none
#preflight 6317b87dd135b61bc587fff6
#rb trivial

[CL 21830127 by dave jones2 in ue5-main branch]
2022-09-06 17:37:25 -04:00
nate strohmyer
8f9a2c9864 Adding support for dragging variables onto pins to automatically convert/promote
#Jira UE-161385
#rb benjamin.fox
#preflight 6306aa5cae13a5a0984ba4b2

[CL 21680779 by nate strohmyer in ue5-main branch]
2022-08-29 12:39:17 -04:00
max chen
6450d4a229 Remove Matinee (1/2)
This change completely removes Matinee from the codebase. The data types and runtime evaluation code are gone. The "InterpEdit" editor mode, asset factories, and other editor support for Matinee is gone. CameraAnims and their sequencer tracks are gone. FBX import/export for Matinee assets is gone.

#preflight 62d0591e562520a394bca1d1
#preflight 62d194f63c3df323904679c1
#jira UE-105313
#rb none

#ROBOMERGE-OWNER: max.chen
#ROBOMERGE-AUTHOR: ludovic.chabant
#ROBOMERGE-SOURCE: CL 21116312 via CL 21116339 via CL 21118051
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21142481 by max chen in ue5-main branch]
2022-07-17 22:45:06 -04:00
marc audy
8ca5f6a8be [Backout] - CL20807495
[FYI] Thomas.Sarkanen
Original CL Desc
-----------------------------------------------------------------
Added BP action DB filtering

Applies optional filtering to the BP context menu and related UIs.

Primarily this is implemented at the BlueprintActionDatabase/Registrar level as permissions are mostly static. One additional filter has been added to BlueprintActionFilter to handle filtering out items from assets that cannot be referenced from *this* blueprint.

Added type filtering to the variable type tree to prevent creating disallowed variable types.

Also added some auditing console commands: bp.AuditThreadSafeFunctions and bp.AuditFunctionCallsForBlueprint
Corrected FBlueprintEditorUtils::HasFunctionBlueprintThreadSafeMetaData to not track FUNC_BlueprintEvent flags for native functions.

#jira UE-156715
#rb Phillip.Kavan,Jason.Stasik
#preflight 62b572f1970a8db33765bf83

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 20813981 via CL 20863344 via CL 20871119 via CL 20871207
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20876885 by marc audy in ue5-main branch]
2022-06-29 12:27:43 -04:00
phillip kavan
198fbe8f64 Added BP action DB filtering
Applies optional filtering to the BP context menu and related UIs.

Primarily this is implemented at the BlueprintActionDatabase/Registrar level as permissions are mostly static. One additional filter has been added to BlueprintActionFilter to handle filtering out items from assets that cannot be referenced from *this* blueprint.

Added type filtering to the variable type tree to prevent creating disallowed variable types.

Also added some auditing console commands: bp.AuditThreadSafeFunctions and bp.AuditFunctionCallsForBlueprint
Corrected FBlueprintEditorUtils::HasFunctionBlueprintThreadSafeMetaData to not track FUNC_BlueprintEvent flags for native functions.

#jira UE-156715
#rb Phillip.Kavan,Jason.Stasik
#preflight 62b572f1970a8db33765bf83

#ROBOMERGE-OWNER: phillip.kavan
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 20807495 via CL 20815974 via CL 20816610 via CL 20816624
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20818683 by phillip kavan in ue5-main branch]
2022-06-24 18:53:46 -04:00
nate strohmyer
de8cfbc19d Fix to allow users to coerce a BlueprintImplementableEvent with no return value to treat the override as a function rather than an event
#jira UE-153344
#rb phillip.kavan
#preflight 62a8e2800c386ccae4861791
#3078

[CL 20658293 by nate strohmyer in ue5-main branch]
2022-06-14 17:22:51 -04:00
dave jones2
bcadd23489 UE-151338 - Implement refactored implicit conversion for math types.
Removed container and struct conversions from the script VM. This introduced complexity that the VM doesn't need, nor did it scale for the various struct types that we want to implicitly convert in Blueprints. Instead, the script VM is *only* aware of float<->double conversion. Container and struct conversions have now been moved to BlueprintTypeConversions. Currently, only the existing FVector3f<->FVector3d conversion has been added, but the remaining LWC types will be added in a subsequent change.

During Blueprint compilation of container and struct conversions, we now inject a function call into the bytecode that performs the conversion, which is better suited to the task instead of burdening the VM with the work. One drawback to this technique is that containers are slightly more inefficient when it comes to conversions. They won't know their type(s) ahead of time, which requires dynamically looking up a conversion function at runtime. We can possibly optimize this further, but the generaly recommendation is to avoid implicit conversions of container types when possible.

Additionally, a couple of convenience functions were added to the KismetCastingUtils to help remove a fair amount of boilerplate code that was used for implicit casting in various node types. ScriptCastingUtils.h was also removed since the VM no longer needs to concern itself with complex conversions.

#jira UE-151338
#preflight 629a507fb42820769428c133
#rb phillip.kavan

[CL 20560449 by dave jones2 in ue5-main branch]
2022-06-08 13:50:57 -04:00
jordan hoffmann
0e53056bc6 Clang now optimizes away this==nullptr. Calls to IsChildOf from a null UObject pointer will cause undefined behavior. This is a retroactive attempt to pad potentially dangerous calls to IsChildOf with a null check in the following directories:
- Plugins/BlueprintContext
- Editor/GlueprintGraph
- Editor/GraphEditor
- Editor/Kismet
- Editor/KismetCompiler
- Editor/UnrealEd/Private/Kismet2

note: if you're seeing this CL in the perforce history because you're trying to figure out why there's a null check that doesn't make sense, This is why. The goal of this CL is to preserve the behavior before IsChildOf changed rather than analyze whether that behavior makes sense. Use your best judgement

#rb marc.audy
#preflight 6299023a6438e3c731307a69

[CL 20474984 by jordan hoffmann in ue5-main branch]
2022-06-02 16:09:18 -04:00
robert manuszewski
d1443992e1 Deprecating ANY_PACKAGE.
This change consists of multiple changes:

Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used  in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values

AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes

Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names

#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32

#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20448496 by robert manuszewski in ue5-main branch]
2022-06-01 03:46:59 -04:00
Leon Huang
19877e39c5 Fix for duplicate localization key warnings and missing localization defines/undefines in various files.
#rnx
#rb: Vincent.Gauthier
#jira: UE-151614
#preflight: 628fc4a98c23e52ef0fdfa7d

[CL 20384450 by Leon Huang in ue5-main branch]
2022-05-26 16:11:10 -04:00
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -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
ca0c617b71 UE-150403 - Math nodes of float type double will accept both single & double in the input pins
When linking a single precision pin to a double, we need to treat the pins as the same type, which ensures that a "break" message is used. However, FTypePromotion discovered that a cast exists between the two types, so it returns a "make with promotion" message instead.

The easiest fix here is to simply move the type promotion check to when the types don't match, since equal types imply that no promotion would be necessary to begin with. A more long term fix would be to remove float/double cast functions from KismetMathLibrary, as they're no longer necessary with implicit casting.

#rb ben.hoffman
#preflight 626aba17b17dd9121b3e37f5
#jira UE-150403

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 19966951 in //UE5/Release-5.0/... via CL 19967813
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19971946 by dave jones2 in ue5-main branch]
2022-04-28 18:57:07 -04:00
dave jones2
60bc4583a5 UE-147869 - Tooltips for floats are not the same in the My Blueprint window
For floats, the display should now include either a "(single-precision)" or "(double-precision)" next to the float type. Unfortunately, this required a bit of finagling.

When we query for the tooltip, we also need to specify that we want to include subcategory information, which requires changing the signature of GetTypeDescription (et al) and GetCategoryText to include that information. Additionally, pluralizing the type gets a little weird. For containers, you might get something such as "Current type: Array of Float (single-precision)s". Instead of trying to fix the out of place "s", the wording has been changed to "Current: Array of Float (single-precision) types".

#rb justin.hare
#preflight 6257501bf7476d662c9094c6
#jira UE-147869

[CL 19757826 by dave jones2 in ue5-main branch]
2022-04-14 11:38:11 -04:00
Thomas Sarkanen
f3dd157c95 Fixed defaults not being able to be set on interface pins
This allows assets that implement an interface to be set as pin defaults

#jira none
#rb Phillip.Kavan
#preflight 624d63004c5db57ae60511d3

[CL 19644779 by Thomas Sarkanen in ue5-main branch]
2022-04-06 06:13:40 -04:00
Josie Yang
b34efacab9 Provide custom context menu search criteria for material editor
#jira UE-144802
#rb ben.hoffman, ben.ingram
#preflight 623dcdc04302b204a3680deb

[CL 19513296 by Josie Yang in ue5-main branch]
2022-03-25 11:18:02 -04:00
dave jones2
5b9494ac73 UE-145026 - BP Precision issues occur in CM_Character_Jumping (CharacterMovement  EngineTests) when comparing FP literals with serialized floats
We need to ensure that literal default values are interpreted as float strings instead of doubles. We've observed that some older Blueprint content might be using exact comparisons with floats. While this is generally frowned upon, some game logic may depend on this behavior. These issues can be difficult to debug if we covertly interpret literal float data as doubles.

As for the fix, anytime we serialize old pin data that represented a single precision float, we set a flag on the type that ensures we parse its default value string as a single precision float. This flag is also serialized, and isn't changed until the user actually changes the current value to something different.

#jira UE-145026
#preflight 622a416b03062eac59dae469
#rb phillip.kavan
#lockdown

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 19339612 in //UE5/Release-5.0/... via CL 19348994
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19349461 by dave jones2 in ue5-main branch]
2022-03-11 00:35:01 -05:00
dave jones2
d159c90e80 UE-144351 - Blueprint real numbers causing Dev-EngineMerge blocker
The KismetMathLibrary changes made in CL 19159126 revealed a problem with type promotions: it's too strict when it comes to finding matching functions. This is currently preventing a  BP class from compiling, which is blocking Dev-EngineMerge.

We need to modify ArePinTypesEquivalent to be less strict about real number comparisons, which permits using single precision float pins with double precision math functions.

#jira UE-144351
#preflight 621ec6c331454c90cce33859
#rb Marc.Audy
#lockdown


#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 19224349 via CL 19226280 via CL 19226464 via CL 19226631 via CL 19226810
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19230290 by dave jones2 in ue5-main branch]
2022-03-02 16:53:08 -05:00
dave jones2
913ad8df93 UE-143681 - Constructed object in BP is ignoring override value for exposed float property
Two issues were discovered:

1. UKismetSystemLibrary::SetFloatPropertyByName is no longer used since it's been replaced by SetDoublePropertyByName. As a result, SetDoublePropertyByName would fail if the property was actually a float, which can happen if it's a native class. In this case, we should check for a FFloatProperty as a fallback.
2. Deprecation of float<->string converion functions in CL 19083449 introduced a regression: we can no longer use autocasts when the type is a single-precision float. In this case, we should search for autocast functions that take a double instead.

#jira UE-143681
#preflight 62181516783beeaf8ae8db8b
#rb andy.davidson
#lockdown julien.marchand

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 19157869 in //UE5/Release-5.0/... via CL 19159851
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19161495 by dave jones2 in ue5-main branch]
2022-02-25 19:47:52 -05:00
michael noland
8267e386da Blueprints: Added a cvar to control the how Reals are presented to users in the Blueprint editor, changing the default to Float
#jira UE-143287
#preflight 621135dce75c3475c7c8c993
#rb Marc.Audy

#ROBOMERGE-AUTHOR: michael.noland
#ROBOMERGE-SOURCE: CL 19082558 in //UE5/Release-5.0/... via CL 19097129
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19140882 by michael noland in ue5-main branch]
2022-02-24 23:33:34 -05:00