Skip to content

Commit b156c65

Browse files
author
Roberto De Ioris
committed
added support for unreal 4.15
1 parent 2f4bf95 commit b156c65

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

Source/PythonConsole/Private/PythonConsoleModule.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "SPythonLog.h"
66
#include "Editor/WorkspaceMenuStructure/Public/WorkspaceMenuStructureModule.h"
77
#include "SDockTab.h"
8+
#include "Editor/WorkspaceMenuStructure/Public/WorkspaceMenuStructure.h"
89

910
IMPLEMENT_MODULE( FPythonConsoleModule, PythonLog );
1011

Source/UnrealEnginePython/Private/UEPyEditor.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#include "Editor/UnrealEd/Public/EditorLevelUtils.h"
1616
#include "Runtime/Projects/Public/Interfaces/IPluginManager.h"
1717
#include "ObjectTools.h"
18+
#include "Developer/AssetTools/Public/IAssetTools.h"
19+
#include "Editor/ContentBrowser/Public/IContentBrowserSingleton.h"
20+
#include "Runtime/Engine/Classes/EdGraph/EdGraphPin.h"
1821

1922

2023
PyObject *py_unreal_engine_get_editor_world(PyObject * self, PyObject * args) {
@@ -256,7 +259,7 @@ PyObject *py_unreal_engine_import_asset(PyObject * self, PyObject * args) {
256259
char * filename = PyString_AsString(PyObject_Str(assetsObject));
257260
#endif
258261
files.Add(UTF8_TO_TCHAR(filename));
259-
}
262+
}
260263
else {
261264
return PyErr_Format(PyExc_Exception, "Not a string nor valid list of string");
262265
}
@@ -964,8 +967,13 @@ PyObject *py_unreal_engine_blueprint_add_member_variable(PyObject * self, PyObje
964967
bool is_array = false;
965968
if (py_is_array && PyObject_IsTrue(py_is_array))
966969
is_array = true;
967-
970+
#if ENGINE_MINOR_VERSION > 14
971+
FEdGraphPinType pin;
972+
pin.PinCategory = UTF8_TO_TCHAR(in_type);
973+
pin.bIsArray = is_array;
974+
#else
968975
FEdGraphPinType pin(UTF8_TO_TCHAR(in_type), FString(""), nullptr, is_array, false);
976+
#endif
969977

970978
if (FBlueprintEditorUtils::AddMemberVariable(bp, UTF8_TO_TCHAR(name), pin)) {
971979
Py_INCREF(Py_True);

Source/UnrealEnginePython/Private/UEPyFARFilter.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
#if WITH_EDITOR
55

66
#include "AssetRegistryModule.h"
7+
#include "Runtime/AssetRegistry/Public/ARFilter.h"
78

89
typedef struct {
910
PyObject_HEAD
10-
/* Type-specific fields go here. */
11-
FARFilter filter;
11+
/* Type-specific fields go here. */
12+
FARFilter filter;
1213
PyObject *class_names;
1314
PyObject *object_paths;
1415
PyObject *package_names;

Source/UnrealEnginePython/UnrealEnginePython.Build.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ public UnrealEnginePython(TargetInfo Target)
104104
}
105105
System.Console.WriteLine("Using Python at: " + pythonHome);
106106
PublicIncludePaths.Add(pythonHome);
107-
PublicAdditionalLibraries.Add(GetWindowsPythonLibFile(pythonHome));
107+
string libPath = GetWindowsPythonLibFile(pythonHome);
108+
PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
109+
PublicAdditionalLibraries.Add(libPath);
108110
}
109111
else if (Target.Platform == UnrealTargetPlatform.Mac)
110112
{
@@ -118,7 +120,9 @@ public UnrealEnginePython(TargetInfo Target)
118120
}
119121
System.Console.WriteLine("Using Python at: " + pythonHome);
120122
PublicIncludePaths.Add(pythonHome);
121-
PublicDelayLoadDLLs.Add(GetMacPythonLibFile(pythonHome));
123+
string libPath = GetMacPythonLibFile(pythonHome);
124+
PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
125+
PublicDelayLoadDLLs.Add(libPath);
122126
Definitions.Add(string.Format("UNREAL_ENGINE_PYTHON_ON_MAC"));
123127
}
124128
else if (Target.Platform == UnrealTargetPlatform.Linux)

0 commit comments

Comments
 (0)