fix right click service on custom nodes with empty services, load services to custom node when drawn on canvas, show current services for custom node's service dialog

This commit is contained in:
Huy Pham 2020-01-27 13:20:31 -08:00
parent b3463f1fb7
commit 09cc65646f
3 changed files with 23 additions and 3 deletions

View file

@ -106,6 +106,17 @@ class NodeUtils:
logging.error("invalid icon: %s", core_node.icon)
return image
@classmethod
def is_custom(cls, model):
return model not in cls.NODE_MODELS
@classmethod
def get_custom_node_services(cls, gui_config, name):
for m in gui_config["nodes"]:
if m["name"] == name:
return m["services"]
return []
@classmethod
def setup(cls):
nodes = [