web widget, refractor
This commit is contained in:
+14
-23
@@ -4,31 +4,22 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
from .colormod import ColorModPivot, ColorModEdges
|
||||
NODE_CLASS_MAPPINGS = {}
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"ColorModPivot": ColorModPivot,
|
||||
"ColorModEdges": ColorModEdges,
|
||||
}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"ColorModPivot": ColorModPivot.TITLE,
|
||||
"ColorModEdges": ColorModEdges.TITLE,
|
||||
}
|
||||
# main nodes (no deps)
|
||||
from .nodes.mod import NODE_CLASS_MAPPINGS as mod_nodes
|
||||
NODE_CLASS_MAPPINGS.update(mod_nodes)
|
||||
|
||||
# 10bit PNG nodes
|
||||
try:
|
||||
import png
|
||||
except ImportError:
|
||||
print("Can't find pypng! Please install to enable 16bit image support.")
|
||||
pass
|
||||
print("ColorMod: Can't find pypng! Please install to enable 16bit image support.")
|
||||
else:
|
||||
from .highprec import SaveImageHighPrec, PreviewImageHighPrec, LoadImageHighPrec
|
||||
NODE_CLASS_MAPPINGS.update({
|
||||
"SaveImageHighPrec": SaveImageHighPrec,
|
||||
"PreviewImageHighPrec": PreviewImageHighPrec,
|
||||
"LoadImageHighPrec": LoadImageHighPrec,
|
||||
})
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS.update({
|
||||
"SaveImageHighPrec": SaveImageHighPrec.TITLE,
|
||||
"PreviewImageHighPrec": PreviewImageHighPrec.TITLE,
|
||||
"LoadImageHighPrec": LoadImageHighPrec.TITLE,
|
||||
})
|
||||
from .nodes.save import NODE_CLASS_MAPPINGS as save_nodes
|
||||
NODE_CLASS_MAPPINGS.update(save_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"]
|
||||
|
||||
Reference in New Issue
Block a user