@@ -141,7 +141,7 @@ PyObject *py_unreal_engine_import_asset(PyObject * self, PyObject * args) {
141141 }
142142 else {
143143 return PyErr_Format (PyExc_Exception, " uobject is not a Class" );
144- }
144+ }
145145 }
146146 else if (PyUnicodeOrString_Check (obj)) {
147147 char *class_name = PyUnicode_AsUTF8 (obj);
@@ -156,8 +156,8 @@ PyObject *py_unreal_engine_import_asset(PyObject * self, PyObject * args) {
156156 else {
157157 return PyErr_Format (PyExc_Exception, " invalid uobject" );
158158 }
159-
160-
159+
160+
161161 if (factory_class) {
162162 factory = NewObject<UFactory>(GetTransientPackage (), factory_class);
163163 if (!factory) {
@@ -179,7 +179,7 @@ PyObject *py_unreal_engine_import_asset(PyObject * self, PyObject * args) {
179179 Py_INCREF (ret);
180180 return (PyObject *)ret;
181181 }
182-
182+
183183
184184 Py_INCREF (Py_None);
185185 return Py_None;
@@ -593,7 +593,7 @@ PyObject *py_unreal_engine_add_component_to_blueprint(PyObject * self, PyObject
593593 return PyErr_Format (PyExc_Exception, " uobject is in invalid state" );
594594 Py_INCREF (ret);
595595 return (PyObject *)ret;
596-
596+
597597}
598598
599599PyObject *py_unreal_engine_blueprint_add_member_variable (PyObject * self, PyObject * args) {
@@ -659,5 +659,22 @@ PyObject *py_unreal_engine_blueprint_add_new_timeline(PyObject * self, PyObject
659659 return (PyObject *)ret;
660660}
661661
662+ PyObject *py_unreal_engine_editor_on_asset_post_import (PyObject * self, PyObject * args) {
663+ PyObject *py_callable;
664+ if (!PyArg_ParseTuple (args, " O:editor_on_asset_post_import" , &py_callable)) {
665+ return NULL ;
666+ }
667+
668+ if (!PyCallable_Check (py_callable))
669+ return PyErr_Format (PyExc_Exception, " object is not a callable" );
670+
671+ UPythonDelegate *py_delegate = NewObject<UPythonDelegate>();
672+ py_delegate->SetPyCallable (py_callable);
673+ py_delegate->AddToRoot ();
674+ FEditorDelegates::OnAssetPostImport.AddUObject (py_delegate, &UPythonDelegate::PyFOnAssetPostImport);
675+ Py_INCREF (Py_None);
676+ return Py_None;
677+ }
678+
662679#endif
663680
0 commit comments