-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path__init__.py
More file actions
53 lines (47 loc) · 1.95 KB
/
__init__.py
File metadata and controls
53 lines (47 loc) · 1.95 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
"""
Augment - Vectorize Pro
"""
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
_failed = []
# ── Flow Control ──
try:
from .trigger import GateNode, make_wait_node, WAIT_TYPES
NODE_CLASS_MAPPINGS["GateNode"] = GateNode
NODE_DISPLAY_NAME_MAPPINGS["GateNode"] = "Trigger"
for _name, _type_str in WAIT_TYPES.items():
_cls_name = f"AugmentWait{_name}"
try:
NODE_CLASS_MAPPINGS[_cls_name] = make_wait_node(_name, _type_str)
NODE_DISPLAY_NAME_MAPPINGS[_cls_name] = f"{_name} (Improved)"
except Exception as e:
_failed.append((_cls_name, e))
print(f"[augment-vectorize] ⚠ {_cls_name} unavailable: {e}")
except Exception as e:
_failed.append(("Wait nodes", e))
print(f"[augment-vectorize] ⚠ Flow control nodes unavailable: {e}")
# ── PNG to SVG Pro (Paid) ──
try:
from .png_to_svg_pro import AugmentPNGToSVGPro
NODE_CLASS_MAPPINGS["AugmentPNGToSVGPro"] = AugmentPNGToSVGPro
NODE_DISPLAY_NAME_MAPPINGS["AugmentPNGToSVGPro"] = "Vectorize Pro"
except Exception as e:
_failed.append(("AugmentPNGToSVGPro", e))
print(f"[augment-vectorize] ⚠ AugmentPNGToSVGPro unavailable: {e}")
# ── Export SVG ──
try:
from .export_svg import AugmentExportSVG
NODE_CLASS_MAPPINGS["AugmentExportSVG"] = AugmentExportSVG
NODE_DISPLAY_NAME_MAPPINGS["AugmentExportSVG"] = "Export SVG"
except Exception as e:
_failed.append(("AugmentExportSVG", e))
print(f"[augment-vectorize] ⚠ AugmentExportSVG unavailable: {e}")
# ── Summary ──
WEB_DIRECTORY = "./web/js"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
if _failed:
print(f"[augment-vectorize] ✓ Registered {len(NODE_CLASS_MAPPINGS)} nodes ({len(_failed)} failed)")
for node_id, err in _failed:
print(f"[augment-vectorize] ✗ {node_id}: {err}")
else:
print(f"[augment-vectorize] ✓ Registered {len(NODE_CLASS_MAPPINGS)} nodes")