diff --git a/nodes.py b/nodes.py index df40f809..ce090f40 100644 --- a/nodes.py +++ b/nodes.py @@ -1779,6 +1779,7 @@ NODE_DISPLAY_NAME_MAPPINGS = { } EXTENSION_WEB_DIRS = {} +EXTENSION_STYLE_DIRS = {} def load_custom_node(module_path, ignore=set()): module_name = os.path.basename(module_path) @@ -1797,6 +1798,11 @@ def load_custom_node(module_path, ignore=set()): sys.modules[module_name] = module module_spec.loader.exec_module(module) + if hasattr(module, "STYLE_DIRECTORY") and getattr(module, "STYLE_DIRECTORY") is not None: + style_dir = os.path.abspath(os.path.join(module_dir, getattr(module, "STYLE_DIRECTORY"))) + if os.path.isdir(style_dir): + EXTENSION_STYLE_DIRS[module_name] = style_dir + if hasattr(module, "WEB_DIRECTORY") and getattr(module, "WEB_DIRECTORY") is not None: web_dir = os.path.abspath(os.path.join(module_dir, getattr(module, "WEB_DIRECTORY"))) if os.path.isdir(web_dir):