diff --git a/src/runner/proxypluginwrappers.h b/src/runner/proxypluginwrappers.h index 989705b..974fa7a 100644 --- a/src/runner/proxypluginwrappers.h +++ b/src/runner/proxypluginwrappers.h @@ -26,8 +26,11 @@ virtual bool isActive() const override; \ virtual QList settings() const override; -class IPluginWrapper : public MOBase::IPlugin, public boost::python::wrapper +// Even though the base interface is not a QObject, this has to be because we have no way to pass Mod Organizer a plugin that implements multiple interfaces. +// QObject must be the first base class because moc assumes the first base class is a QObject +class IPluginWrapper : public QObject, public MOBase::IPlugin, public boost::python::wrapper { + Q_OBJECT Q_INTERFACES(MOBase::IPlugin) COMMON_I_PLUGIN_WRAPPER_DECLARATIONS diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index d529965..ac68828 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -1320,6 +1320,8 @@ QList PythonRunner::instantiate(const QString &pluginName) TRY_PLUGIN_TYPE(IPluginModPage, pluginObj); TRY_PLUGIN_TYPE(IPluginPreview, pluginObj); TRY_PLUGIN_TYPE(IPluginTool, pluginObj); + if (interfaceList.isEmpty()) + TRY_PLUGIN_TYPE(IPluginWrapper, pluginObj); return interfaceList; } catch (const bpy::error_already_set&) {