From 5b06bb75a98913f78d0bf04fe480b3f4faf9de29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sun, 20 Sep 2020 21:30:01 +0200 Subject: [PATCH] Add pluginSetting[s]() and setPluginSetting() to IModInterface. --- src/runner/pythonrunner.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 26a8c85..834cb9d 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -111,6 +111,7 @@ BOOST_PYTHON_MODULE(mobase) utils::register_associative_container>(); // Required for QVariant since this is QVariantMap. utils::register_associative_container>(); utils::register_associative_container>(); + utils::register_associative_container>(); utils::register_associative_container(); @@ -552,6 +553,10 @@ BOOST_PYTHON_MODULE(mobase) .def("setGameName", &IModInterface::setGameName, bpy::arg("name")) .def("setName", &IModInterface::setName, bpy::arg("name")) .def("remove", &IModInterface::remove) + .def("pluginSetting", &IModInterface::pluginSetting, (bpy::arg("plugin_name"), "key", bpy::arg("default") = QVariant())) + .def("pluginSettings", &IModInterface::pluginSettings, bpy::arg("plugin_name")) + .def("setPluginSetting", &IModInterface::setPluginSetting, (bpy::arg("plugin_name"), "key", bpy::arg("value"))) + ; bpy::enum_("GuessQuality")