Skip to content

Commit 8308e44

Browse files
author
Roberto De Ioris
committed
added set_brutal_finalize()
1 parent 83d0ae9 commit 8308e44

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Source/UnrealEnginePython/Private/UEPyModule.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,29 @@ static PyObject *py_unreal_engine_shutdown(PyObject *self, PyObject * args)
207207
Py_RETURN_NONE;
208208
}
209209

210+
static PyObject *py_unreal_engine_set_brutal_finalize(PyObject *self, PyObject * args)
211+
{
212+
213+
PyObject *py_bool = nullptr;
214+
if (!PyArg_ParseTuple(args, "|O:set_brutal_finalize", &py_bool))
215+
{
216+
return nullptr;
217+
}
218+
219+
bool bBrutalFinalize = !py_bool || PyObject_IsTrue(py_bool);
220+
221+
FUnrealEnginePythonModule &PythonModule = FModuleManager::GetModuleChecked<FUnrealEnginePythonModule>("UnrealEnginePython");
222+
PythonModule.BrutalFinalize = bBrutalFinalize;
223+
Py_RETURN_NONE;
224+
}
225+
210226
static PyMethodDef unreal_engine_methods[] = {
211227
{ "log", py_unreal_engine_log, METH_VARARGS, "" },
212228
{ "log_warning", py_unreal_engine_log_warning, METH_VARARGS, "" },
213229
{ "log_error", py_unreal_engine_log_error, METH_VARARGS, "" },
214230

215231
{ "shutdown", py_unreal_engine_shutdown, METH_VARARGS, "" },
232+
{ "set_brutal_finalize", py_unreal_engine_set_brutal_finalize, METH_VARARGS, "" },
216233

217234
{ "add_on_screen_debug_message", py_unreal_engine_add_on_screen_debug_message, METH_VARARGS, "" },
218235
{ "print_string", py_unreal_engine_print_string, METH_VARARGS, "" },

0 commit comments

Comments
 (0)