Commit graph

4712 commits

Author SHA1 Message Date
Candice Bentéjac
91e753c114 [core] plugins: Handle corner cases when reloading nodes 2025-06-05 16:12:32 +02:00
Candice Bentéjac
a19c306cf3 [core] plugins: Remove register/unregisterPlugin methods
Remove the methods and perform the registration/unregistration directly
within the functions that called them. This simplifies the code and
prevents ambiguity between the different functions.
2025-06-05 14:40:14 +02:00
Candice Bentéjac
3c57afb4d0 [tests] Simplify registration/unregistration of nodes in tests
Add two methods that are local to tests, `registerNodeDesc` and
`unregisterNodeDesc`, which handle the registration and unregistration
of `NodePlugins` from a node description. This reduces the amount of
code in tests whenever `NodePlugin` need to be instantiated prior
to their registration and so on.
2025-06-05 14:40:14 +02:00
Candice Bentéjac
424abbff82 [core] plugins: Check NodePlugin's timestamp before reloading it
When calling the `reload()` method for `NodePlugins`, we now check that
the timestamp of the node's description file doesn't match with the
timestamp of that same file when the `NodePlugin` was created. If it
does match, then nothing happens during the `reload()`.
2025-06-05 14:40:14 +02:00
Candice Bentéjac
aa4d9ad92b [tests] Add initial set of unit tests for plugins
Tests cover loading/unloading plugins, registering/unregistering
node plugins, and reloading them.
2025-06-05 14:40:13 +02:00
Candice Bentéjac
5bc09c8847 [core] plugins: Add a method to reload a NodePlugin
Additionnally, add a new error status to distinguish an error during
the registration of the plugin (`LOADING_ERROR`) and an error when
the module itself is reloaded (through the `reload` function from
importlib).
2025-06-05 14:40:13 +02:00
Candice Bentéjac
3af5acfa91 Plugins: Use simplified load/register of plugins and nodes when possible 2025-06-05 14:40:12 +02:00
Candice Bentéjac
b3ee2ad329 [core] plugins: Add new methods to the manager to manipulate plugins 2025-06-05 14:40:12 +02:00
Candice Bentéjac
0adb3754f3 [core] Add PluginIssue compatibility issue 2025-06-05 14:40:11 +02:00
Candice Bentéjac
a8a54f67fb [core] plugins: Support finding unregistered nodes in plugins
A `NodePlugin` may be part of a `Plugin` even if it has not been
registered. `containsNode` allows to check whether a `NodePlugin` is
contained within a `Plugin`, and `belongsToPlugin`
2025-06-05 14:40:11 +02:00
Candice Bentéjac
98d90dae81 [core] plugins: Rename getNodePlugin... to getRegisteredNodePlugin...
This prevents ambiguities between `NodePlugin` objects that have been
registered (and are thus instantiable) and those that belong to `Plugin`
objects but have not been registered.
2025-06-05 14:40:11 +02:00
Candice Bentéjac
c16b56c7e3 Clean-up: PEP8 linting and quotes harmonization 2025-06-05 14:40:10 +02:00
Candice Bentéjac
777ed4207e [tests] Use the NodePluginManager instance in the unit tests
The plugin manager is now effectively used for all the operations that
involve registering or unregistering nodes.
2025-06-05 14:40:10 +02:00
Candice Bentéjac
28042dd2ad [tests] Harmonize and clean-up syntax across test files
Also comply more with PEP8 linting rules.
2025-06-05 14:40:09 +02:00
Candice Bentéjac
441ba37c24 [core] Remove un/registerNodeType methods
Nodes are now registered and unregistered through the `NodePluginManager`.
2025-06-05 14:40:09 +02:00
Candice Bentéjac
88bee35443 [core] Replace nodesDesc with the NodePluginManager instance 2025-06-05 14:40:08 +02:00
Candice Bentéjac
4a238b9637 [core] Load and register nodes using the NodePluginManager 2025-06-05 14:40:08 +02:00
Candice Bentéjac
15c38b6a8b [core] Instantiate a NodePluginManager in the core module 2025-06-05 14:40:07 +02:00
Candice Bentéjac
56eebe4caf [core] plugins: Add templates handling in the Plugin class
Templates that are available for a plugin are detected and gathered
upon the plugin's creation.
2025-06-05 14:40:07 +02:00
Candice Bentéjac
836a351cc9 [core] plugins: Add a NodePluginManager class
The `NodePluginManager` class manages is used to load, manage,
and register plugins and nodes.
2025-06-05 14:40:06 +02:00
Candice Bentéjac
63e01d43bf [core] plugins: Add working NodePlugin class to represent nodes 2025-06-05 14:40:06 +02:00
Candice Bentéjac
fa3cb8c4d6 [core] plugins: Move validateNodeDesc from __init__.py to plugins.py
The validation of the node descriptions will be handled directly within
the `NodePlugin` objects and there is thus no need for this method to
exist outside of plugins.py.
2025-06-05 14:40:06 +02:00
Candice Bentéjac
1531e11b83 [core] plugins: Add NodePluginStatus enum for NodePlugin objects 2025-06-05 14:40:05 +02:00
Candice Bentéjac
f6694022a3 [core] plugins: Add a Plugin class that contains a set of nodes
A `Plugin` object contains a collection of nodes, represented as
`NodePlugin` objects. This commit adds the implementation of the `Plugin`
class with the methods to add and remove `NodePlugins`, as well as an
empty class for the `NodePlugin` objects themselves.
2025-06-05 14:40:05 +02:00
Candice Bentéjac
6f69588f0b [core] Add typing on methods 2025-06-05 14:40:04 +02:00
Candice Bentéjac
b56420318d [core] Add ProcessEnv class in new plugins module
Add a new module named `plugins` with a `ProcessEnv` class which
contains the paths describing the environment needed for the plugin's
(node's) process.
2025-06-05 14:38:54 +02:00
Fabien Castan
99a6dc0671
Merge pull request #2739 from alicevision/fix/attribute-linkedIn-out-qml-warnings
[ui] [fix] Attribute: Fix the qml warnings on intrisincs
2025-06-05 14:33:32 +02:00
Fabien Castan
b43ab2c99e
Merge pull request #2736 from alicevision/fix/drop_3d_object_in_viewer3d_raise_warnings
[ui] [fix] MediaLibrary: Check if the model.source is actually an Attribute…
2025-06-05 14:30:10 +02:00
nicolas-lambert-tc
f0fba8d6bd [ui] MediaLibrary: Check if the model.source is actually an Attribute (it can also be a string) 2025-06-05 11:34:58 +02:00
nicolas-lambert-tc
b63b0f0d78 [ui] Attribute: Fix the qml warnings on intrisincs, by making linkedIn/outAttributes notifyable 2025-06-05 09:36:03 +02:00
Fabien Castan
d5007c632e
Merge pull request #2738 from alicevision/fix/updateNodeStatus
[ui] Update node status when modified
2025-06-05 09:29:15 +02:00
Fabien Castan
e559e60879
Merge pull request #2737 from alicevision/bugfix/execModeStatus
bugfix ExecMode status
2025-06-05 09:28:06 +02:00
Fabien Castan
2ece1fb4c5 [ui] Update node status when modified 2025-06-04 23:33:56 +02:00
Vincent Demoulin
77cb06f322 [Core]: ExecMode is not a dynamic value 2025-06-04 22:54:30 +02:00
Fabien Castan
1ff41c39b1
Merge pull request #2734 from alicevision/fix/elapsedTimeSingleChunk
Fix elapsed time when there is only one chunk
2025-06-03 12:42:09 +02:00
Candice Bentéjac
7d1ebe679c
Merge pull request #2731 from alicevision/fix/listOutputConnections
[core] attribute: Fix `hasOutputConnections` for ListAttributes
2025-06-02 11:06:55 +01:00
Fabien Servant
c95c94bd55 Fix elapsed time when there is only one chunk 2025-06-02 09:45:18 +02:00
mhog
4ad1de27e5
Merge pull request #2732 from alicevision/fix/homeButton
[ui] Reconstruction: Restore the `Slot` status of the `clear` method
2025-05-27 15:55:22 +02:00
Candice Bentéjac
bcc711f14d [ui] Reconstruction: Restore the Slot status of the clear method 2025-05-27 15:43:46 +02:00
Candice Bentéjac
a293c67344 [core] attribute: Fix hasOutputConnections for ListAttributes 2025-05-27 15:16:04 +02:00
Candice Bentéjac
09b4797ff3
Merge pull request #2722 from alicevision/feature/attribute-viewer2
[ui] AttributeEditor: Allow displaying attibute in corresponding viewport
2025-05-23 14:21:25 +02:00
Candice Bentéjac
0cd5769eed [GraphEditor] AttributeItemDelegate: Center attribute labels vertically 2025-05-23 14:17:11 +02:00
nicolas-lambert-tc
64f3f8534e [ui] Attribute: Add a tooltip to explain the eye icon utility 2025-05-23 14:16:36 +02:00
Nicolas Lambert
2608695a7e
Apply suggestions from code review (Layout adjustment on connection and displayable icons)
Co-authored-by: Candice Bentéjac <candice.bentejac@gmail.com>
2025-05-22 15:27:50 +02:00
Nicolas Lambert
2488f3e742
Apply suggestions from code review (Fix the old 3d typo and useless comment)
Co-authored-by: Candice Bentéjac <candice.bentejac@gmail.com>
2025-05-22 15:26:27 +02:00
nicolas-lambert-tc
16ffc8343c [ui] Attribute: Fix the eye icon alignment 2025-05-21 16:19:24 +02:00
Nicolas Lambert
00913e1802
Use visibility instead of opacity
Co-authored-by: Candice Bentéjac <candice.bentejac@gmail.com>
2025-05-21 15:20:01 +02:00
nicolas-lambert-tc
51dc0943e2 [ui] Attribute: Use a static declarative menuItem instead of an imperative creation 2025-05-21 15:16:00 +02:00
nicolas-lambert-tc
818e735087 [ui] Attriubte: Remove trailing spaces 2025-05-21 12:53:30 +02:00
nicolas-lambert-tc
0ef098f659 [ui] Attribute: Prefer double quotes insead of single quotes when possible 2025-05-21 12:53:04 +02:00