feat: group OpenFX plugins under dedicated "OpenFX" category with sub-groups
All OpenFX plugins were previously hardcoded to return kCategoryUnknown,
causing them to pile up under "Uncategorized" in the node creation menu.
This commit introduces a two-level grouping system for OFX plugins:
1. Add new kCategoryOpenFX top-level category
- Node::CategoryID enum extended with kCategoryOpenFX
- PluginNode::Category() now returns {kCategoryOpenFX}
- Node::GetCategoryName() returns "OpenFX"
2. Add secondary sub-grouping support
- Node base class gains virtual SubCategory() method
- PluginNode implements SubCategory() backed by sub_category_ member
- sub_category_ is set in the constructor from the plugin's OFX context:
Filter → "Filter"
Generator → "Generator"
Transition → "Transition"
others → "General"
3. Update NodeFactory::CreateMenu()
- When a node belongs to kCategoryOpenFX and provides a non-empty
SubCategory(), creates a second-level submenu under "OpenFX"
- Nodes without a sub-category are placed directly in the top menu
Expected menu layout:
OpenFX
├── Filter
│ ├── ColorCorrect
│ └── ...
├── Generator
├── Transition
└── General
All 4 test suites pass.
This commit is contained in:
@@ -38,6 +38,7 @@ public:
|
||||
QString Name() const override;
|
||||
QString id() const override;
|
||||
QVector<CategoryID> Category() const override;
|
||||
QString SubCategory() const override;
|
||||
QString Description() const override;
|
||||
|
||||
void AddPushButton();
|
||||
@@ -76,6 +77,9 @@ public:
|
||||
*/
|
||||
virtual void GenerateFrame(FramePtr frame, const GenerateJob &job) const;
|
||||
|
||||
private:
|
||||
QString sub_category_;
|
||||
|
||||
public slots:
|
||||
void pushButtonClicked(QString name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user