From 80c4e6fac996b8ce7f91deff2c0349c8eab8e1b1 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 16 Aug 2024 10:47:06 +1000 Subject: [PATCH] #203 don't link a node to itself --- __init__.py | 2 +- js/use_everywhere_classes.js | 1 + pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 63ec719..d3a0b24 100644 --- a/__init__.py +++ b/__init__.py @@ -1,6 +1,6 @@ from .use_everywhere import SeedEverywhere, AnythingEverywherePrompts -UE_VERSION = "5.0.1" +UE_VERSION = "5.0.2" NODE_CLASS_MAPPINGS = { "Seed Everywhere": SeedEverywhere } diff --git a/js/use_everywhere_classes.js b/js/use_everywhere_classes.js index 86c5353..de4a18d 100644 --- a/js/use_everywhere_classes.js +++ b/js/use_everywhere_classes.js @@ -40,6 +40,7 @@ class UseEverywhere { Does this broadcast match a given node,input? */ matches(node, input) { + if (this.output[0] == node.id) return false; if (this.restrict_to && !this.restrict_to.includes(node.id)) return false; const input_label = input.label ? input.label : input.name; const node_label = node.title ? node.title : (node.properties['Node name for S&R'] ? node.properties['Node name for S&R'] : node.type); diff --git a/pyproject.toml b/pyproject.toml index 13ea5cd..094caae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "cg-use-everywhere" description = "A set of nodes that allow data to be 'broadcast' to some or all unconnected inputs. Greatly reduces link spaghetti." -version = "5.0.1" +version = "5.0.2" license = { file = "LICENSE" } [project.urls]