Add push button support for OFX plugins

This commit adds support for push buttons in OFX plugins by:

- Adding `kPushButton` to `NodeValue` enum
- Implementing `pushButtonClicked` slot in `PluginNode`
- Creating `NodeParamButton` widget for UI representation
- Updating `paraminstance.h` to handle push button instances
- Modifying `nodeparamviewwidgetbridge.cpp` to connect push button signals
This commit is contained in:
2025-11-10 13:57:04 +08:00
parent 8a7b6cf869
commit 5aaa49c515
10 changed files with 188 additions and 66 deletions
+11 -11
View File
@@ -53,20 +53,20 @@ olive::plugin::PluginNode::PluginNode(
} else if (ofxType == kOfxParamTypeStrChoice){
type = NodeValue::kStrCombo;
}else if (ofxType == kOfxParamTypeBytes
|| ofxType == kOfxParamTypeCustom) {
|| ofxType == kOfxParamTypeCustom) {
type = NodeValue::kBinary;
} else {
type = NodeValue::kNone;
}
if (ofxType == kOfxParamTypePushButton) {
// TODO
} else if (ofxType == kOfxParamTypePushButton) {
type = NodeValue::kPushButton;
} else if (ofxType == kOfxParamTypeGroup) {
// TODO
} else if (ofxType == kOfxParamTypePage) {
// TODO
}else {
type = NodeValue::kNone;
}
AddInput(param.second->getName().data(), type);
}
@@ -91,12 +91,12 @@ void olive::plugin::PluginNode::Value(const NodeValueRow &value,
{
TexturePtr tex = value[kTextureInput].toTexture();
if (tex) {
PluginJob job(,value);
PluginJob job(plugin, value);
table->Push(NodeValue::kTexture, tex->toJob(job), this);
}
}
void olive::plugin::PluginNode::pushButtonClicked(QString name)
{
}
QString olive::plugin::PluginNode::id() const
+4
View File
@@ -40,6 +40,7 @@ public:
void AddPushButton();
void AddPage();
Node *copy() const override;
/**
* @brief The main processing function
@@ -73,6 +74,9 @@ public:
*/
virtual void GenerateFrame(FramePtr frame, const GenerateJob &job) const;
public slots:
void pushButtonClicked(QString name);
};
}