Skip to content

Commit 1fe6ab7

Browse files
author
Roberto De Ioris
committed
fixed non-editor build
1 parent 025fd77 commit 1fe6ab7

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,9 @@ static PyMethodDef ue_PyUObject_methods[] = {
764764
{ "render_target_get_data", (PyCFunction)py_ue_render_target_get_data, METH_VARARGS, "" },
765765
{ "texture_update_resource", (PyCFunction)py_ue_texture_update_resource, METH_VARARGS, "" },
766766

767+
#if WITH_EDITOR
767768
{ "texture_get_source_data", (PyCFunction)py_ue_texture_get_source_data, METH_VARARGS, "" },
769+
#endif
768770

769771
// Sequencer
770772
{ "sequencer_master_tracks", (PyCFunction)py_ue_sequencer_master_tracks, METH_VARARGS, "" },

Source/UnrealEnginePython/Private/UObject/UEPyTexture.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ PyObject *py_ue_texture_get_data(ue_PyUObject *self, PyObject * args) {
6060
return bytes;
6161
}
6262

63+
#if WITH_EDITOR
6364
PyObject *py_ue_texture_get_source_data(ue_PyUObject *self, PyObject * args) {
6465

6566
ue_py_check(self);
@@ -84,6 +85,7 @@ PyObject *py_ue_texture_get_source_data(ue_PyUObject *self, PyObject * args) {
8485
tex->Source.UnlockMip(mipmap);
8586
return bytes;
8687
}
88+
#endif
8789

8890
PyObject *py_ue_render_target_get_data(ue_PyUObject *self, PyObject * args) {
8991

Source/UnrealEnginePython/Private/UObject/UEPyTexture.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ PyObject *py_ue_texture_update_resource(ue_PyUObject *, PyObject *);
2121

2222
#if WITH_EDITOR
2323
PyObject *py_unreal_engine_create_texture(PyObject * self, PyObject *);
24+
PyObject *py_ue_texture_get_source_data(ue_PyUObject *, PyObject *);
2425
#endif
25-
26-
PyObject *py_ue_texture_get_source_data(ue_PyUObject *, PyObject *);

0 commit comments

Comments
 (0)