[core] Plugins: Introduction of NodePluginManager #2589
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TCSR-1193 | Part 1 - Introduction of a Plugin Management System
Node Plugin Manager
The NodePluginManager provides a way for registering and managing node plugins within Meshroom.
This also provides a way for other components to interact with the plugins to understand whether a plugin is available or not.
The Node Plugin Manager serves as an initial setup by removing a standard python dictionary "nodesDesc" and using a Singleton class dealing with Plugins.
The Registered Node Plugin is of the type NodeDescriptor.
The NodeDescriptor would later evolve into a Class holding the Module and its Modification times.
The Errors should also be stored in the NodeDescriptor along with its Version.
The changes here also replace the usage of standard conditions of dictionary to validate whether a plugin exists with the lingo of now checking "registered".
What's Next
The Next steps would be to update the plugin registering mechanism to also include the plugins which have an error on them.
Currently the plugins with issues/errors are discarded and not registered.
With the changes proposed here, the Error Nodes should also be allowed to be created in the NodeGraph, but will be of the form of CompatibilityNode, allowing the developer/user to visualise the Errors on the Node.
Tests