From b6ceafcbdb39ff5a270395f0e4cb8bc9d368272c Mon Sep 17 00:00:00 2001 From: Teodoro Toscano Date: Sun, 27 Apr 2025 11:23:37 +0200 Subject: [PATCH] added "reset_after_stop" to number counter node --- WAS_Node_Suite.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WAS_Node_Suite.py b/WAS_Node_Suite.py index f1067f0..9a33f68 100644 --- a/WAS_Node_Suite.py +++ b/WAS_Node_Suite.py @@ -12629,7 +12629,7 @@ class WAS_Number_Counter: return { "required": { "number_type": (["integer", "float"],), - "mode": (["increment", "decrement", "increment_to_stop", "decrement_to_stop"],), + "mode": (["increment", "decrement", "increment_to_stop", "decrement_to_stop", "reset_after_stop"],), "start": ("FLOAT", {"default": 0, "min": -18446744073709551615, "max": 18446744073709551615, "step": 0.01}), "stop": ("FLOAT", {"default": 0, "min": -18446744073709551615, "max": 18446744073709551615, "step": 0.01}), "step": ("FLOAT", {"default": 1, "min": 0, "max": 99999, "step": 0.01}), @@ -12669,6 +12669,8 @@ class WAS_Number_Counter: counter = counter + step if counter < stop else counter elif mode == 'decrement_to_stop': counter = counter - step if counter > stop else counter + elif mode == 'reset_after_stop': + counter = counter + step if counter < stop else start + step self.counters[unique_id] = counter