Skip to content

Commit fa47c36

Browse files
author
Roberto De Ioris
committed
fixes for 4.13
1 parent 85985da commit fa47c36

9 files changed

Lines changed: 26 additions & 8 deletions

File tree

‎Source/UnrealEnginePython/Private/Slate/UEPySFilePathPicker.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#if WITH_EDITOR
2+
#if ENGINE_MINOR_VERSION > 13
23
#include "UnrealEnginePythonPrivatePCH.h"
34

45
#include "UEPySFilePathPicker.h"
@@ -72,3 +73,4 @@ void ue_python_init_sfile_path_picker(PyObject *ue_module) {
7273
PyModule_AddObject(ue_module, "SFilePathPicker", (PyObject *)&ue_PySFilePathPickerType);
7374
}
7475
#endif
76+
#endif

‎Source/UnrealEnginePython/Private/Slate/UEPySFilePathPicker.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include "UEPySCompoundWidget.h"
77

8+
#if ENGINE_MINOR_VERSION > 13
89
#include "Developer/DesktopWidgets/Public/Widgets/Input/SFilePathPicker.h"
910

1011
extern PyTypeObject ue_PySFilePathPickerType;
@@ -15,3 +16,4 @@ typedef struct {
1516
} ue_PySFilePathPicker;
1617

1718
void ue_python_init_sfile_path_picker(PyObject *);
19+
#endif

‎Source/UnrealEnginePython/Private/Slate/UEPySPythonComboBox.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ static int ue_py_spython_combo_box_init(ue_PySPythonComboBox *self, PyObject *ar
122122

123123
ue_py_slate_farguments_optional_struct_ptr("button_style", ButtonStyle, FButtonStyle);
124124
ue_py_slate_farguments_struct("content_padding", ContentPadding, FMargin);
125+
#if ENGINE_MINOR_VERSION > 13
125126
ue_py_slate_farguments_optional_bool("enable_gamepad_navigation_mode", EnableGamepadNavigationMode);
127+
#endif
126128
ue_py_slate_farguments_struct("foreground_color", ForegroundColor, FSlateColor);
127129
ue_py_slate_farguments_optional_bool("has_down_arrow", HasDownArrow);
128130
ue_py_slate_farguments_optional_struct_ptr("item_style", ItemStyle, FTableRowStyle);

‎Source/UnrealEnginePython/Private/Slate/UEPySlate.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,10 @@ void ue_python_init_slate(PyObject *module) {
590590
ue_python_init_sgraph_editor(module);
591591
#if ENGINE_MINOR_VERSION > 14
592592
ue_python_init_spython_shelf(module);
593-
#endif
593+
#if ENGINE_MINOR_VERSION > 13
594594
ue_python_init_sfile_path_picker(module);
595+
#endif
596+
#endif
595597
#endif
596598

597599
ue_python_init_ftab_spawner_entry(module);

‎Source/UnrealEnginePython/Private/UEPyModule.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,9 @@ void unreal_engine_init_py_module() {
12641264
ue_python_init_farfilter(new_unreal_engine_module);
12651265
ue_python_init_fassetdata(new_unreal_engine_module);
12661266
ue_python_init_edgraphpin(new_unreal_engine_module);
1267+
#if ENGINE_MINOR_VERSION > 13
12671268
ue_python_init_fraw_mesh(new_unreal_engine_module);
1269+
#endif
12681270
ue_python_init_iplugin(new_unreal_engine_module);
12691271
#endif
12701272

‎Source/UnrealEnginePython/Private/UEPyStaticMesh.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ PyObject *py_ue_static_mesh_build(ue_PyUObject *self, PyObject * args) {
1010
if (!mesh)
1111
return PyErr_Format(PyExc_Exception, "uobject is not a UStaticMesh");
1212

13+
#if ENGINE_MINOR_VERSION > 13
1314
mesh->ImportVersion = EImportStaticMeshVersion::LastVersion;
15+
#endif
1416
mesh->Build();
1517

1618
Py_RETURN_NONE;

‎Source/UnrealEnginePython/Private/UnrealEnginePython.cpp‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void FUnrealEnginePythonModule::StartupModule()
149149
}
150150

151151
if (GConfig->GetString(UTF8_TO_TCHAR("Python"), UTF8_TO_TCHAR("RelativeHome"), IniValue, GEngineIni)) {
152-
IniValue = FPaths::Combine(FPaths::GameContentDir(), IniValue);
152+
IniValue = FPaths::Combine(*FPaths::GameContentDir(), *IniValue);
153153
#if PY_MAJOR_VERSION >= 3
154154
wchar_t *home = (wchar_t *)*IniValue;
155155
#else
@@ -168,7 +168,7 @@ void FUnrealEnginePythonModule::StartupModule()
168168
}
169169

170170
if (GConfig->GetString(UTF8_TO_TCHAR("Python"), UTF8_TO_TCHAR("RelativeProgramName"), IniValue, GEngineIni)) {
171-
IniValue = FPaths::Combine(FPaths::GameContentDir(), IniValue);
171+
IniValue = FPaths::Combine(*FPaths::GameContentDir(), *IniValue);
172172
#if PY_MAJOR_VERSION >= 3
173173
wchar_t *program_name = (wchar_t *)*IniValue;
174174
#else
@@ -182,23 +182,23 @@ void FUnrealEnginePythonModule::StartupModule()
182182
}
183183

184184
if (GConfig->GetString(UTF8_TO_TCHAR("Python"), UTF8_TO_TCHAR("RelativeScriptsPath"), IniValue, GEngineIni)) {
185-
ScriptsPath = FPaths::Combine(FPaths::GameContentDir(), IniValue);
185+
ScriptsPath = FPaths::Combine(*FPaths::GameContentDir(), *IniValue);
186186
}
187187

188188
if (GConfig->GetString(UTF8_TO_TCHAR("Python"), UTF8_TO_TCHAR("AdditionalModulesPath"), IniValue, GEngineIni)) {
189189
AdditionalModulesPath = IniValue;
190190
}
191191

192192
if (GConfig->GetString(UTF8_TO_TCHAR("Python"), UTF8_TO_TCHAR("RelativeAdditionalModulesPath"), IniValue, GEngineIni)) {
193-
AdditionalModulesPath = FPaths::Combine(FPaths::GameContentDir(), IniValue);
193+
AdditionalModulesPath = FPaths::Combine(*FPaths::GameContentDir(), *IniValue);
194194
}
195195

196196
if (GConfig->GetString(UTF8_TO_TCHAR("Python"), UTF8_TO_TCHAR("ZipPath"), IniValue, GEngineIni)) {
197197
ZipPath = IniValue;
198198
}
199199

200200
if (GConfig->GetString(UTF8_TO_TCHAR("Python"), UTF8_TO_TCHAR("RelativeZipPath"), IniValue, GEngineIni)) {
201-
ZipPath = FPaths::Combine(FPaths::GameContentDir(), IniValue);
201+
ZipPath = FPaths::Combine(*FPaths::GameContentDir(), *IniValue);
202202
}
203203

204204
if (ScriptsPath.IsEmpty()) {
@@ -308,7 +308,7 @@ void FUnrealEnginePythonModule::RunFile(char *filename) {
308308
char *full_path = filename;
309309
if (!FPaths::FileExists(filename))
310310
{
311-
full_path = TCHAR_TO_UTF8(*FPaths::Combine(ScriptsPath, UTF8_TO_TCHAR(filename)));
311+
full_path = TCHAR_TO_UTF8(*FPaths::Combine(*ScriptsPath, UTF8_TO_TCHAR(filename)));
312312
}
313313
#if PY_MAJOR_VERSION >= 3
314314
FILE *fd = nullptr;
@@ -351,7 +351,7 @@ void FUnrealEnginePythonModule::RunFileSandboxed(char *filename, void (*callback
351351
char *full_path = filename;
352352
if (!FPaths::FileExists(filename))
353353
{
354-
full_path = TCHAR_TO_UTF8(*FPaths::Combine(ScriptsPath, UTF8_TO_TCHAR(filename)));
354+
full_path = TCHAR_TO_UTF8(*FPaths::Combine(*ScriptsPath, UTF8_TO_TCHAR(filename)));
355355
}
356356

357357
PyThreadState *_main = PyThreadState_Get();

‎Source/UnrealEnginePython/Private/Wrappers/UEPyFRawMesh.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#if WITH_EDITOR
44

5+
#if ENGINE_MINOR_VERSION > 13
6+
57
static PyObject *py_ue_fraw_mesh_set_vertex_positions(ue_PyFRawMesh *self, PyObject * args) {
68
PyObject *data;
79
if (!PyArg_ParseTuple(args, "O:set_vertex_positions", &data)) {
@@ -456,3 +458,4 @@ void ue_python_init_fraw_mesh(PyObject *ue_module) {
456458
}
457459

458460
#endif
461+
#endif

‎Source/UnrealEnginePython/Private/Wrappers/UEPyFRawMesh.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
#if WITH_EDITOR
55

6+
#if ENGINE_MINOR_VERSION > 13
7+
68
#include "Developer/RawMesh/Public/RawMesh.h"
79

810
struct ue_PyFRawMesh {
@@ -15,3 +17,4 @@ struct ue_PyFRawMesh {
1517
void ue_python_init_fraw_mesh(PyObject *);
1618

1719
#endif
20+
#endif

0 commit comments

Comments
 (0)