Skip to content

Commit 062003e

Browse files
author
Roberto De Ioris
committed
fixed a stackoverflow
1 parent d981496 commit 062003e

File tree

5 files changed

+5
-29
lines changed

5 files changed

+5
-29
lines changed

Source/UnrealEnginePython/Private/Slate/UEPyFTabSpawnerEntry.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ static PyTypeObject ue_PyFTabSpawnerEntryType = {
5757
0, /* tp_iter */
5858
0, /* tp_iternext */
5959
ue_PyFTabSpawnerEntry_methods, /* tp_methods */
60-
0,
61-
0,
6260
};
6361

6462

Source/UnrealEnginePython/Private/Slate/UEPySDockTab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static int ue_py_sdock_tab_init(ue_PySDockTab *self, PyObject *args, PyObject *k
7373
void ue_python_init_sdock_tab(PyObject *ue_module) {
7474
ue_PySDockTabType.tp_new = PyType_GenericNew;
7575

76-
ue_PySButtonType.tp_init = (initproc)ue_py_sdock_tab_init;
76+
ue_PySDockTabType.tp_init = (initproc)ue_py_sdock_tab_init;
7777

7878
ue_PySDockTabType.tp_base = &ue_PySDockTabType;
7979

Source/UnrealEnginePython/Private/Slate/UEPySlate.cpp

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void ue_python_init_slate(PyObject *module) {
112112
ue_python_init_seditor_viewport(module);
113113
ue_python_init_spython_editor_viewport(module);
114114
ue_python_init_simage(module);
115-
ue_python_init_sdock_tab(module);
115+
//ue_python_init_sdock_tab(module);
116116

117117
ue_python_init_ftab_spawner_entry(module);
118118
}
@@ -224,31 +224,6 @@ PyObject *py_unreal_engine_add_menu_extension(PyObject * self, PyObject * args)
224224

225225
PyObject *py_unreal_engine_register_nomad_tab_spawner(PyObject * self, PyObject * args) {
226226

227-
char *command_name;
228-
PyObject *py_callable;
229-
int interface_type = EUserInterfaceActionType::Button;
230-
231-
char *menu_bar = nullptr;
232-
233-
if (!PyArg_ParseTuple(args, "sO|s:add_menu_extension", &command_name, &py_callable, &menu_bar)) {
234-
return NULL;
235-
}
236-
237-
UE_LOG(LogPython, Warning, TEXT("STARTIIIING !!!"));
238-
239-
if (!PyCallable_Check(py_callable))
240-
return PyErr_Format(PyExc_Exception, "argument is not callable");
241-
242-
243-
244-
TSharedRef<FPythonSlateCommands> commands = MakeShareable(new FPythonSlateCommands());
245-
246-
commands->Setup(command_name, py_callable);
247-
248-
commands->RegisterCommands();
249-
250-
UE_LOG(LogPython, Warning, TEXT("EXTENSION ADDED"));
251-
252227
Py_INCREF(Py_None);
253228
return Py_None;
254229
}

Source/UnrealEnginePython/Private/Slate/UEPySlate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
PyObject *py_unreal_engine_get_editor_window(PyObject *, PyObject *);
3737
PyObject *py_unreal_engine_add_menu_extension(PyObject *, PyObject *);
38+
PyObject *py_unreal_engine_register_nomad_tab_spawner(PyObject *, PyObject *);
3839

3940
template<typename T> TSharedRef<T> ue_py_init_swidget(ue_PySWidget *py_swidget) {
4041
TSharedRef<T> new_swidget = TSharedRef<T>(SNew(T));

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ static PyMethodDef unreal_engine_methods[] = {
154154
// slate
155155
{ "get_editor_window", py_unreal_engine_get_editor_window, METH_VARARGS, "" },
156156
{ "add_menu_extension", py_unreal_engine_add_menu_extension, METH_VARARGS, "" },
157+
//{ "register_nomad_tab_spawner", py_unreal_engine_register_nomad_tab_spawner, METH_VARARGS, "" },
158+
157159

158160
{ "open_editor_for_asset", py_unreal_engine_open_editor_for_asset, METH_VARARGS, "" },
159161
{ "close_editor_for_asset", py_unreal_engine_close_editor_for_asset, METH_VARARGS, "" },

0 commit comments

Comments
 (0)