[core] plugins: Add NodePluginStatus enum for NodePlugin objects

This commit is contained in:
Candice Bentéjac 2025-05-07 14:29:32 +02:00
parent f6694022a3
commit 1531e11b83

View file

@ -2,6 +2,7 @@ from __future__ import annotations
import logging
from enum import Enum
from pathlib import Path
from meshroom.common import BaseObject
@ -19,6 +20,16 @@ class ProcessEnv(BaseObject):
self.pythonPathFolders: list = [Path(folder)] + self.binPaths
class NodePluginStatus(Enum):
"""
Loading status for NodePlugin objects.
"""
NOT_LOADED = 0 # The node plugin exists but is not loaded and cannot be used (not registered)
LOADED = 1 # The node plugin is currently loaded and functional (it has been registered)
DESC_ERROR = 2 # The node plugin exists but has an invalid description
ERROR = 3 # The node plugin exists and is valid but could not be successfully loaded
class Plugin(BaseObject):
"""
A collection of node plugins.