From c3075700b5b9a43b4177ca8b1c3af9644157f93e Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Sun, 14 Jul 2024 09:49:10 +0100 Subject: [PATCH] Deprecate reroute primitive, use core primitive+reroute --- py/reroute_primitive.py | 2 +- web/js/reroutePrimitive.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/py/reroute_primitive.py b/py/reroute_primitive.py index 5b67bbf..c22a7d1 100644 --- a/py/reroute_primitive.py +++ b/py/reroute_primitive.py @@ -21,7 +21,7 @@ class ReroutePrimitive: RETURN_TYPES = (any,) FUNCTION = "route" - CATEGORY = "utils" + CATEGORY = "__hidden__" def route(self, value): return (value,) diff --git a/web/js/reroutePrimitive.js b/web/js/reroutePrimitive.js index 91c77ad..7b934d7 100644 --- a/web/js/reroutePrimitive.js +++ b/web/js/reroutePrimitive.js @@ -21,6 +21,12 @@ app.registerExtension({ return r; }; + // Hide this node as it is no longer supported + const getNodeTypesCategories = LiteGraph.getNodeTypesCategories; + LiteGraph.getNodeTypesCategories = function() { + return getNodeTypesCategories.apply(this, arguments).filter(c => !c.startsWith("__hidden__")); + } + const graphToPrompt = app.graphToPrompt; app.graphToPrompt = async function () { const res = await graphToPrompt.apply(this, arguments);