Skip to content

Commit 1260013

Browse files
author
Roberto De Ioris
committed
fixed non editor build
1 parent 75a66aa commit 1260013

File tree

6 files changed

+33
-5
lines changed

6 files changed

+33
-5
lines changed

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,14 +852,18 @@ static PyMethodDef ue_PyUObject_methods[] = {
852852
{ "skeleton_add_bone", (PyCFunction)py_ue_skeleton_add_bone, METH_VARARGS, "" },
853853
#endif
854854

855+
#if WITH_EDITOR
855856
#if ENGINE_MINOR_VERSION > 12
856857
{ "skeletal_mesh_set_soft_vertices", (PyCFunction)py_ue_skeletal_mesh_set_soft_vertices, METH_VARARGS, "" },
857858
{ "skeletal_mesh_get_soft_vertices", (PyCFunction)py_ue_skeletal_mesh_get_soft_vertices, METH_VARARGS, "" },
858859
#endif
859860
{ "skeletal_mesh_get_lod", (PyCFunction)py_ue_skeletal_mesh_get_lod, METH_VARARGS, "" },
861+
860862
{ "skeletal_mesh_get_raw_indices", (PyCFunction)py_ue_skeletal_mesh_get_raw_indices, METH_VARARGS, "" },
863+
#endif
861864
{ "skeletal_mesh_set_skeleton", (PyCFunction)py_ue_skeletal_mesh_set_skeleton, METH_VARARGS, "" },
862865

866+
#if WITH_EDITOR
863867
#if ENGINE_MINOR_VERSION > 12
864868
{ "skeletal_mesh_get_bone_map", (PyCFunction)py_ue_skeletal_mesh_get_bone_map, METH_VARARGS, "" },
865869
{ "skeletal_mesh_set_bone_map", (PyCFunction)py_ue_skeletal_mesh_set_bone_map, METH_VARARGS, "" },
@@ -870,17 +874,18 @@ static PyMethodDef ue_PyUObject_methods[] = {
870874
{ "skeletal_mesh_get_required_bones", (PyCFunction)py_ue_skeletal_mesh_get_required_bones, METH_VARARGS, "" },
871875
{ "skeletal_mesh_lods_num", (PyCFunction)py_ue_skeletal_mesh_lods_num, METH_VARARGS, "" },
872876
{ "skeletal_mesh_sections_num", (PyCFunction)py_ue_skeletal_mesh_sections_num, METH_VARARGS, "" },
873-
#if WITH_EDITOR
877+
874878
#pragma warning(suppress: 4191)
875879
{ "skeletal_mesh_build_lod", (PyCFunction)py_ue_skeletal_mesh_build_lod, METH_VARARGS | METH_KEYWORDS, "" },
876880
#endif
877881
{ "skeletal_mesh_register_morph_target", (PyCFunction)py_ue_skeletal_mesh_register_morph_target, METH_VARARGS, "" },
878882

883+
#if WITH_EDITOR
879884
{ "skeletal_mesh_to_import_vertex_map", (PyCFunction)py_ue_skeletal_mesh_to_import_vertex_map, METH_VARARGS, "" },
880885

881886
{ "morph_target_populate_deltas", (PyCFunction)py_ue_morph_target_populate_deltas, METH_VARARGS, "" },
882887
{ "morph_target_get_deltas", (PyCFunction)py_ue_morph_target_get_deltas, METH_VARARGS, "" },
883-
888+
#endif
884889
// Timer
885890
{ "set_timer", (PyCFunction)py_ue_set_timer, METH_VARARGS, "" },
886891

@@ -1432,7 +1437,9 @@ void unreal_engine_init_py_module()
14321437

14331438
ue_python_init_fraw_anim_sequence_track(new_unreal_engine_module);
14341439

1440+
#if WITH_EDITOR
14351441
ue_python_init_fsoft_skin_vertex(new_unreal_engine_module);
1442+
#endif
14361443

14371444
ue_python_init_fmorph_target_delta(new_unreal_engine_module);
14381445

Source/UnrealEnginePython/Private/UObject/UEPySkeletal.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ PyObject *py_ue_skeleton_add_bone(ue_PyUObject *self, PyObject * args)
197197
}
198198
#endif
199199

200+
#if WITH_EDITOR
201+
200202
#if ENGINE_MINOR_VERSION > 12
201203
PyObject *py_ue_skeletal_mesh_set_soft_vertices(ue_PyUObject *self, PyObject * args)
202204
{
@@ -276,6 +278,7 @@ PyObject *py_ue_skeletal_mesh_set_soft_vertices(ue_PyUObject *self, PyObject * a
276278
}
277279
#endif
278280

281+
279282
#if ENGINE_MINOR_VERSION > 12
280283
PyObject *py_ue_skeletal_mesh_get_soft_vertices(ue_PyUObject *self, PyObject * args)
281284
{
@@ -391,6 +394,7 @@ PyObject *py_ue_skeletal_mesh_get_lod(ue_PyUObject *self, PyObject * args)
391394
return py_list;
392395
}
393396

397+
394398
PyObject *py_ue_skeletal_mesh_get_raw_indices(ue_PyUObject *self, PyObject * args)
395399
{
396400

@@ -436,6 +440,7 @@ PyObject *py_ue_skeletal_mesh_get_raw_indices(ue_PyUObject *self, PyObject * arg
436440
return py_list;
437441
}
438442

443+
#endif
439444

440445
PyObject *py_ue_skeletal_mesh_set_skeleton(ue_PyUObject * self, PyObject * args)
441446
{
@@ -472,6 +477,7 @@ PyObject *py_ue_skeletal_mesh_set_skeleton(ue_PyUObject * self, PyObject * args)
472477
Py_RETURN_NONE;
473478
}
474479

480+
#if WITH_EDITOR
475481
#if ENGINE_MINOR_VERSION > 12
476482
PyObject *py_ue_skeletal_mesh_set_bone_map(ue_PyUObject *self, PyObject * args)
477483
{
@@ -808,7 +814,9 @@ PyObject *py_ue_skeletal_mesh_set_required_bones(ue_PyUObject *self, PyObject *
808814

809815
Py_RETURN_NONE;
810816
}
817+
#endif
811818

819+
#if WITH_EDITOR
812820
PyObject *py_ue_skeletal_mesh_lods_num(ue_PyUObject *self, PyObject * args)
813821
{
814822
ue_py_check(self);
@@ -850,7 +858,6 @@ PyObject *py_ue_skeletal_mesh_sections_num(ue_PyUObject *self, PyObject * args)
850858
return PyLong_FromLong(resource->LODModels[lod_index].Sections.Num());
851859
}
852860

853-
#if WITH_EDITOR
854861
PyObject *py_ue_skeletal_mesh_build_lod(ue_PyUObject *self, PyObject * args, PyObject * kwargs)
855862
{
856863
ue_py_check(self);
@@ -1086,6 +1093,7 @@ PyObject *py_ue_skeletal_mesh_register_morph_target(ue_PyUObject *self, PyObject
10861093
Py_RETURN_NONE;
10871094
}
10881095

1096+
#if WITH_EDITOR
10891097
PyObject *py_ue_morph_target_populate_deltas(ue_PyUObject *self, PyObject * args)
10901098
{
10911099
ue_py_check(self);
@@ -1210,3 +1218,4 @@ PyObject *py_ue_skeletal_mesh_to_import_vertex_map(ue_PyUObject *self, PyObject
12101218

12111219
return py_list;
12121220
}
1221+
#endif

Source/UnrealEnginePython/Private/UnrealEnginePythonPrivatePCH.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
#include "Wrappers/UEPyFRandomStream.h"
4848

4949
#include "Wrappers/UEPyFPythonOutputDevice.h"
50+
#if WITH_EDITOR
5051
#include "Wrappers/UEPyFSoftSkinVertex.h"
52+
#endif
5153
#include "Wrappers/UEPyFMorphTargetDelta.h"
5254
#include "Wrappers/UEPyFObjectThumbnail.h"
5355

Source/UnrealEnginePython/Private/Wrappers/UEPyFMorphTargetDelta.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static PyObject *ue_PyFMorphTargetDelta_str(ue_PyFMorphTargetDelta *self)
7373
static PyTypeObject ue_PyFMorphTargetDeltaType = {
7474
PyVarObject_HEAD_INIT(NULL, 0)
7575
"unreal_engine.FMorphTargetDelta", /* tp_name */
76-
sizeof(ue_PyFSoftSkinVertex), /* tp_basicsize */
76+
sizeof(ue_PyFMorphTargetDelta), /* tp_basicsize */
7777
0, /* tp_itemsize */
7878
0, /* tp_dealloc */
7979
0, /* tp_print */

Source/UnrealEnginePython/Private/Wrappers/UEPyFSoftSkinVertex.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include "UnrealEnginePythonPrivatePCH.h"
22

3+
#if WITH_EDITOR
4+
35
static PyObject *py_ue_fsoft_skin_vertex_get_color(ue_PyFSoftSkinVertex *self, void *closure)
46
{
57
return py_ue_new_fcolor(self->ss_vertex.Color);
@@ -361,4 +363,6 @@ PyObject *py_ue_new_fsoft_skin_vertex(FSoftSkinVertex ss_vertex)
361363
ue_PyFSoftSkinVertex *ret = (ue_PyFSoftSkinVertex *)PyObject_New(ue_PyFSoftSkinVertex, &ue_PyFSoftSkinVertexType);
362364
new(&ret->ss_vertex) FSoftSkinVertex(ss_vertex);
363365
return (PyObject *)ret;
364-
}
366+
}
367+
368+
#endif

Source/UnrealEnginePython/Private/Wrappers/UEPyFSoftSkinVertex.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22
#include "UnrealEnginePython.h"
33

4+
#if WITH_EDITOR
5+
46
#include "Runtime/Engine/Public/SkeletalMeshTypes.h"
57

68
#if ENGINE_MINOR_VERSION > 18
@@ -12,7 +14,9 @@
1214
struct ue_PyFSoftSkinVertex {
1315
PyObject_HEAD
1416
/* Type-specific fields go here. */
17+
1518
FSoftSkinVertex ss_vertex;
19+
1620
uint16 material_index;
1721
uint32 smoothing_group;
1822
};
@@ -22,3 +26,5 @@ void ue_python_init_fsoft_skin_vertex(PyObject *);
2226
PyObject *py_ue_new_fsoft_skin_vertex(FSoftSkinVertex);
2327

2428
ue_PyFSoftSkinVertex *py_ue_is_fsoft_skin_vertex(PyObject *);
29+
30+
#endif

0 commit comments

Comments
 (0)