message: added IPlugin json read and write
diff: @@ -45,6 +45,49 @@ static PyObject *py_ue_iplugin_is_enabled(ue_PyIPlugin *self, PyObject * args) {
  return Py_False;
  }
  +static PyObject *py_ue_iplugin_write(ue_PyIPlugin *self, PyObject * args) {
  +
  + char *json;
  + PyObject *py_bool;
  + if (!PyArg_ParseTuple(args, "sO:write", &json, &py_bool)) {
  + return NULL;
  + }
  +
  + bool enabled_by_default = false;
  + if (PyObject_IsTrue(py_bool)) {
  + enabled_by_default = true;
  + }
  +
  + FPluginDescriptor descriptor = self->plugin->GetDescriptor();
  + FString text = FString(UTF8_TO_TCHAR(json));
  + descriptor.Write(text, enabled_by_default);
  +
  + Py_INCREF(Py_None);
  + return Py_None;
  +}
  +
  +static PyObject *py_ue_iplugin_read(ue_PyIPlugin *self, PyObject * args) {
  +
  + PyObject *py_bool;
  + if (!PyArg_ParseTuple(args, "O:read", &py_bool)) {
  + return NULL;
  + }
  +
  + bool enabled_by_default = false;
  + if (PyObject_IsTrue(py_bool)) {
  + enabled_by_default = true;
  + }
  +
  + FText error;
  + FString text;
  + FPluginDescriptor descriptor = self->plugin->GetDescriptor();
  + if (!descriptor.Read(text, enabled_by_default, error)) {
  + return PyErr_Format(PyExc_Exception, "unable to read json descriptor");
  + }
  +
  + return PyUnicode_FromString(TCHAR_TO_UTF8(*text));
  +}
  +
  static PyMethodDef ue_PyIPlugin_methods[] = {
  { "get_name", (PyCFunction)py_ue_iplugin_get_name, METH_VARARGS, "" },
  { "get_base_dir", (PyCFunction)py_ue_iplugin_get_base_dir, METH_VARARGS, "" },
  @@ -53,6 +96,8 @@ static PyMethodDef ue_PyIPlugin_methods[] = {
  { "get_mounted_asset_path", (PyCFunction)py_ue_iplugin_get_mounted_asset_path, METH_VARARGS, "" },
  { "can_contain_content", (PyCFunction)py_ue_iplugin_can_contain_content, METH_VARARGS, "" },
  { "is_enabled", (PyCFunction)py_ue_iplugin_is_enabled, METH_VARARGS, "" },
  + { "read", (PyCFunction)py_ue_iplugin_read, METH_VARARGS, "" },
  + { "write", (PyCFunction)py_ue_iplugin_write, METH_VARARGS, "" },
  { NULL } /* Sentinel */
  };
  