Commit Graph

203 Commits

Author SHA1 Message Date
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
patrick laflamme
87e164b574 Exposed UEnum display name to Python through method get_display_name(). Ex: print(unreal.TextureCompressionSettings.TC_GRAYSCALE.get_display_name())
- Supported reading the enum entry display name set in C++ as well as the one injected from python with the [at]uenum annotation.
  - Added unit tests.

#jira UE-132375 - Add a way for python to get the friendly name of an enum value
#rb Jamie.Dale

#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 18019999 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18020038 by patrick laflamme in ue5-release-engine-test branch]
2021-11-02 11:34:25 -04:00
jeanmichel dignard
8a9d07083d Python: Fixed an issue where remove_callable wouldn't work if the callable was a method (vs a function).
PyObject ptr equality doesn't work for method objects as there's a new instance everytime.
Instead, compare the callables tp_call pointers and PyMethod_Self values for methods.

#rb Patrick.Laflamme, Jamie.Dale

#ROBOMERGE-AUTHOR: jeanmichel.dignard
#ROBOMERGE-SOURCE: CL 17981106 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 17981189 by jeanmichel dignard in ue5-release-engine-test branch]
2021-10-29 11:32:36 -04:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
patrick laflamme
9aa3d1c4ae Fixed static analyzer complaining about int/bool comparison in Python
- Used static_cast<bool>() to work with both python 3.7 and 3.9. The macro expression type changed from bool to int between the versions.

#jira UE-126618 - //UE5/Main - UE4 Static Analysis Win64 (PVS-Studio) - pyengine.cpp compares a bool type value with a value of 0
#rb Brooke.Hubert

#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 17523778 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17523850 by patrick laflamme in ue5-release-engine-test branch]
2021-09-15 14:25:05 -04:00
patrick laflamme
6a6f7b7560 Minor fixes to prepare for the upcoming Python 3.9.7 update.
- Tested those fixes with Python 3.7.x (current) and 3.9.7 (upcoming) on Windows and Mac

#jira UE-124978 - Upgrade to Python 3.9.x
#rb Jamie.Dale

#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 17491930 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17491945 by patrick laflamme in ue5-release-engine-test branch]
2021-09-13 10:43:11 -04:00
dan phillips
c4168d9c60 Added missing includes and forward declarations
Supplied by David.Bollo of The Coalition.
Fixes some non unity compile errors

[FYI] David.Bollo
#jira none

#ROBOMERGE-SOURCE: CL 17206575 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17206608 by dan phillips in ue5-release-engine-test branch]
2021-08-17 17:47:10 -04:00
andriy tylychko
6bf3101dcd deprecated FTicker and family and replaced by thread-safe FTSTicker
#jira UE-120090
#rb francis.hurteau


#ROBOMERGE-SOURCE: CL 17176325 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17176374 by andriy tylychko in ue5-release-engine-test branch]
2021-08-16 11:09:22 -04:00
jamie dale
44dc0680b2 Added a guard when converting to FName in Python, to verify the name fits within NAME_SIZE
[FYI] Malachi.Duncan

#ROBOMERGE-SOURCE: CL 16938846 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16938855 by jamie dale in ue5-release-engine-test branch]
2021-07-23 13:16:11 -04:00
jamie dale
da9ca8b7d8 Added missing __repr__ function to the basic Python wrapped types
[FYI] Malachi.Duncan

#ROBOMERGE-SOURCE: CL 16910247 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16910254 by jamie dale in ue5-release-engine-test branch]
2021-07-21 11:42:49 -04:00
jamie dale
63144c3236 Added support for per-plugin Python site-packages
Plugins can now add third-party Python scripts within their Content/Python/Lib/site-packages and Content/Python/Lib/{Platform}/site-packages folders, and these will be automatically available for import within UE.

#rb JeanMichel.Dignard, Timothy.Daoust

#ROBOMERGE-SOURCE: CL 16884142 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16884152 by jamie dale in ue5-release-engine-test branch]
2021-07-19 11:34:56 -04:00
matt kuhlenschmidt
8a71ad940c Minor adjustments to the output log drawer.
- ~ key now also works for python command boxes
- Improved tooltip for the output log drawer
- Cosmetic UI changes.

#ROBOMERGE-SOURCE: CL 16352021 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16352157 by matt kuhlenschmidt in ue5-release-engine-test branch]
2021-05-17 11:31:32 -04:00
aurel cordonnier
50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00
Jamie Dale
f3b5253145 Isolate the embedded Python interpreter from the general Python system environment
The following flags are now set when initializing the embedded Python interpreter:
 - Py_IgnoreEnvironmentFlag - Ignore PYTHONPATH when calculating sys.path.
 - Py_IsolatedFlag - Skip adding the user's site-packages directory to sys.path.

To counter the loss of PYTHONPATH, a new UE_PYTHONPATH environment variable is now available with the same rules as PYTHONPATH.

#jira UE-113583
#rb Rex.Hill

[CL 16064481 by Jamie Dale in ue5-main branch]
2021-04-20 14:53:29 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
louise rasmussen
825c64a6f5 Level Editor Menu Re-org, Part 1
#JIRA UETOOL-3039
#rb Lauren.Barnes
#lockdown Simon.Tourangeau
#preflight 606b8e0315d4190001b1698b

#ROBOMERGE-SOURCE: CL 15924633 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15924652 by louise rasmussen in ue5-main branch]
2021-04-05 19:11:24 -04:00
jamie dale
ea4bbb8f16 Fixed warnings emitted from exporting interfaces to Python
- Only export interface functions if there isn't already a function with this name on the type.
 - Added tests for interfaces, including interface inheritance, and multiple inheritance on an object.

#jira UE-112343, UE-112342
#rb Jurre.deBarre

#ROBOMERGE-SOURCE: CL 15876710 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15876772 by jamie dale in ue5-main branch]
2021-03-31 12:25:01 -04:00
jurre debaare
135dfef6fc Generating functions from inherited UInterfaces when generating glue for Python scripting
#rb Jamie.Dale
#jira none

#ROBOMERGE-SOURCE: CL 15819722 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v785-15821902)

[CL 15823697 by jurre debaare in ue5-main branch]
2021-03-25 10:53:26 -04:00
jamie dale
ae4bb81cc4 Renamed literal UE4 references in PythonScriptPlugin
#jira UE-111113, UE-111234, UE-111238, UE-111115, UE-111118, UE-111144, UE-111225, UE-111135, UE-111209, UE-111240, UE-111197, UE-111127, UE-111244, UE-111139, UE-111156, UE-111202, UE-111153, UE-111211, UE-111215, UE-111218, UE-111121, UE-111132, UE-111123, UE-111228, UE-111178
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 15750502 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v781-15675533)

[CL 15753936 by jamie dale in ue5-main branch]
2021-03-20 04:30:34 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00
Tim Smith
a2237e050d LiveCoding Re-instancing
LIMITATIONS:

1) Re-instancing will only update UClass instance data.
2) Adding and removing properties should only be done towards the end of a class or structure and can not be followed by complex data types.
3) Adding and removing properties from a base class should not be done if a derived class contains complex data types.

KNOWN ISSUES:

1) Changes to enumerations and structures will not be reflected in existing blueprints.  However, adding new nodes to the blueprint will show the updated enumeration or structure.
2) If a class contains an enumeration or structure as a member, the class will not be re-instanced if enumeration or structure is changed.

CHANGES:

1) LiveCodingServer
1a) Modified to always execute certain static instances during load.
1b) Modified to exclude the _Statics static structures to avoid patching to old copies.

2) Added support for LiveCoding reinstancing
2a) Refactored deferred registration system for UClass, UEnum, and UScriptStruct to use a common system that works for normal game, hot reload and live coding.
2b) Type specific version check data is possible (i.e. enum doesn't have a size)
2c) Single registration static for UClass
2d) Single registration class for all types that is just a blind forward to API.
2e) Static and dynamic registrations use different API entry points to avoid having overloaded argument lists that just apply to one or the other.
2f) Shims for older API

3) New common "Reload" system to avoid using HotReload code.
3a) Support common delegates regardless of who is reloading/reinstancing.
3b) Re-instancing code moved from HotReload to Kismet2 (where the bulk of the re-instance code already existed).
3c) Modified PyWrapper to use new helper class instead of depending on HotRelaod
3d) Added WITH_RELOAD which is defined if HotReload or LiveCoding is enabled.
3e) Modifed existing code to use new #define and delegates.

Robert did the review on the changes covered by Part 2.  Remaining changes are all straightforward.

#rb robert.manuszewski
#jira UE-74493

[CL 15736777 by Tim Smith in ue5-main branch]
2021-03-18 08:13:59 -04:00
paul chipchase
2f83d98619 Add an overload to the /= operator for FString that is compatible with FStringView/TStringBuilder/FString and removed the FString specific /= operator.
- To maintain backwards compatibility an overload for non TCHAR raw string types has also been added which will be converted to the correct format via a temp FString first.
  - Fixed cases of Fstring /= char* found in AndroidPlatformFile.cpp and PythonScriptPluginPreload.cpp
- Added unit tests for the /= operator when passing in TCHAR*, ANSICHAR*, FString, FStringView and TStringBuilder in various forms.
- Changed GetNumfor TStringBuilderBase to return int32 (which is what TStringBuilderBase::Len() returns anyway) rather than SIZE_T to prevent compiler warnings about casting types.

#rb Steve.Robb

[CL 15674959 by paul chipchase in ue5-main branch]
2021-03-11 04:03:02 -04:00
jamie dale
7d4b261557 Pre-cache the available on-disk Unreal Python modules
This can save 1-2s during Python initialization, by removing repeated calls to FileExists for everything on sys.path.

It does limit Unreal Python modules to being stored within the root of a known Content/Python directory, however this limitation is in-line with all existing modules that ship with the Engine, and allows us to avoid the cost of recursively scanning for modules.

#rb Rex.Hill

#ROBOMERGE-SOURCE: CL 15594550 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15594583 by jamie dale in ue5-main branch]
2021-03-03 21:13:48 -04:00
Marc Audy
9753392e2b Merge UE5/RES CL# 15462083 to UE5/Main
This represents UE4/Main @ 15414221

[CL 15463811 by Marc Audy in ue5-main branch]
2021-02-18 18:13:28 -04:00