Commit Graph

323 Commits

Author SHA1 Message Date
Phillip Kavan
f864e2455c [UE-14914] Prevent function parameters from being autowired when intended for internal use only.
change summary:
- added a new "InternalUseParam" UFUNCTION() meta to support tagging function parameters as internal use only (=> hidden | not connectable)
- added a UK2Node_CallFunction::IsConnectionDisallowed() override method; returns 'true' if the 'bNotConnectable' flag is set on the node's pin (and will emit a compile error in existing projects if something is connected to it)
- modified FBlueprintEditorUtils::GetHiddenPinsForFunction() to accept an optional 'InternalPins' TSet as an output; on return, this will contain the subset of hidden pins that are marked as "InternalUseParam"
- modified UK2Node_CallFunction::CreatePinsForFunctionCall() to set the 'bNotConnectable' pin attribute to 'true' if "InternalUseParam == '<PinName>'" is included within the UFunction metadata
- modified the AActor::AddComponent UFUNCTION() decl to switch the "HidePin" meta to "InternalUseParam" for the 'ComponentTemplateContext' parameter (because it should not be connectable)
- modified UK2Node_CallFunction::NotifyPinConnectionListChanged() to refresh the node to hide pins corresponding to internal-only params once the (invalid) connection in an existing project has been broken

#codereview Mike.Beach

[CL 2606203 by Phillip Kavan in Main branch]
2015-06-30 14:42:07 -04:00
Maciej Mroz
23bb4fc3e8 UE-17499 Could use a way to add custom type auto-conversions for blueprints
New FunctionMetadta "BlueprintAutocast" was added.

todo: add warning in UHT
todo: remove hardcoded functions from UEdGraphSchema_K2::SearchForAutocastFunction

#codereview Mike.Beach

[CL 2604137 by Maciej Mroz in Main branch]
2015-06-29 12:18:57 -04:00
Michael Schoell
c246c1f538 Math Expression nodes will again correctly lookup by the display name of a function.
Changed metadata lookups that were still targetting FriendlyName to lookup the DisplayName.

#jira UE-17602 - Unable to use floor() in math expression node (display name), must use ffloor()

[CL 2602420 by Michael Schoell in Main branch]
2015-06-26 11:59:50 -04:00
Phillip Kavan
5948f6ee41 [UE-16820] Provide ability to access class default property values at runtime in a Blueprint script.
#codereview Maciej.Mroz, Nick.Whiting

[CL 2600715 by Phillip Kavan in Main branch]
2015-06-25 12:09:53 -04:00
Michael Schoell
40e00daae9 Can no longer split pins on Blueprint nodes if the struct does not have any valid properties.
#jira UE-17150 - Input pin disappears if split on GetScreenSpacePosition node

[CL 2598981 by Michael Schoell in Main branch]
2015-06-24 11:23:23 -04:00
Michael Schoell
913b55c8e0 Support for streaming level communication via interfaces.
Changed the K2Node_Message to expand and attempt to cast the incoming reference as a ULevelStreaming reference, get the level script actor, and cast that to the interface.

Exposed for Blueprints (BP internal use only) ULevelStreaming::GetLevelScriptActor

All levels can now have a BP interface added to them.

#jira UE-16706 - Implement Level Blueprint Interface Communication

[CL 2597586 by Michael Schoell in Main branch]
2015-06-23 14:40:21 -04:00
Maciej Mroz
5ab6dc7ad5 Better validation in Result Node.
[CL 2595677 by Maciej Mroz in Main branch]
2015-06-22 13:10:43 -04:00
Maciej Mroz
22b3cfb286 BP - return node improvements:
- UE-14092 Cannot create a return node with an execution pin only for a function
- UE-7849 Being able to have multiple return nodes for a function
- minor fixes

#codereview Nick.Whiting, Mike.Beach

[CL 2595496 by Maciej Mroz in Main branch]
2015-06-22 11:19:37 -04:00
Maciej Mroz
5ec4b83d35 For the simplest cases MathExpresion will be expanded the old way. The RPE optimization cannot handle the exoression without any function call.
Cases:
- literal - "3.14"
- variable access - "MyVar"
- new local variavle - "a"

UE-17139 Math Expressions fail to compile when output pin connected

[CL 2591759 by Maciej Mroz in Main branch]
2015-06-18 06:55:28 -04:00
Maciej Mroz
84560eff1a UK2Node_FunctionEntry::GetTooltipText was added.
https://udn.unrealengine.com/questions/249835/k2node-functionentry-result-tooltips.html

[CL 2590121 by Maciej Mroz in Main branch]
2015-06-17 10:48:10 -04:00
Maciej Mroz
15e44a1b6e ME Optimization:
- FBPTerminal::InlineGeneratedParameter added - the result of the function is directly used as input parameter, it's not stroed in a lical variable
- FKismetFunctionContext::InlineGeneratedParameter
- MathExpressionHandler - compile (to out intermediate representation) a subgraph using "reverse polish notation" approach
- Math Expression node is not longer expanded
- VMBackend supports InlineGeneratedParameter and InlineGeneratedParameter

#codereview Nick.Whiting, Mike.Beach

[CL 2587365 by Maciej Mroz in Main branch]
2015-06-15 10:54:30 -04:00
Michael Schoell
24e8feab5f Math Expression nodes will no longer always appear as changed when doing a diff on a Blueprint.
The Math Expression graph will be completely missing from the diff display, it is regenerated each time and the important detail is the math expression the user inputs. The node's math expression will show up if there are differences between two Blueprints.

#jira UE-9785 - Math expression nodes always appear in BP Diff

[CL 2582830 by Michael Schoell in Main branch]
2015-06-10 11:52:53 -04:00
Maciej Mroz
ba111a9270 GenericCreateObject node can be called in Construction Script
UGameplayStatics::SpawnObject checks ClassWithin

#codereview Nick.Whiting, Marc.Audy

[CL 2582478 by Maciej Mroz in Main branch]
2015-06-10 07:03:55 -04:00
Maciej Mroz
3b0a6cef0c UE-11946 Support Objects in Blueprint
- GenericCreateObject node
- UGameplayStatics::SpawnObject function
- DontUseGenericSpawnObject class meta data

Missing: runtime mechanism to verify if an object of given class can be spawned using Generic Create Object

#codereview Nick.Whiting, Mike.Beach

[CL 2581001 by Maciej Mroz in Main branch]
2015-06-09 04:42:50 -04:00
Maciej Mroz
c650c628c0 K2Node_ConstructObjectFromClass - links to exposed properties are not broken when the class is changed.
#codereview Nick.Darnell

[CL 2579798 by Maciej Mroz in Main branch]
2015-06-08 06:06:24 -04:00
Maciej Mroz
5f019a3e11 Custom (no-actor, no-component) objects created by Blueprint Callable function have RF_StrongRefOnFrame flag set.
#codereview Mieszko.Zielinski, Michael.Noland, David.Ratti, Nick.Darnell, Terence.Burns, Peter.Sauerbrei

[CL 2578334 by Maciej Mroz in Main branch]
2015-06-05 08:21:26 -04:00
Maciej Mroz
6e1981229c Various improvement in ConstructObjectFromClass K2Node
#codereview Nick.Darnell

[CL 2578251 by Maciej Mroz in Main branch]
2015-06-05 05:04:54 -04:00
Michael Schoell
a7facd9a38 When dragging off a pin in a function graph, local variable nodes will no longer be filtered out of the context menu for placement if they are valid for connection.
Stores the UProperty of the local variable in the node spawner.

#jira UE-16062 - Local variables never appear when dragging off another pin.

[CL 2577367 by Michael Schoell in Main branch]
2015-06-04 14:57:06 -04:00
Michael Schoell
f76f4ffbd4 Select nodes using enums with hidden values will no longer incorrectly match up the Option pin connections to the improper enum value.
Fixed a localization issue with display enum values as pin names.

#jira UE-16134 - Hidden enumerator variables can cause the enumerator to become broken with the Select node in blueprints

[CL 2576970 by Michael Schoell in Main branch]
2015-06-04 10:30:59 -04:00
Jeff Farris
d244d227bc Fixed several shadow variable warnings
#codereview: Lukasz.Furman, Michael.Schoell, Dan.Oconnor, Eric.Newman, Gil.Gribb

[CL 2575931 by Jeff Farris in Main branch]
2015-06-03 14:47:53 -04:00
Michael Schoell
d3c4f18bcd Can right click on any node to search for references of it. Does initial search only in current Blueprint.
Localization fixes for Find-in-Blueprints so it will again search the current and native language.

CallFunction and CustomEvents now store their non-friendly "native" names. These will not actually appear in search results, but will be compared while searching to determine if the node matches the results.

Gathering Blueprint search data will now force friendly names to true while it gathers so gathered data does not differ based on the setting.

#jira UE-15901 - Right click a custom event to get a list of all blueprints that are calling the custom event

[CL 2572814 by Michael Schoell in Main branch]
2015-06-01 14:36:32 -04:00
Michael Schoell
cf62938645 When searching the pin type selector, items will no longer appear blank.
Fixed an issue where unloaded items appeared with "Error!", FriendlyName was not properly set before the description cached.

#jira UE-16285 - Searching in a type dropdown causes all type names to become blank

[CL 2570559 by Michael Schoell in Main branch]
2015-05-29 11:14:00 -04:00
Maciej Mroz
206fd32952 UE-15907 Opening the Pin Type Selector is way too slow
Optimization.

#codereview Michael.Schoell

[CL 2568155 by Maciej Mroz in Main branch]
2015-05-28 03:57:54 -04:00
Dan Oconnor
2d871fe3fb [UEBP-56] Optimized K2Node_CallFunction construction, pin tool type generation was being performed for all pins, and is expensive. Made it lazy (pins created when you mouse over a pin)
[CL 2567511 by Dan Oconnor in Main branch]
2015-05-27 17:51:08 -04:00
Maciej Mroz
1d39b9b457 UE-16019 Calling functions that have an implicit WorldContextObject parameter in a Blueprint function library will give a compile error about a missing __WorldContext pin
There is always WorldContext in bp static functions.

#codereview Nick.Whiting, Mike.Beach

[CL 2562999 by Maciej Mroz in Main branch]
2015-05-22 14:08:54 -04:00