move node, refractor

This commit is contained in:
City
2024-04-03 15:01:51 +02:00
parent 079639608b
commit df5d1ca4f0
4 changed files with 119 additions and 50 deletions
+6 -4
View File
@@ -4,22 +4,24 @@ try:
except ImportError:
pass
else:
WEB_DIRECTORY = "./web"
NODE_CLASS_MAPPINGS = {}
# main nodes (no deps)
from .nodes.mod import NODE_CLASS_MAPPINGS as mod_nodes
NODE_CLASS_MAPPINGS.update(mod_nodes)
# 10bit PNG nodes
# pypng dep
try:
import png
except ImportError:
print("ColorMod: Can't find pypng! Please install to enable 16bit image support.")
else:
from .nodes.save import NODE_CLASS_MAPPINGS as save_nodes
NODE_CLASS_MAPPINGS.update(save_nodes)
# 10bit PNG nodes
from .nodes.save_png import NODE_CLASS_MAPPINGS as save_png_nodes
NODE_CLASS_MAPPINGS.update(save_png_nodes)
# export
WEB_DIRECTORY = "./web"
NODE_DISPLAY_NAME_MAPPINGS = {k:v.TITLE for k,v in NODE_CLASS_MAPPINGS.items()}
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]