Skip to content

Commit dea7d9f

Browse files
author
rdeioris
authored
Merge pull request #80 from kuafu/master
Fix Python compiling issue with editor
2 parents e38cfa7 + 0f9fa99 commit dea7d9f

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Source/UnrealEnginePython/Private/UEPyObject.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ PyObject *py_ue_post_edit_change( ue_PyUObject *self, PyObject * args ) {
134134
if ( !self->ue_object ) {
135135
return PyErr_Format( PyExc_Exception, "uobject is not valid" );
136136
}
137-
137+
#if WITH_EDITOR
138138
self->ue_object->PostEditChange();
139-
139+
#endif
140140
Py_INCREF( Py_None );
141141
return Py_None;
142142
}

Source/UnrealEnginePython/Private/UEPyTexture.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ PyObject *py_ue_texture_set_data(ue_PyUObject *self, PyObject * args) {
5858
tex->PlatformData->Mips[mipmap].BulkData.Unlock();
5959

6060
tex->MarkPackageDirty();
61+
#if WITH_EDITOR
6162
tex->PostEditChange();
63+
tex->PostEditChange();
64+
#endif
6265

6366
// ensure compatibility between 4.12 and 4.14
6467
//tex->UpdateResourceW();

Source/UnrealEnginePython/UnrealEnginePython.Build.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ protected string PythonHome
1313
{
1414
get
1515
{
16-
return Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", pythonHome));
17-
}
18-
}
16+
return Path.GetFullPath(Path.Combine(ModuleDirectory, "../../../", pythonHome));
17+
}
18+
}
1919

2020
public UnrealEnginePython(TargetInfo Target)
2121
{
@@ -80,7 +80,7 @@ public UnrealEnginePython(TargetInfo Target)
8080

8181
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
8282
{
83-
System.Console.WriteLine("Using Python at: " + PythonHome);
83+
System.Console.WriteLine("-------->Using Python at: " + PythonHome);
8484
PublicIncludePaths.Add(PythonHome);
8585
PublicAdditionalLibraries.Add(Path.Combine(PythonHome, "libs", string.Format("{0}.lib", pythonHome)));
8686
}

0 commit comments

Comments
 (0)