From 498515e7a19bb3e8ab36aab2e628eb6be7464401 Mon Sep 17 00:00:00 2001 From: Nick Renieris Date: Thu, 29 Sep 2022 21:16:12 +0300 Subject: [PATCH] scripts/xy_grid: Handle edge-case with non-empty axis values Fixes bug where if Type is Nothing and axis values are filled out (from ie. previously using another Type), it will still needlessly run it N times (with identical results). --- scripts/xy_grid.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/xy_grid.py b/scripts/xy_grid.py index 24fa5a0a..f8bc64c4 100644 --- a/scripts/xy_grid.py +++ b/scripts/xy_grid.py @@ -159,6 +159,9 @@ class Script(scripts.Script): p.batch_size = 1 def process_axis(opt, vals): + if opt.label == 'Nothing': + return [0] + valslist = [x.strip() for x in vals.split(",")] if opt.type == int: