add None node
This commit is contained in:
+5
-1
@@ -1,3 +1,7 @@
|
||||
from .predefined_resolution_node import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
||||
from .predefined_resolution_node import NODE_CLASS_MAPPINGS as RESOLUTION_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as RESOLUTION_DISPLAY_MAPPINGS
|
||||
from .none_constant_node import NODE_CLASS_MAPPINGS as NONE_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as NONE_DISPLAY_MAPPINGS
|
||||
|
||||
NODE_CLASS_MAPPINGS = {**RESOLUTION_MAPPINGS, **NONE_MAPPINGS}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {**RESOLUTION_DISPLAY_MAPPINGS, **NONE_DISPLAY_MAPPINGS}
|
||||
|
||||
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
class NoneConstantNode:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {},
|
||||
"optional": {}
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("*",)
|
||||
RETURN_NAMES = ("value",)
|
||||
FUNCTION = "get_none"
|
||||
CATEGORY = "utils"
|
||||
|
||||
def get_none(self):
|
||||
return (None,)
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"NoneConstant": NoneConstantNode
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"NoneConstant": "None Constant"
|
||||
}
|
||||
Reference in New Issue
Block a user