@@ -82,16 +82,16 @@ static PyMethodDef unreal_engine_methods[] = {
8282 { " get_selected_assets" , py_unreal_engine_get_selected_assets, METH_VARARGS, " " },
8383 { " get_assets_by_class" , py_unreal_engine_get_assets_by_class, METH_VARARGS, " " },
8484 { " create_blueprint" , py_unreal_engine_create_blueprint, METH_VARARGS, " " },
85+ { " message_dialog_open" , py_unreal_engine_message_dialog_open, METH_VARARGS, " " },
86+ { " set_fbx_import_option" , py_unreal_engine_set_fbx_import_option, METH_VARARGS, " " },
8587#endif
8688
8789 { " new_object" , py_unreal_engine_new_object, METH_VARARGS, " " },
8890
8991
9092 { " new_class" , py_unreal_engine_new_class, METH_VARARGS, " " },
9193
92- { " message_dialog_open" , py_unreal_engine_message_dialog_open, METH_VARARGS, " " },
9394
94- { " set_fbx_import_option" , py_unreal_engine_set_fbx_import_option, METH_VARARGS, " " },
9595
9696 { NULL , NULL },
9797};
@@ -285,7 +285,9 @@ static PyMethodDef ue_PyUObject_methods[] = {
285285
286286 // Sequencer
287287 { " sequencer_tracks" , (PyCFunction)py_ue_sequencer_tracks, METH_VARARGS, " " },
288+ #if WITH_EDITOR
288289 { " sequencer_folders" , (PyCFunction)py_ue_sequencer_folders, METH_VARARGS, " " },
290+ #endif
289291 { " sequencer_sections" , (PyCFunction)py_ue_sequencer_sections, METH_VARARGS, " " },
290292
291293 { " add_function" , (PyCFunction)py_ue_add_function, METH_VARARGS, " " },
@@ -1015,12 +1017,20 @@ static void py_ue_destroy_params(UFunction *u_function, uint8 *buffer) {
10151017PyObject *py_ue_ufunction_call (UFunction *u_function, UObject *u_obj, PyObject *args, int argn, PyObject *kwargs) {
10161018
10171019 uint8 *buffer = (uint8 *)FMemory_Alloca (u_function->ParmsSize );
1020+ FMemory::Memzero (buffer, u_function->ParmsSize );
10181021
10191022 // initialize args
10201023 TFieldIterator<UProperty> IArgs (u_function);
10211024 for (; IArgs && (IArgs->PropertyFlags & CPF_Parm); ++IArgs) {
10221025 UProperty *prop = *IArgs;
10231026 prop->InitializeValue_InContainer (buffer);
1027+ #if WITH_EDITOR
1028+ FString default_key = FString (" CPP_Default_" ) + prop->GetName ();
1029+ FString default_key_value = u_function->GetMetaData (FName (*default_key));
1030+ if (!default_key_value.IsEmpty ()) {
1031+ prop->ImportText (*default_key_value, prop->ContainerPtrToValuePtr <uint8>(buffer), PPF_Localized, NULL );
1032+ }
1033+ #endif
10241034 }
10251035
10261036 Py_ssize_t tuple_len = PyTuple_Size (args);
0 commit comments