mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
plugins can now query the list of masters for a plugin
This commit is contained in:
@@ -725,6 +725,7 @@ BOOST_PYTHON_MODULE(mobase)
|
||||
.def("pluginList", bpy::pure_virtual(&IOrganizer::pluginList), bpy::return_value_policy<bpy::reference_existing_object>())
|
||||
.def("modList", bpy::pure_virtual(&IOrganizer::modList), bpy::return_value_policy<bpy::reference_existing_object>())
|
||||
.def("startApplication", bpy::pure_virtual(&IOrganizer::startApplication), bpy::return_value_policy<bpy::return_by_value>())
|
||||
.def("waitForApplication", bpy::pure_virtual(&IOrganizer::waitForApplication), bpy::return_value_policy<bpy::return_by_value>())
|
||||
.def("onAboutToRun", bpy::pure_virtual(&IOrganizer::onAboutToRun))
|
||||
.def("onModInstalled", bpy::pure_virtual(&IOrganizer::onModInstalled))
|
||||
.def("refreshModList", bpy::pure_virtual(&IOrganizer::refreshModList))
|
||||
@@ -804,6 +805,7 @@ BOOST_PYTHON_MODULE(mobase)
|
||||
.def("priority", bpy::pure_virtual(&MOBase::IPluginList::priority))
|
||||
.def("loadOrder", bpy::pure_virtual(&MOBase::IPluginList::loadOrder))
|
||||
.def("isMaster", bpy::pure_virtual(&MOBase::IPluginList::isMaster))
|
||||
.def("masters", bpy::pure_virtual(&MOBase::IPluginList::masters))
|
||||
.def("origin", bpy::pure_virtual(&MOBase::IPluginList::origin))
|
||||
.def("onRefreshed", bpy::pure_virtual(&MOBase::IPluginList::onRefreshed))
|
||||
.def("onPluginMoved", bpy::pure_virtual(&MOBase::IPluginList::onPluginMoved))
|
||||
|
||||
@@ -278,6 +278,7 @@ struct IPluginListWrapper: MOBase::IPluginList, boost::python::wrapper<MOBase::I
|
||||
virtual int priority(const QString &name) const { return this->get_override("priority")(name); }
|
||||
virtual int loadOrder(const QString &name) const { return this->get_override("loadOrder")(name); }
|
||||
virtual bool isMaster(const QString &name) const { return this->get_override("isMaster")(name); }
|
||||
virtual QStringList masters(const QString &name) const { return this->get_override("masters")(name); }
|
||||
virtual QString origin(const QString &name) const { return this->get_override("origin")(name); }
|
||||
virtual bool onRefreshed(const std::function<void ()> &callback) { return this->get_override("onRefreshed")(callback); }
|
||||
virtual bool onPluginMoved(const std::function<void (const QString &, int, int)> &callback) { return this->get_override("onPluginMoved")(callback); }
|
||||
|
||||
Reference in New Issue
Block a user