diff --git a/README.md b/README.md index 4bbd73c..99d081f 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,10 @@ Nodes that have been migrated: [Migrated to Jovi_GLSL](https://github.com/Amorano/Jovi_GLSL) +**2025/07/27** @2.1.19: +* added `BATCH TO LIST` node +* `VECTOR` node(s) default step changed to 0.1 + **2025/07/13** @2.1.18: * allow numpy>=1.25.0 diff --git a/core/create.py b/core/create.py index f8a1c73..8d0d897 100644 --- a/core/create.py +++ b/core/create.py @@ -202,6 +202,7 @@ Create n-sided polygons. These shapes can be customized by adjusting parameters rgb = (gaussian(rgb, sigma=blur, channel_axis=2) * 255).astype(np.uint8) mask = (gaussian(mask, sigma=blur, channel_axis=2) * 255).astype(np.uint8) + mask = (mask * (color[3] / 255.)).astype(np.uint8) back = list(matte[:3]) + [255] canvas = np.full((height, width, 4), back, dtype=rgb.dtype) rgba = image_blend(canvas, rgb, mask) diff --git a/core/utility/batch.py b/core/utility/batch.py index edf419e..8eb8800 100644 --- a/core/utility/batch.py +++ b/core/utility/batch.py @@ -240,6 +240,29 @@ Processes a batch of data based on the selected mode. Merge, pick, slice, random return (data, [size],) +class BatchToList(CozyBaseNode): + NAME = "BATCH TO LIST (JOV)" + NAME_PRETTY = "BATCH TO LIST (JOV)" + CATEGORY = JOV_CATEGORY + RETURN_TYPES = (COZY_TYPE_ANY, ) + RETURN_NAMES = ("LIST", ) + DESCRIPTION = """ +Convert a batch of values into a pure python list of values. +""" + @classmethod + def INPUT_TYPES(cls) -> InputType: + d = super().INPUT_TYPES() + return deep_merge(d, { + "optional": { + Lexicon.BATCH: (COZY_TYPE_ANY, {}), + } + }) + + def run(self, **kw) -> tuple[list[Any]]: + batch = parse_param(kw, Lexicon.BATCH, EnumConvertType.LIST, []) + batch = [f[0] for f in batch] + return (batch,) + class QueueBaseNode(CozyBaseNode): CATEGORY = JOV_CATEGORY RETURN_TYPES = (COZY_TYPE_ANY, COZY_TYPE_ANY, "STRING", "INT", "INT", "BOOLEAN") diff --git a/node_list.json b/node_list.json index 943c742..d081ead 100644 --- a/node_list.json +++ b/node_list.json @@ -10,6 +10,7 @@ "ADJUST: SHARPEN (JOV)": "Sharpen the pixels of an image", "AKASHIC (JOV) \ud83d\udcd3": "Visualize data", "ARRAY (JOV) \ud83d\udcda": "Processes a batch of data based on the selected mode", + "BATCH TO LIST (JOV)": "Convert a batch of values into a pure python list of values", "BIT SPLIT (JOV) \u2b44": "Split an input into separate bits", "BLEND (JOV) \u2697\ufe0f": "Combine two input images using various blending modes, such as normal, screen, multiply, overlay, etc", "COLOR BLIND (JOV) \ud83d\udc41\u200d\ud83d\udde8": "Simulate color blindness effects on images", diff --git a/pyproject.toml b/pyproject.toml index 9b14e25..5b02ced 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "jovimetrix" description = "Animation via tick. Parameter manipulation with wave generator. Unary and Binary math support. Value convert int/float/bool, VectorN and Image, Mask types. Shape mask generator. Stack images, do channel ops, split, merge and randomize arrays and batches. Load images & video from anywhere. Dynamic bus routing. Save output anywhere! Flatten, crop, transform; check colorblindness or linear interpolate values." -version = "2.1.18" +version = "2.1.19" license = { file = "LICENSE" } readme = "README.md" authors = [{ name = "Alexander G. Morano", email = "amorano@gmail.com" }] diff --git a/web/widget_vector.js b/web/widget_vector.js index e2c39eb..baa657d 100644 --- a/web/widget_vector.js +++ b/web/widget_vector.js @@ -62,7 +62,7 @@ const VectorWidget = (app, inputName, options, initial) => { widget.convert = parseFloat; widget.options.precision = widget.options?.precision || 2; - widget.options.step = widget.options?.step || 0.01; + widget.options.step = widget.options?.step || 0.1; widget.options.round = 1 / 10 ** widget.options.step; if (widget.options?.rgb || widget.options?.int || false) {