Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document/Interface: added showNotification
  • Loading branch information
rodlie committed Sep 5, 2026
commit 38fb75432ca9fe39bf1f3c820d2ef6dd78f03874
9 changes: 7 additions & 2 deletions src/core/Private/document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,6 @@ void Document::loadCorePlugins()
if (pluginsDir.absolutePath().trimmed().isEmpty() ||
!pluginsDir.exists()) { return; }

mCorePlugins.clear();

const auto entryList = pluginsDir.entryList(QDir::Files);
for (const QString &fileName : entryList) {
QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
Expand Down Expand Up @@ -515,11 +513,18 @@ void Document::loadCorePlugins()
this, [plugin](PreviewState state) {
plugin->renderStateChanged(state);
});

connect(this, &Document::renderProgress,
this, [plugin](int frame, int total) {
plugin->renderProgress(frame, total);
});

connect(this, &Document::showNotification,
this, [plugin](const QString& title,
const QString& message) {
plugin->showNotification(title, message);
});

plugin->init();
} else {
loader.unload();
Expand Down
3 changes: 3 additions & 0 deletions src/core/Private/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ class CORE_EXPORT Document : public SingleWidgetTarget {

void renderStateChanged(PreviewState state);
void renderProgress(int frame, int total);

void showNotification(const QString& title,
const QString& message);
};

#endif // DOCUMENT_H
7 changes: 7 additions & 0 deletions src/core/coreplugininterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ class FrictionCorePluginInterface
Q_UNUSED(frame);
Q_UNUSED(total);
}

virtual void showNotification(const QString& title,
const QString& message)
{
Q_UNUSED(title);
Q_UNUSED(message);
}
};

#define FrictionCorePluginInterface_iid "graphics.friction.CorePluginInterface/1.0"
Expand Down
Loading