Commit Graph

164 Commits

Author SHA1 Message Date
robert manuszewski
b938e59c9b Reimplementing FProperty changes from //UE4/Main
+ Reimplemented FProperty related fixed from //UE4/Main:
CL#10791312, 10804850, 10851666, 10855122, 10855198, 10942138, 11030611, 11030639, 11032261, 11061515, 11136964,11138881, 11214238, 11214865

#rb none (previously reviewed in Dev-Core)
[FYI] Chris.Bunnner, Daniel.Lamb


#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 11302985 via CL 11303011 via CL 11303019
#ROBOMERGE-BOT: (v0-11244347)

[CL 11303183 by robert manuszewski in Main branch]
2020-02-10 08:06:56 -05:00
Max Chen
b4881d8bf8 Copying //UE4/Dev-Editor to Dev-Tools-Staging (//UE4/Dev-Tools-Staging) @11123875
#rb none
#jira none

[CL 11123880 by Max Chen in Dev-Tools-Staging branch]
2020-01-27 20:11:15 -05:00
JeanMichel Dignard
dc2d35695f Copyright fixes
#rb none
#rnx

[CL 10910710 by JeanMichel Dignard in Dev-Tools-Staging branch]
2020-01-08 17:11:23 -05:00
JeanMichel Dignard
70d074639f Merging //UE4/Dev-Main @ 10886849 to Dev-Tools-Staging (//UE4/Dev-Tools-Staging)
#rb none
#rnx

[CL 10906274 by JeanMichel Dignard in Dev-Tools-Staging branch]
2020-01-08 13:26:18 -05:00
jeanmichel dignard
2ce7666d2d Copying //UE4/Dev-Core [at] 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

#ROBOMERGE-OWNER: jeanmichel.dignard
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 10708666 in //UE4/Main/...
#ROBOMERGE-BOT: TOOLS (Main -> Dev-Tools-Staging) (v626-10872990)

[CL 10898071 by jeanmichel dignard in Dev-Tools-Staging branch]
2020-01-07 15:54:23 -05:00
james mcnatton
023f6090b2 Expose functions to register and unregister callbacks for python shutdown
#ROBOMERGE-SOURCE: CL 10892013 via CL 10892030
#ROBOMERGE-BOT: (v626-10872990)

[CL 10892051 by james mcnatton in Main branch]
2020-01-07 10:59:08 -05:00
Marc Audy
360d078ca3 Second batch of remaining Engine copyright updates.
#rnx
#rb none

[CL 10871248 by Marc Audy in Main branch]
2019-12-27 09:26:59 -05:00
Chris Gagnon
346a4b05ea Copy up from Dev-Editor @10681378
#rb none

[CL 10837446 by Chris Gagnon in Dev-Tools-Staging branch]
2019-12-19 18:07:47 -05:00
Jamie Dale
7dab7f26af Ensure start-up scripts run when using Python in commandlet mode
#rb none

[CL 10796194 by Jamie Dale in Main branch]
2019-12-18 10:36:58 -05:00
Jamie Dale
964231997f Defer the OnPythonInitialized notification until after start-up scripts have run
This delegate was previously useless as it would run when the PythonScriptPlugin module was loaded, which meant that no-one could bind to it

#rb none

[CL 10795922 by Jamie Dale in Main branch]
2019-12-18 10:30:26 -05:00
Jamie Dale
93b10e9d9c Python FProperty fixes
- Fixed Python container wrappers leaking transient property instances.
   - PyUtil::TPropOnScope will manage an optionally owned property instance, deleting it if required when it goes out-of-scope.
 - Fixed Python container wrappers crashing during GC due to calling FReferenceCollector::AddReferencedObjects passing a FProperty-based type.
 - Fixed Python delegate wrappers crashing when called with arguments due to checking Children rather than ChildProperties.

#rb Robert.Manuszewski
#rnx

[CL 10791312 by Jamie Dale in Main branch]
2019-12-18 08:41:22 -05:00
Robert Manuszewski
7b6f840f7f Copying //UE4/Dev-Core @ 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 10708666 by Robert Manuszewski in Main branch]
2019-12-13 11:07:03 -05:00
Jamie Dale
c59d31c72d Emit RuntimeError in Python for Blueprint execution errors
This previously used the generic Exception type

#fyi Andrew.Rodham
#rb none

[CL 10497227 by Jamie Dale in Dev-Editor branch]
2019-12-03 11:48:43 -05:00
Jamie Dale
daa908ed5a Fix CIS static analysis warning (unreachable code)
#rb none
#rnx

[CL 10479149 by Jamie Dale in Dev-Editor branch]
2019-11-28 17:16:47 -05:00
Jamie Dale
6ed3c75acf Improved Python error reporting for invalid ScriptName and ScriptMethod values
Bad values here can cause the unreal.py file to fail to parse, so we now validate that user-defined values are valid for Python when generating the glue and report an error for any that are invalid.

This also re-adds the type prefixes to any class, struct, or enum types that would start with a number without their prefix. Once again, this is needed to avoid invalid symbol names in the unreal.py file.

#jira UE-85176
#rb none

[CL 10479002 by Jamie Dale in Dev-Editor branch]
2019-11-28 15:42:26 -05:00
Jamie Dale
6676737341 Fixed some issues that caused the unreal.py stub file to have syntax errors
We require this file to be error free in order to generate the Python API docs

#jira UE-85176
#rb Conan.Reis
#rnx

[CL 10478756 by Jamie Dale in Dev-Editor branch]
2019-11-28 12:09:25 -05:00
jamie dale
26c86de3f2 Fixed some issues that caused the unreal.py stub file to have syntax errors
We require this file to be error free in order to generate the Python API docs

#jira UE-85176
[FYI] Robb.Surridge
#rb Conan.Reis
#lockdown Cristina.Riveron
#rnx

#ROBOMERGE-SOURCE: CL 10476637 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v595-10452236)

[CL 10476638 by jamie dale in Main branch]
2019-11-27 17:12:25 -05:00
Jamie Dale
d8cba515b4 Disable register warnings for C code included into C++17
#jira UE-85039
#rb Ben.Marsh
#rnx

[CL 10461373 by Jamie Dale in Dev-Editor branch]
2019-11-26 16:41:45 -05:00
Jamie Dale
47d89a1e16 Added a Blueprint node for calling Python with args
This allows people to create a Blueprint node that can define a blob of literal Python script, along with wildcard inputs and outputs to be used by the script itself.

The node takes care of marshalling data in and out of the Python script, and allows people to invoke custom Python from Blueprints without relying on Python generated BPFL types.

#jira UE-84932
#rb Dan.OConnor

[CL 10421545 by Jamie Dale in Dev-Editor branch]
2019-11-25 14:20:28 -05:00
Jamie Dale
b266566090 Clean-up native module references when shutting down Python
#rb Rex.Hill

[CL 10355258 by Jamie Dale in Dev-Editor branch]
2019-11-21 14:55:43 -05:00
Jamie Dale
da52d61658 PySlate now checks that FSlateApplication is available rather than crashing
#rb Rex.Hill

[CL 10349283 by Jamie Dale in Dev-Editor branch]
2019-11-21 14:10:27 -05:00
Jamie Dale
6d5ffe9fa3 Implemented set_editor_properties for Python wrapped structs
This will attempt to notify the nearest object in the Python owner context stack, and is otherwise identical to the implementation for wrapped objects (see 10265342).

#rb Lauren.Barnes
#rnx

[CL 10343893 by Jamie Dale in Dev-Editor branch]
2019-11-21 13:32:25 -05:00
Jamie Dale
fa47fcdea1 Added a way to force a change notify when using SetEditorProperty in Python or Editor Utilities, even if the value is unchanged
This may be needed if you've edited data on an instance indirectly (eg, modifying an array reference on the object), and need to force a change notification to update some dependent data.

In Python, this can be done by passing unreal.PropertyAccessChangeNotifyMode.ALWAYS as the notify_mode argument to set_editor_property.
In Editor Utilities, there is a new advanced pin available for setting the "Change Notify Mode".
In both cases the default method is to notify only when the value actually changes.

This change also significantly simplifies UK2Node_GetEditorProperty and UK2Node_SetEditorProperty by having them derive from UK2Node_CallFunction, rather than being a proxy node that expands to a UK2Node_CallFunction node.

#jira UE-80285
#rb Lauren.Barnes

[CL 10337069 by Jamie Dale in Dev-Editor branch]
2019-11-21 12:12:05 -05:00
Jamie Dale
f1f4f7fcb0 Generate UserDefinedEnum wrappers on-demand if marshalled via Python
This avoids the caller needing to have called unreal.get_blueprint_generated_types(...) for the type before trying to access it.

#rb Lauren.Barnes

[CL 10319031 by Jamie Dale in Dev-Editor branch]
2019-11-20 10:01:08 -05:00
Jamie Dale
29fa4b658e Fixed Python memory leak
#rb none
#rnx

[CL 10267523 by Jamie Dale in Dev-Editor branch]
2019-11-15 16:31:57 -05:00