Skip to content

Commit

Permalink
fixed non-editor build
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto De Ioris committed Sep 4, 2017
1 parent 025fd77 commit 1fe6ab7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Source/UnrealEnginePython/Private/UEPyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,9 @@ static PyMethodDef ue_PyUObject_methods[] = {
{ "render_target_get_data", (PyCFunction)py_ue_render_target_get_data, METH_VARARGS, "" },
{ "texture_update_resource", (PyCFunction)py_ue_texture_update_resource, METH_VARARGS, "" },

#if WITH_EDITOR
{ "texture_get_source_data", (PyCFunction)py_ue_texture_get_source_data, METH_VARARGS, "" },
#endif

// Sequencer
{ "sequencer_master_tracks", (PyCFunction)py_ue_sequencer_master_tracks, METH_VARARGS, "" },
Expand Down
2 changes: 2 additions & 0 deletions Source/UnrealEnginePython/Private/UObject/UEPyTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ PyObject *py_ue_texture_get_data(ue_PyUObject *self, PyObject * args) {
return bytes;
}

#if WITH_EDITOR
PyObject *py_ue_texture_get_source_data(ue_PyUObject *self, PyObject * args) {

ue_py_check(self);
Expand All @@ -84,6 +85,7 @@ PyObject *py_ue_texture_get_source_data(ue_PyUObject *self, PyObject * args) {
tex->Source.UnlockMip(mipmap);
return bytes;
}
#endif

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

Expand Down
3 changes: 1 addition & 2 deletions Source/UnrealEnginePython/Private/UObject/UEPyTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ PyObject *py_ue_texture_update_resource(ue_PyUObject *, PyObject *);

#if WITH_EDITOR
PyObject *py_unreal_engine_create_texture(PyObject * self, PyObject *);
PyObject *py_ue_texture_get_source_data(ue_PyUObject *, PyObject *);
#endif

PyObject *py_ue_texture_get_source_data(ue_PyUObject *, PyObject *);

0 comments on commit 1fe6ab7

Please sign in to comment.