Commit Graph

192 Commits

Author SHA1 Message Date
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
jamie dale
18ce6ceb65 Fixed Python shutdown crash when Slate callbacks are bound
Slate can shutdown prior to the Python plugin, which means it can clear an array of delegates (which may contain captured Python objects) without taking the Python GIL. TPyAutoGILPtr has been added as a way to capture Python instances that will safely take the GIL during copy, move, or destruction operations.

#rb Patrick.Laflamme

#ROBOMERGE-SOURCE: CL 15366274 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15368939 by jamie dale in ue5-main branch]
2021-02-09 15:03:10 -04:00
Devin Doucette
1d2f2a5d1f Fixed string usage issues found by UE_NODISCARD
#rb trivial
#rnx

[CL 15161974 by Devin Doucette in ue5-main branch]
2021-01-21 23:53:05 -04:00
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -04:00
Jurre deBaare
afc4f39522 Ensure that blueprint actions are cleared for to-be reinstanced Python UClasses
#jira none
#rb Jamie.Dale

[CL 15084614 by Jurre deBaare in ue5-main branch]
2021-01-14 11:33:45 -04:00
Jamie Dale
b1aecb6f97 Merging PythonScriptPlugin from //UE5/Release-Engine-Staging to Main (//UE5/Main)
#jira
#rb Marc.Audy
#rnx

[CL 15045368 by Jamie Dale in ue5-main branch]
2021-01-11 20:04:00 -04:00
Jamie Dale
f03d91a660 Replaced UE4 references in the Python documentation
#jira UE-104754

[CL 15043073 by Jamie Dale in ue5-main branch]
2021-01-11 17:00:47 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Marc Audy
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00
brooke hubert
48113fc77e Adding EditorFramework to build.cs files
#rnx
#Jira UE-96448
#rb chris.gagnon

[CL 14114839 by brooke hubert in ue5-main branch]
2020-08-14 13:24:16 -04:00
Marc Audy
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
Louise Rasmussen
757493c558 Python Script Plugin File Menu Icons
#rb matt.kuhlenschmidt

[CL 13645295 by Louise Rasmussen in ue5-main branch]
2020-06-08 16:04:35 -04:00
Matt Kuhlenschmidt
9573ab2bf0 Status bar updates
- Hooked up console edit box
- Hooked up active tool messages to modes (the mode specific messages need a lot of improvement
- Added status bars to standalone asset editors

#rb louise.rasmussen

[CL 13264057 by Matt Kuhlenschmidt in ue5-main branch]
2020-05-11 09:39:04 -04:00
jamie dale
cd0cf26650 Fixed ExecutePythonScript reporting an error if the node had no outputs
The internal MakeArray node would default to adding 1 pin, even if the input array of pin names was empty

#jira UE-91948
[FYI] Joji.Tsuruga
#rb none

#ROBOMERGE-SOURCE: CL 12786873 in //UE4/Release-4.25/... via CL 12786876 via CL 12786885
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12786906 by jamie dale in Main branch]
2020-04-14 17:04:51 -04:00
jamie dale
56febe2132 Avoid a crash from decrementing a Python object ref-count outside of the GIL
We now keep the GIL locked for the duration that the PySelf pointer is being used

#jira
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 12786098 in //UE4/Release-4.25/... via CL 12786105 via CL 12786111
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12786839 by jamie dale in Main branch]
2020-04-14 17:01:43 -04:00
michael noland
35eea6d9e3 Python: Added an editor preferences section for Python which contains a way to enable Developer Mode locally without affecting other users
#rb jamie.dale


#ROBOMERGE-OWNER: michael.noland
#ROBOMERGE-AUTHOR: michael.noland
#ROBOMERGE-SOURCE: CL 12330683 via CL 12330685 via CL 12330756 via CL 12331679
#ROBOMERGE-BOT: (v670-12295787)

[CL 12331680 by michael noland in Main branch]
2020-03-19 23:21:33 -04:00
jamie dale
8818a60da4 Hide some internal Python types from the class picker
#jira UE-90946
#rb Dan.OConnor
#rnx

#ROBOMERGE-SOURCE: CL 12320749 in //UE4/Release-4.25/... via CL 12320881
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v670-12295787)

[CL 12320977 by jamie dale in Main branch]
2020-03-19 19:24:18 -04:00
jamie dale
8cdfd91841 Moved the raw Python container type checks lower-level so that they also trip when trying to make a nested container type
#jira
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 12253998 in //UE4/Release-4.25/... via CL 12254000
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v668-12245121)

[CL 12296571 by jamie dale in Main branch]
2020-03-19 10:59:13 -04:00
jamie dale
caef476ee3 Improved error message when attempting to create a container property in Python that nests another container
This isn't supported by the reflection system and is already disallowed, but the error message was confusing. It now gives an error message more like UHT, and suggests using a struct as an alternative to direct nesting.

#jira
#rb Lauren.Barnes

#ROBOMERGE-SOURCE: CL 12253865 in //UE4/Release-4.25/... via CL 12253868
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v668-12245121)

[CL 12296563 by jamie dale in Main branch]
2020-03-19 10:59:09 -04:00
jamie dale
a1dd31468e Improved error message when creating a Python property for a container type
It is a common mistake to omit the type(s) for the container elements, so this case will now present an error stating the reason and the correct fix.

#jira
#rb Lauren.Barnes

#ROBOMERGE-SOURCE: CL 12251952 in //UE4/Release-4.25/... via CL 12251955
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v668-12245121)

[CL 12251961 by jamie dale in Main branch]
2020-03-18 16:28:23 -04:00