-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path__init__.py
More file actions
59 lines (52 loc) · 2.15 KB
/
Copy path__init__.py
File metadata and controls
59 lines (52 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"""Node registration aggregator. Imports all ecosystem subpackages and
merges their `NODE_CLASS_MAPPINGS` / `NODE_DISPLAY_NAME_MAPPINGS`.
"""
from __future__ import annotations
import importlib
import logging
log = logging.getLogger("nukemax")
NODE_CLASS_MAPPINGS: dict = {}
NODE_DISPLAY_NAME_MAPPINGS: dict = {}
# Each ecosystem subpackage exposes the same two dicts.
# Use relative imports so this works no matter what folder name
# ComfyUI loads us under (e.g. "ComfyUI-NukeMaxNodes" with a hyphen).
_ECOSYSTEMS = (
".nukemax.nodes.types_io", # serialize/deserialize for custom types
".nukemax.nodes.roto",
".nukemax.nodes.fft",
".nukemax.nodes.relight",
".nukemax.nodes.audio",
".nukemax.nodes.flow",
".nukemax.nodes.edges",
# Migrated from ComfyUI-CustomNodePacks (Apr 2026)
".nukemax.nodes.utils",
".nukemax.nodes.io",
".nukemax.nodes.passes",
".nukemax.nodes.plate",
".nukemax.nodes.geometry_ext",
".nukemax.nodes.metadata",
".nukemax.nodes.color",
# New (May 2026): deep compositing, shuffle, Nuke-style copy/paste.
".nukemax.nodes.deep",
".nukemax.nodes.shuffle",
".nukemax.nodes.nkscript",
# New (May 2026): Mocha Pro tracking / shape / lens / project import.
".nukemax.nodes.mocha",
# New (May 2026): STMap lens distortion + OCIO color transform.
".nukemax.nodes.lens",
".nukemax.nodes.ocio",
# New (Jun 2026): chroma keyer + premult math (no more Nuke round-trip to pull a matte).
".nukemax.nodes.keying",
# New (Jun 2026): everyday comp nodes — Reformat/Crop/ColorCorrect/Clamp/Saturation/Glow/Erode-Dilate.
".nukemax.nodes.comp",
)
for mod_name in _ECOSYSTEMS:
try:
mod = importlib.import_module(mod_name, package=__name__)
NODE_CLASS_MAPPINGS.update(getattr(mod, "NODE_CLASS_MAPPINGS", {}))
NODE_DISPLAY_NAME_MAPPINGS.update(getattr(mod, "NODE_DISPLAY_NAME_MAPPINGS", {}))
except Exception as exc: # noqa: BLE001
log.warning("[NukeMax] failed to import %s: %s", mod_name, exc)
# Tell ComfyUI where to find our JS.
WEB_DIRECTORY = "./web"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]