Skip to content

TrueEmbedPython #539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 278 commits into
base: struct_passed_by_ref
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
36deafd
fixed 4.16
Jul 22, 2018
700b3fb
fixed non editor build
Jul 22, 2018
4704b30
fixed set_timer()
Jul 23, 2018
a66b1df
fixed linux build
Jul 23, 2018
ec95756
fixed clang linux build
Jul 23, 2018
13edaa6
include 4.20 in automatic builds
Jul 23, 2018
9150d25
Update MemoryManagement.md
Jul 23, 2018
f7aaa2f
Update README.md
Jul 23, 2018
abf3898
ref() is no more required
Jul 23, 2018
7f47ade
ref() is no more required [2]
Jul 23, 2018
b696c37
Create Android.md
Jul 23, 2018
70d91b7
added android packaging screenshot
Jul 23, 2018
b68481d
Update Android.md
Jul 23, 2018
ed333c5
Update Android.md
Jul 23, 2018
da94a9d
Update Android.md
Jul 23, 2018
7a2e8ff
Update Android.md
Jul 23, 2018
9cf656d
Update Android.md
Jul 23, 2018
4d679e1
Update README.md
Jul 23, 2018
50fa29a
Update AsyncIOAndUnrealEngine.md
Jul 24, 2018
4223550
improved GameViewportClient api
Jul 26, 2018
d266724
improved node pin management
Jul 26, 2018
37cb454
more explicit headers
Jul 26, 2018
233be5b
added set_material for StaticMesh
Jul 26, 2018
c4d1cb5
improved post_edit_change_property()
Jul 26, 2018
4507d6e
more 4.20 fixes
Jul 26, 2018
2921f8b
another round of explicit headers
Jul 26, 2018
353b2ee
fixed 4.19
Jul 27, 2018
0463b69
UObject's created from python are now managed by python itself
Jul 27, 2018
33f43d2
fixed 4.15
Jul 27, 2018
994bcb4
beter python2 support
Jul 27, 2018
2a01cf7
beter python2 support [2]
Jul 27, 2018
976833a
Update MemoryManagement.md
Jul 27, 2018
9c61c31
Update MemoryManagement.md
Jul 27, 2018
edabdb5
improved ue.new_object()
Jul 27, 2018
766ea83
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Jul 27, 2018
1eed91e
owning api
Jul 27, 2018
ca7398e
Update MemoryManagement.md
Jul 27, 2018
a466340
attempt to fix PyFbxFactory
Jul 31, 2018
9b8ef7e
added component_type_registry_invalidate_class()
Jul 31, 2018
dcd640f
added example for native components
Jul 31, 2018
1790a28
attempt to fake UnrealHeaderTool
Jul 31, 2018
7d3e346
fixed #491
Aug 1, 2018
020e87c
more robust factory_create_new()
Aug 2, 2018
8d79d8a
py_ue_sequencer_import_fbx_transform support 4.20
heylenz Aug 4, 2018
df79ee9
Merge pull request #493 from heylenz/master
Aug 4, 2018
d9b8583
improved blueprint creation
Aug 4, 2018
2fbf288
attempt to fix #490
Aug 5, 2018
ac46648
improved reference counting for delegates callback
Aug 5, 2018
45e3574
Merge pull request #365 from jiamingfeng/master
Aug 5, 2018
05ede36
minor fixes
Aug 5, 2018
2bb477b
fixed 4.15
Aug 5, 2018
e8efcdd
fixed 4.16
Aug 5, 2018
8c3a6c5
fixed 4.17
Aug 5, 2018
4223a15
fixed 4.18
Aug 5, 2018
b61ddc2
fixed factory_create_new()
Aug 7, 2018
aecb2d4
Update Audio_API.md
Aug 9, 2018
fa3f90a
Update Animation_API.md
Aug 9, 2018
513f8f4
Update uobject_API.md
Aug 9, 2018
948825c
improved python-owned object tracking
Aug 9, 2018
31e8dfd
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Aug 9, 2018
83d0ae9
fixed fbx import in 4.20
Aug 9, 2018
8308e44
added set_brutal_finalize()
Aug 10, 2018
261b0ad
fixed #502
Aug 12, 2018
25ab29b
more transform api functions
Aug 12, 2018
773cb18
fixed runtime builds
Aug 12, 2018
e95b615
mark saved objects as RF_Standalone
Aug 12, 2018
e6a7078
automatically set import bounds
Aug 12, 2018
3b8104d
pyactor add function "set_actor_hidden_in_game"
Aug 13, 2018
55c5c03
fixed 4.15
Aug 13, 2018
2adb8d7
fixed 4.16 build
Aug 13, 2018
6556d36
fixed 4.17 build
Aug 13, 2018
9aac61e
Update UnrealEnginePython.Build.cs
heylenz Aug 13, 2018
95b4136
Merge pull request #504 from heylenz/master
Aug 13, 2018
88c870f
fixed autodetection for PyFbxFactory #488
Aug 15, 2018
9cad9e7
fixed typo, check #507
Aug 17, 2018
bd21076
added get_inner(), get_key_prop() and get_value_prop()
Aug 28, 2018
2216cad
added folder api
Sep 3, 2018
8ca62b5
allow passing arguments to multicast delegates
Sep 5, 2018
b4d5c3e
added archetype management
Sep 6, 2018
ac3140f
Update README.md
Sep 6, 2018
473a253
ported to 4.15
Sep 6, 2018
004ed84
Update Slate_API.md
Sep 7, 2018
755070b
Update Slate_API.md
Sep 7, 2018
60b20ba
allow strings in slate for python2
Sep 7, 2018
3409d65
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
619b570
Update Slate_API.md
Sep 7, 2018
060e660
Update Slate_API.md
Sep 7, 2018
92296bb
more slate screenshots
Sep 7, 2018
fa974fc
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
dd86bca
Update Slate_API.md
Sep 7, 2018
8bfea17
Update Slate_API.md
Sep 7, 2018
3f6a97d
Update Slate_API.md
Sep 7, 2018
69fc327
Update Slate_API.md
Sep 7, 2018
4b85b05
Update Slate_API.md
Sep 7, 2018
af3e92d
Update Slate_API.md
Sep 7, 2018
a0e9a2d
slate docs screenshots
Sep 7, 2018
25dde60
Update Slate_API.md
Sep 7, 2018
bbcdfe1
Update Slate_API.md
Sep 7, 2018
b5e050d
Update Slate_API.md
Sep 7, 2018
2b87f3d
added padding screenshots
Sep 7, 2018
a165578
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
5928734
Update Slate_API.md
Sep 7, 2018
2d3551d
Update Slate_API.md
Sep 7, 2018
0c185de
Update Slate_API.md
Sep 7, 2018
be2692b
Update Slate_API.md
Sep 7, 2018
f260d37
Update Slate_API.md
Sep 7, 2018
ad3c049
fixed enums
Sep 7, 2018
45f3b46
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
9a736c7
Update Slate_API.md
Sep 7, 2018
6df887d
Update Slate_API.md
Sep 7, 2018
f8d0c7e
fixed grid panel
Sep 7, 2018
ed91672
Update Slate_API.md
Sep 7, 2018
b954318
fixed scrollbox
Sep 7, 2018
10458da
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
2ca6776
Update Slate_API.md
Sep 7, 2018
9913476
added bring_to_front() to SWindow
Sep 7, 2018
6ad63f9
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
b9ac90e
Update Slate_API.md
Sep 7, 2018
605d1ce
Update Slate_API.md
Sep 7, 2018
79fd7c5
Update Slate_API.md
Sep 7, 2018
b335fa2
SImage screenshot
Sep 7, 2018
cedc582
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
2d91906
Update Slate_API.md
Sep 7, 2018
286f3bf
Update Slate_API.md
Sep 7, 2018
05c8549
added slate assign() hack
Sep 7, 2018
a182918
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
cf93163
Update Slate_API.md
Sep 7, 2018
bb8e2f1
Update Slate_API.md
Sep 7, 2018
bbc68c0
Update Slate_API.md
Sep 7, 2018
a1472f8
checkbox screenshots
Sep 7, 2018
2250cc6
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
3dec5c9
Update Slate_API.md
Sep 7, 2018
aad046a
Update Slate_API.md
Sep 7, 2018
08ddf2b
added slate_SObjectPropertyEntryBox.png
Sep 7, 2018
7682644
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
f3795f5
Update Slate_API.md
Sep 7, 2018
e7fd914
Update Slate_API.md
Sep 7, 2018
d300599
Update Slate_API.md
Sep 7, 2018
862bcc2
added slate_SDetailView.png
Sep 7, 2018
7d9f4c5
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
2aac28d
Update Slate_API.md
Sep 7, 2018
9ea52f9
improved EditorViewportClient
Sep 7, 2018
1bee8f5
fixed typo
Sep 7, 2018
a91b626
Update Slate_API.md
Sep 7, 2018
bab1371
fixed SDockTab
Sep 7, 2018
04536e1
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 7, 2018
28d1bcc
nomad screenshot
Sep 7, 2018
a02e841
Update Slate_API.md
Sep 7, 2018
a7b8da5
Update Slate_API.md
Sep 7, 2018
6cb4600
Update Slate_API.md
Sep 7, 2018
bec3711
Update Slate_API.md
Sep 7, 2018
408b688
Update Slate_API.md
Sep 7, 2018
5a19bf8
added ImportModules options
Sep 7, 2018
4ffbce4
Update README.md
Sep 7, 2018
6a0ee99
Update README.md
Sep 7, 2018
f4333ab
Update README.md
Sep 8, 2018
96cbe14
Update Slate_API.md
Sep 12, 2018
14e31b4
Fix PythonFunction for 4.19
Sep 13, 2018
0d89377
Merge pull request #533 from estump/master
rdeioris Sep 13, 2018
5f17cc8
fixed FARFilter reference counting
Sep 17, 2018
6f6fa94
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
Sep 17, 2018
57987b2
added texture_has_alpha_channel
rdeioris Sep 25, 2018
4faf897
fixed #541
rdeioris Oct 2, 2018
6abf75b
fixed #542
rdeioris Oct 2, 2018
acdfc18
improved foliage api, #547
rdeioris Oct 4, 2018
6879ca9
ported to 4.21
rdeioris Oct 16, 2018
9690cb3
Update README.md
rdeioris Oct 20, 2018
acf57bb
fixed build for < 4.21
rdeioris Oct 20, 2018
7d5bf4c
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
rdeioris Oct 20, 2018
08d3638
added asset metadata tag api
rdeioris Oct 20, 2018
030f0f1
added level blueprint api
rdeioris Oct 20, 2018
a8d1778
added sequencer_set_view_range() and sequencer_set_working_range(), #…
rdeioris Oct 20, 2018
f1e9050
fixed 4.17 build
rdeioris Oct 20, 2018
b8d73dc
fixed 4.19 build
rdeioris Oct 20, 2018
b279548
fixed 4.21 build
rdeioris Oct 20, 2018
1043b33
added static_mesh_import_lod()
rdeioris Nov 6, 2018
2f72762
added support for FVector, FRotator, FLinearColor, FColor, FTransform…
dfb Nov 8, 2018
378fe7d
also support native structs as return types
dfb Nov 9, 2018
da04e62
fixed 4.21
rdeioris Nov 10, 2018
7611c52
fixed save_package() in 4.21
rdeioris Nov 17, 2018
ed1e6d8
added support for UEnums in function args and return values
dfb Nov 22, 2018
376e9c5
added support for structs and class objects in function params and re…
dfb Nov 25, 2018
debb296
Merge pull request #595 from dfb/more_func_params
rdeioris Nov 28, 2018
92bc156
Merge pull request #357 from stevenshan/master
rdeioris Nov 28, 2018
6544d27
fixed #612
rdeioris Nov 28, 2018
44f90bd
added submenu support, #603
rdeioris Nov 28, 2018
3eb78c5
added example for submenu
rdeioris Nov 28, 2018
c2901db
closed #575
rdeioris Nov 28, 2018
d5386c3
added get_asset_identifier_referencers()
rdeioris Nov 28, 2018
5031be3
added ue.get_long_package_asset_name()
rdeioris Nov 28, 2018
3afec1d
improved sequencer api
rdeioris Nov 28, 2018
240407b
fixed build for 4.15
rdeioris Nov 28, 2018
b0dc3e5
fixed 4.16
rdeioris Nov 28, 2018
c87bacf
fixed 4.17
rdeioris Nov 28, 2018
56a6f30
fixed 4.18
rdeioris Nov 28, 2018
de7f156
added FVector2D wrapper
dfb Dec 4, 2018
875191d
Fixed division bug in FVector
dfb Dec 4, 2018
85d9660
added get_static_mesh_bounds method
dfb Dec 5, 2018
e73b3f2
Merge pull request #620 from dfb/pr_get_static_mesh_bounds
rdeioris Dec 6, 2018
aac1c53
Merge branch 'master' into pr_fvector_division
dfb Dec 6, 2018
2492243
added support for FVector floor division
dfb Dec 6, 2018
c1e930b
Merge branch 'master' into pr_fvector2d
dfb Dec 6, 2018
b6d281e
added floor division support to FVector2D
dfb Dec 6, 2018
ae7fd91
Added TCHAR_TO_WCHAR to fix issue 602
slartibaartfast Dec 9, 2018
14deb53
Restore Windows stdio flags after Python initialisation.
samhocevar Dec 12, 2018
81b67e4
Merge pull request #624 from dontnod/fix-stdout-mangling
rdeioris Dec 12, 2018
7b89d52
Merge pull request #623 from slartibaartfast/iss602
rdeioris Dec 12, 2018
3be6b50
Merge pull request #619 from dfb/pr_fvector_division
rdeioris Dec 12, 2018
43970bb
Merge pull request #618 from dfb/pr_fvector2d
rdeioris Dec 12, 2018
ab0ac86
Use C++ conformant “_fileno” instead of “fileno”.
samhocevar Dec 12, 2018
078908e
Merge pull request #625 from dontnod/fix-stdout-mangling
rdeioris Dec 12, 2018
9e4f393
Add backwards compatibility macro for TCHAR_TO_WCHAR.
samhocevar Dec 13, 2018
38599ea
Adds version checking before calling TCHAR_TO_WCHAR
slartibaartfast Dec 13, 2018
d97cf72
Merge pull request #628 from slartibaartfast/iss602
rdeioris Dec 13, 2018
bfe470b
look for python in alternate custom location
dfb Dec 14, 2018
3462fab
Merge pull request #631 from dfb/pr_python_home_env
rdeioris Dec 23, 2018
c260fa4
Merge pull request #627 from dontnod/tchar-to-wchar
rdeioris Dec 23, 2018
fda6204
fixed typo
rdeioris Dec 28, 2018
b9fb929
Update README.md
rdeioris Jan 13, 2019
dc6e93c
added support for uobj.unbind_event
dfb Feb 19, 2019
8b60cca
Merge pull request #676 from dfb/pr_unbind_event
rdeioris Feb 19, 2019
30e7232
preliminary support for 4.22
rdeioris Mar 7, 2019
e2802a5
use FRichCurve instead of FInterpCurveFloat in Sequencer api
rdeioris Mar 7, 2019
020763a
Add break_all_links() and get_linked_to()
Devination Mar 12, 2019
8920a0d
Merge pull request #688 from Devination/patch-1
rdeioris Mar 12, 2019
1da9fbc
fixed 4.19 build
dfb Mar 13, 2019
8ed4abc
Split PythonHouseKeeper into .h and .cpp file for easier debugging
dfb Mar 14, 2019
83fea2d
Merge pull request #691 from dfb/master
rdeioris Mar 14, 2019
8de7445
Merge pull request #692 from dfb/pr_split_housekeeper
rdeioris Mar 14, 2019
79aef1e
fixed non editor build
rdeioris Apr 23, 2019
62016f5
fix for 4.22
rdeioris Apr 23, 2019
76ae4b1
Update README.md
rdeioris Apr 26, 2019
2b92282
added 4.22 to automatic build system
rdeioris May 8, 2019
282eaa5
start from 4.20 for automatic builds
rdeioris May 8, 2019
6a43ea4
.gitignore: Ignore Intermediate folder.
edowson Jun 4, 2019
02dd03d
PythonHouseKeeper: Fix compile error: #pragma once in main file
edowson Jun 4, 2019
e928f71
PythonAutomationModule: Update for UE4.22.
edowson Jun 4, 2019
b36a654
Merge pull request #732 from edowson/4.22
rdeioris Jun 6, 2019
bc4b791
Adding edgraph functions graph_reconstruct_node() and graph_remove_no…
Jun 14, 2019
32a02ef
Merge pull request #741 from flavatron/edgraph_add_func
rdeioris Jun 18, 2019
15f9eea
Add remove_component_from_blueprint
michaeltchapman Jun 29, 2019
12d56f0
Merge pull request #747 from michaeltchapman/remove_component
rdeioris Jun 30, 2019
7b33998
Update README.md
rdeioris Sep 9, 2019
11d550b
first round of 4.23 patches
rdeioris Sep 10, 2019
57def24
Merge branch 'master' of https://github.com/20tab/UnrealEnginePython
rdeioris Sep 10, 2019
038192d
completed porting to 4.23. fixes #777
rdeioris Sep 11, 2019
b0366cb
Add ; to the end of the Linux UnrealEnginePython.Build.cs pythonHome …
SIRHAMY Nov 27, 2019
fbc97f2
Merge pull request #811 from SIRHAMY/patch-1
rdeioris Nov 27, 2019
bb2f38d
Update README.md
rdeioris Mar 4, 2020
4b5da5b
Update README.md
gabbork Apr 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ ENV/
.ropeproject

Binaries/
Intermediate/
python35/
python27/
*.un~
75 changes: 44 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ Funny snippets for working with StaticMesh and SkeletalMesh assets: https://gith

More tutorials: https://github.com/20tab/UnrealEnginePython/tree/master/tutorials

# Project Status (IMPORTANT)

Currently (as april 2020) the project is on hold: between 2016 and 2018 20tab invested lot of resources in it but unfortunately epic (during 2018) decided to suddenly release its own implementation and the request made for a megagrant in 2019 by the original plugin author was rejected too.

As this plugin (still) has way more features than the Epic one and many contributors, **we are currently looking for new maintainers** helping us to keep it alive, checking PR and issues. If you are interested in working on it a few hours a week, drop us a line at info@20tab.com to discuss about it.

If you are interested in game logic scripting/modding in Unreal Engine 4 consider giving a look at the LuaMachine project (https://github.com/rdeioris/LuaMachine/).

The plugin should work up to unreal engine version 4.23 and there are forks/pull requests for 4.24. Since 4.25 Epic refactored the UProperty subsystem, so if you want to port the plugin to a version >= 4.25 you should make a lot of search & replace (basically renaming UProperty to FProperty and Cast to CastField should be enough)

# How and Why ?

This is a plugin embedding a whole Python VM (versions 3.x [the default and suggested one] and 2.7) In Unreal Engine 4 (both the editor and runtime).
Expand All @@ -30,11 +40,11 @@ Once the plugin is installed and enabled, you get access to the 'PythonConsole'

All of the exposed engine features are under the 'unreal_engine' virtual module (it is completely coded in c into the plugin, so do not expect to run 'import unreal_engine' from a standard python shell)

The currently supported Unreal Engine versions are 4.12, 4.13, 4.14, 4.15, 4.16, 4.17, 4.18 and 4.19
The minimal supported Unreal Engine version is 4.12, while the latest is 4.23

We support official python.org releases as well as IntelPython and Anaconda distributions.

Note: this plugin has nothing to do with the experimental 'PythonScriptPlugin' included in Unreal Engine >= 4.19. We aim at full integration with engine and editor (included the Slate api), as well as support for the vast majority of python features like asyncio, coroutines, generators, threads and third party modules.
Note: this plugin has nothing to do with the experimental 'PythonScriptPlugin' included in Unreal Engine >= 4.19. We aim at full integration with engine and editor (included the Slate api, check here: https://github.com/20tab/UnrealEnginePython/blob/master/docs/Slate_API.md), as well as support for the vast majority of python features like asyncio, coroutines, generators, threads and third party modules.

# Binary installation on Windows (64 bit)

Expand Down Expand Up @@ -165,9 +175,14 @@ Just remove the .so files in Plugins/UnrealEnginePython/Binaries/Linux and pull

At the next run the build procedure wil be started again.

Android Deployment
------------------

Check https://github.com/20tab/UnrealEnginePython/blob/master/docs/Android.md

# Installation on other platforms

Currently only Windows, MacOSX and Linux are supported. We are investigating Android support too via the kivy project.
Currently only Windows, MacOSX, Linux and Android are supported.

# Using Python with Unreal Engine (finally)

Expand Down Expand Up @@ -426,6 +441,27 @@ vec = self.uobject.GetActorLocation()

Reflection based functions are those in camelcase (or with the first capital letter). Native functions instead follow the python style, with lower case, underscore-as-separator function names.

Note that, in editor builds, when you change the property of an archetype (included ClassDefaultObject) via __setattr__ all of the archtype instances will be updated too.

To be more clear:

```python
your_blueprint.GeneratedClass.get_cdo().CharacterMovement.MaxWalkSpeed = 600.0
```

is a super shortcut for:

```python
your_blueprint.GeneratedClass.get_cdo().CharacterMovement.pre_edit_change('MaxWalkSpeed')
your_blueprint.GeneratedClass.get_cdo().CharacterMovement.set_property('MaxWalkSpeed', 600.0)
your_blueprint.GeneratedClass.get_cdo().CharacterMovement.post_edit_change_property('MaxWalkSpeed')
for instance in your_blueprint.GeneratedClass.get_cdo().CharacterMovement.get_archetype_instances():
instance.pre_edit_change('MaxWalkSpeed')
instance.set_property('MaxWalkSpeed', 600.0)
instance.post_edit_change_property('MaxWalkSpeed')
```


The automagic UClass, UStruct and UEnums mappers
------------------------------------------------

Expand Down Expand Up @@ -473,8 +509,6 @@ if is_hitting_something:
ue.log(hit_result)
```

Remember that structs are passed by value (not by ref like UObject's), so a dedicated unreal_engine.UScriptStruct python class is exposed.

To create a new struct instance you can do:

```python
Expand All @@ -495,29 +529,6 @@ To access the fields of a struct just call the fields() method.

A good example of struct usage is available here: https://github.com/20tab/UnrealEnginePython/blob/master/docs/Settings.md

As structs are passed by value, you need to pay attention when manipulating structs fields that are structs by themselves:

```python
from unreal_engine.structs import TerrificStruct, DumbStruct

ts = TerrificStruct()
ts.dumb = DumbStruct(Foo=17, Bar=22)

# will not modify the original DumbStruct but a copy of it !!!
ts.dumb.Foo = 22
```

You can eventually force structs to be passed by ref (extremely dangerous as the internal C pointer could be a dangling one) using the ref() function:

```python
from unreal_engine.structs import TerrificStruct, DumbStruct

ts = TerrificStruct()
ts.dumb = DumbStruct(Foo=17, Bar=22)

# ref() will return a pointer to a struct
ts.ref().dumb.foo().Foo = 22
```

More details here: https://github.com/20tab/UnrealEnginePython/blob/master/docs/MemoryManagement.md

Expand Down Expand Up @@ -685,6 +696,7 @@ The following parameters are supported:
* `RelativeAdditionalModulesPath`: like AdditionalModulesPath, but the path is relative to the /Content directory
* `ZipPath`: allow to specify a .zip file that is added to sys.path
* `RelativeZipPath`: like ZipPath, but the path is relative to the /Content directory
* `ImportModules: comma/space/semicolon separated list of modules to import on startup (after ue_site)

Example:

Expand Down Expand Up @@ -906,7 +918,7 @@ Sometimes you may have a UObject and know that it is backed by a python object.

This would be resolved as shown below:

```
```python
import unreal_engine as ue

class Explosive:
Expand Down Expand Up @@ -941,9 +953,9 @@ We try to do our best to "protect" the user, but you can effectively crash UE fr
Contacts and Commercial Support
-------------------------------

If you want to contact us (for help, support, sponsorship), drop a mail to info at 20tab.com or follow @unbit on twitter
If you need commercial support for UnrealEnginePython just drop a mail to info at 20tab.com

We offer commercial support for both UnrealEngine and UnrealEnginePython, again drop a mail to info at 20tab.com for more infos
Follow @unbit on twitter for news about the project

Special Thanks
--------------
Expand All @@ -954,3 +966,4 @@ Such a big project requires constant sponsorship, special thanks go to:

* GoodTH.INC https://www.goodthinc.com/ (they are sponsoring the sequencer api)

* Quixel AB https://megascans.se/ (built their integration tool over UnrealEnginePython giving us tons of useful feedbacks and ideas)
4 changes: 4 additions & 0 deletions Source/PythonAutomation/Public/PythonAutomationModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
#pragma once

#include "CoreMinimal.h"
#if ENGINE_MAJOR_VERSION==4 && ENGINE_MINOR_VERSION>=22
#include "Modules/ModuleInterface.h"
#else
#include "ModuleInterface.h"
#endif

class FPythonAutomationModule : public IModuleInterface
{
Expand Down
18 changes: 18 additions & 0 deletions Source/PythonConsole/Private/PyFbxFactory.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#include "PyFbxFactory.h"
#include "FbxMeshUtils.h"
#include "Runtime/Launch/Resources/Version.h"

UPyFbxFactory::UPyFbxFactory(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
Expand All @@ -23,6 +24,23 @@ void UPyFbxFactory::PostInitProperties() {
ImportUI->MeshTypeToImport = FBXIT_MAX;
}

UObject * UPyFbxFactory::FactoryCreateFile(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, const FString& Filename, const TCHAR* Parms, FFeedbackContext* Warn, bool& bOutOperationCanceled)
{
#if ENGINE_MINOR_VERSION >= 20
if (ImportUI->MeshTypeToImport == FBXIT_MAX)
{
if (!DetectImportType(UFactory::CurrentFilename))
{
return nullptr;
}
}
FbxMeshUtils::SetImportOption(ImportUI);
// ensure auto-detect is skipped
bDetectImportTypeOnImport = false;
#endif
return Super::FactoryCreateFile(InClass, InParent, InName, Flags, Filename, Parms, Warn, bOutOperationCanceled);
}

UObject *UPyFbxFactory::FactoryCreateBinary
(
UClass * InClass,
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonConsole/Private/PythonConsoleModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "SPythonConsole.h"
#include "SPythonLog.h"
#include "Editor/WorkspaceMenuStructure/Public/WorkspaceMenuStructureModule.h"
#include "SDockTab.h"
#include "Runtime/Slate/Public/Widgets/Docking/SDockTab.h"
#include "Editor/WorkspaceMenuStructure/Public/WorkspaceMenuStructure.h"

IMPLEMENT_MODULE( FPythonConsoleModule, PythonConsole );
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonConsole/Private/SPythonConsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#pragma once

#include "SlateCore.h"
#include "Runtime/SlateCore/Public/SlateCore.h"
#include "EditorStyle.h"
#include "PythonConsoleModule.h"

Expand Down
4 changes: 2 additions & 2 deletions Source/PythonConsole/Private/SPythonLog.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.

#include "SPythonLog.h"
#include "SScrollBorder.h"
#include "Runtime/Slate/Public/Widgets/Layout/SScrollBorder.h"
#include "GameFramework/GameMode.h"
#include "Engine/LocalPlayer.h"
#include "GameFramework/GameState.h"
#include "SSearchBox.h"
#include "Runtime/Slate/Public/Widgets/Input/SSearchBox.h"
#include "Runtime/Launch/Resources/Version.h"
#include "Runtime/Slate/Public/Framework/Text/SlateTextLayout.h"
#include "Editor/EditorStyle/Public/Classes/EditorStyleSettings.h"
Expand Down
6 changes: 3 additions & 3 deletions Source/PythonConsole/Private/SPythonLog.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.

#pragma once
#include "BaseTextLayoutMarshaller.h"
#include "TextFilterExpressionEvaluator.h"
#include "SlateCore.h"
#include "Runtime/Slate/Public/Framework/Text/BaseTextLayoutMarshaller.h"
#include "Runtime/Core/Public/Misc/TextFilterExpressionEvaluator.h"
#include "Runtime/SlateCore/Public/SlateCore.h"
#include "UnrealEnginePython.h"
#include "Runtime/Slate/Public/Widgets/Input/SMultiLineEditableTextBox.h"
#include "Runtime/Slate/Public/Widgets/Input/SEditableTextBox.h"
Expand Down
1 change: 1 addition & 0 deletions Source/PythonConsole/Public/PyFbxFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class UPyFbxFactory : public UFbxFactory

virtual bool ConfigureProperties() override;
virtual void PostInitProperties() override;
virtual UObject * FactoryCreateFile(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, const FString& Filename, const TCHAR* Parms, FFeedbackContext* Warn, bool& bOutOperationCanceled) override;
virtual UObject * FactoryCreateBinary
(
UClass * InClass,
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonConsole/Public/PythonConsoleModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#pragma once

#include "SlateBasics.h"
#include "Runtime/Slate/Public/SlateBasics.h"

/** Style of the debug console */
namespace EPythonConsoleStyle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include "Runtime/SlateCore/Public/Styling/SlateTypes.h"
#include "PythonSyntaxTokenizer.h"
#include "PlainTextLayoutMarshaller.h"
#include "ITextDecorator.h"
#include "Runtime/Slate/Public/Framework/Text/PlainTextLayoutMarshaller.h"
#include "Runtime/Slate/Public/Framework/Text/ITextDecorator.h"
#include "PythonEditorStyle.h"


Expand Down
4 changes: 2 additions & 2 deletions Source/PythonEditor/Private/PythonEditor.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.

#include "ModuleManager.h"
#include "Runtime/Core/Public/Modules/ModuleManager.h"
#include "AssetToolsModule.h"
#include "AssetEditorToolkit.h"
#include "Editor/UnrealEd/Public/Toolkits/AssetEditorToolkit.h"
#include "LevelEditor.h"
#include "PythonEditorStyle.h"
#include "PythonProjectEditor.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/PythonEditorStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#pragma once

#include "SlateStyle.h"
#include "Runtime/SlateCore/Public/Styling/SlateStyle.h"

class FPythonEditorStyle
{
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/PythonProjectEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "PythonProjectEditor.h"
#include "SPythonEditor.h"
#include "SPythonProjectEditor.h"
#include "SDockTab.h"
#include "Runtime/Slate/Public/Widgets/Docking/SDockTab.h"
#include "PythonProjectEditorToolbar.h"
#include "Editor/Kismet/Public/WorkflowOrientedApp/WorkflowUObjectDocuments.h"
#include "Editor/Kismet/Public/WorkflowOrientedApp/ApplicationMode.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/PythonProjectEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#pragma once

#include "WorkflowCentricApplication.h"
#include "Editor/Kismet/Public/WorkflowOrientedApp/WorkflowCentricApplication.h"
#include "Editor/Kismet/Public/WorkflowOrientedApp/WorkflowTabManager.h"
#include "Runtime/Launch/Resources/Version.h"

Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/PythonProjectEditorCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#pragma once

#include "Commands.h"
#include "Runtime/Slate/Public/Framework/Commands/Commands.h"

class FPythonProjectEditorCommands : public TCommands<FPythonProjectEditorCommands>
{
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/PythonSyntaxTokenizer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.

#include "PythonSyntaxTokenizer.h"
#include "BreakIterator.h"
#include "Runtime/Core/Public/Internationalization/BreakIterator.h"

TSharedRef< FPythonSyntaxTokenizer > FPythonSyntaxTokenizer::Create(TArray<FRule> InRules)
{
Expand Down
4 changes: 2 additions & 2 deletions Source/PythonEditor/Private/SProjectViewItem.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.

#include "SProjectViewItem.h"
#include "SInlineEditableTextBlock.h"
#include "BreakIterator.h"
#include "Runtime/Slate/Public/Widgets/Text/SInlineEditableTextBlock.h"
#include "Runtime/Core/Public/Internationalization/BreakIterator.h"
#include "PythonEditorStyle.h"

#define LOCTEXT_NAMESPACE "ProjectViewItem"
Expand Down
5 changes: 2 additions & 3 deletions Source/PythonEditor/Private/SPythonEditableText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ FReply SPythonEditableText::OnKeyChar(const FGeometry& MyGeometry, const FCharac
return Reply;
}
Reply = FReply::Handled();
// substitute tab, with 4 spaces
if (Character == TEXT('\t'))
{
FString String;
String.AppendChar(Character);
InsertTextAtCursor(String);
InsertTextAtCursor(FString(" "));
}
//else if (Character == TEXT('('))
//{
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/SPythonEditableText.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#pragma once

#include "SMultiLineEditableText.h"
#include "Runtime/Slate/Public/Widgets/Text/SMultiLineEditableText.h"

class SPythonEditableText : public SMultiLineEditableText
{
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/SPythonEditor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.

#include "SPythonEditor.h"
#include "SMultiLineEditableText.h"
#include "Runtime/Slate/Public/Widgets/Text/SMultiLineEditableText.h"
#include "PYRichTextSyntaxHighlighterTextLayoutMarshaller.h"
#include "SPythonEditableText.h"
#include "Runtime/Core/Public/Misc/FileHelper.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/SPythonProjectEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "SPythonProjectEditor.h"
#include "SProjectViewItem.h"
#include "DirectoryScanner.h"
#include "SThrobber.h"
#include "Runtime/Slate/Public/Widgets/Images/SThrobber.h"
#include "PythonEditorStyle.h"
#include "PythonProjectEditor.h"
#include "PythonProject.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/PythonEditor/Private/WhiteSpaceTextRun.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#pragma once

#include "SlateTextRun.h"
#include "Runtime/Slate/Public/Framework/Text/SlateTextRun.h"

class FWhiteSpaceTextRun : public FSlateTextRun
{
Expand Down
Loading