33#include " UEPyFMenuBuilder.h"
44
55#include " Runtime/Slate/Public/Framework/Commands/UIAction.h"
6+ #if WITH_EDITOR
67#include " Developer/AssetTools/Public/AssetToolsModule.h"
78#include " Developer/AssetTools/Public/IAssetTools.h"
9+ #endif
810
911static PyObject *py_ue_fmenu_builder_begin_section (ue_PyFMenuBuilder *self, PyObject * args) {
1012 char *name;
@@ -79,6 +81,7 @@ static PyObject *py_ue_fmenu_builder_add_menu_separator(ue_PyFMenuBuilder *self,
7981 return Py_None;
8082}
8183
84+ #if WITH_EDITOR
8285static PyObject *py_ue_fmenu_builder_add_asset_actions (ue_PyFMenuBuilder *self, PyObject * args) {
8386 PyObject *py_assets;
8487
@@ -109,6 +112,7 @@ static PyObject *py_ue_fmenu_builder_add_asset_actions(ue_PyFMenuBuilder *self,
109112 Py_INCREF (Py_False);
110113 return Py_False;
111114}
115+ #endif
112116
113117static PyObject *py_ue_fmenu_builder_add_search_widget (ue_PyFMenuBuilder *self, PyObject * args) {
114118 self->menu_builder ->AddSearchWidget ();
@@ -124,7 +128,9 @@ static PyMethodDef ue_PyFMenuBuilder_methods[] = {
124128 { " add_menu_entry" , (PyCFunction)py_ue_fmenu_builder_add_menu_entry, METH_VARARGS , " " },
125129 { " add_menu_separator" , (PyCFunction)py_ue_fmenu_builder_add_menu_separator, METH_VARARGS , " " },
126130 { " add_search_widget" , (PyCFunction)py_ue_fmenu_builder_add_search_widget, METH_VARARGS , " " },
131+ #if WITH_EDITOR
127132 { " add_asset_actions" , (PyCFunction)py_ue_fmenu_builder_add_asset_actions, METH_VARARGS , " " },
133+ #endif
128134 { NULL } /* Sentinel */
129135};
130136
0 commit comments