plugins can now query the list of masters for a plugin

This commit is contained in:
Tannin
2014-09-10 20:37:17 +02:00
parent 84fe2b0307
commit fa09fd7635
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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))
+1
View File
@@ -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); }