diff --git a/meshroom/plugins/README.md b/meshroom/plugins/README.md index 63f7671c93..f7bdddc01a 100644 --- a/meshroom/plugins/README.md +++ b/meshroom/plugins/README.md @@ -2,14 +2,17 @@ A plugin is a set of one or several nodes that are not part of the Meshroom/Alicevision main project. They are meant to facilitate the creation of custom pipeline, make distribution and installation of extra nodes easy, and allow the use of different level of isolation at the node level. -Each node within a plugin may use the same environnement, or use different ones. +Each node within a plugin may use the same or differents environnement. # Making Meshroom Plugins -To make a new plugin, make your node inheriting from `meshroom.core.plugins.PipNode`, `meshroom.core.plugins.VenvNode`, `meshroom.core.plugins.CondaNode` or `meshroom.core.plugins.DockerNode`. -In your new node class, overwrite the variable `envFile` to point to the environment file (e.g. the `yaml` or `dockerfile`) that sets up your installation. The path to this file should be relative to the path of the node, and within the same folder (or subsequent child folder) as the node definition. +To make a new plugin, make your node inheriting from `meshroom.core.plugins.PluginNode` +In your new node class, overwrite the variable `envFile` to point to the environment file (e.g. the `yaml` or `dockerfile`) that sets up your installation, end `envType` to specify the type of plugin. The path to this file should be relative to the path of the node, and within the same folder (or subsequent child folder) as the node definition. -Prefixes will be added automatically to your command line to run the node in the right envireonnement. +The code in `processChunk` in your node definition will be automatically executed within the envirenoment, using `meshroom_compute`. +A new status `FIRST_RUN` denotes the stage in between the environement startup and the execution of the node. + +Make sur your imports are lazy, in `processChunk`. Several nodes share the same environment as long as they point to the same environment file. Changing this file will trigger a rebuild on the environment. @@ -33,5 +36,5 @@ The file must have the following structure: ] ``` -The environment of the nodes are going to be build the first time it is needed (status will be 'BUILD', in purple) +The environment of the nodes are going to be build the first time it is needed (status will be `BUILD`, in purple).