Skip to content

Commit d9a93e6

Browse files
committed
regex entries default to [5] fields
(issue #4)[Amorano/Jovi_GLSL#4] value in uniforms for `GLSL nodes` were cancelling values being set
1 parent 61b8823 commit d9a93e6

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ You can colorize nodes via their `title background`, `node body` or `title text`
9494

9595
## UPDATES
9696

97+
**2024/02/05** @1.7.0:
98+
* regex entries default to [5] fields
99+
* [issue #4](https://github.com/Amorano/Jovi_GLSL/issues/4) value in uniforms for `GLSL nodes` were cancelling values being set
100+
97101
**2024/02/04** @1.6.10:
98102
* adjusted new default color config to old defaults
99103

__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,8 @@ def loader():
932932
key=lambda item: getattr(item[1], 'SORT', 0))}
933933

934934
keys = NODE_CLASS_MAPPINGS.keys()
935-
for name in keys:
936-
logger.debug(f"✅ {name}")
935+
#for name in keys:
936+
# logger.debug(f"✅ {name}")
937937
logger.info(f"{len(keys)} nodes loaded")
938938

939939
# only do the list on local runs...

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "jovimetrix"
33
description = "Integrates Webcam, MIDI, Spout and GLSL shader support. Animation via tick. Parameter manipulation with wave generator. Math operations with Unary and Binary support. Value conversion for all major types (int, string, list, dict, Image, Mask). Shape mask generation, image stacking and channel ops, batch splitting, merging and randomizing, load images and video from anywhere, dynamic bus routing with a single node, export support for GIPHY, save output anywhere! flatten, crop, transform; check colorblindness, make stereogram or stereoscopic images, or liner interpolate values and more."
4-
version = "1.6.10"
4+
version = "1.7.0"
55
license = { file = "LICENSE" }
66
readme = "README.md"
77
authors = [{ name = "Alexander G. Morano", email = "[email protected]" }]

sup/shader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def render(self, time_delta:float=0.,
433433

434434
gl.glUniform1i(p_loc, texture_index)
435435
texture_index += 1
436-
elif val:
436+
else:
437437
funct = LAMBDA_UNIFORM[p_type]
438438
if isinstance(p_value, EnumType):
439439
val = p_value[val].value

web/core/core_color.js

+13-4
Original file line numberDiff line numberDiff line change
@@ -597,11 +597,20 @@ app.registerExtension({
597597
NODE_LIST = Object.fromEntries(NODE_LIST);
598598

599599
const CONFIG_CORE = await apiGet("/jovimetrix/config");
600-
601-
if (!Array.isArray(app.extensionManager.setting.get(setting_regex))) {
602-
const CONFIG_REGEX = CONFIG_CORE?.user?.default?.color?.regex || [];
603-
await app.extensionManager.setting.set(setting_regex, CONFIG_REGEX);
600+
let CONFIG_REGEX = app.extensionManager.setting.get(setting_regex);
601+
if (!Array.isArray(CONFIG_REGEX)) {
602+
CONFIG_REGEX = CONFIG_CORE?.user?.default?.color?.regex || [
603+
{ "regex": "" },
604+
{ "regex": "" },
605+
{ "regex": "" },
606+
{ "regex": "" },
607+
{ "regex": "" }
608+
];
609+
}
610+
while (CONFIG_REGEX.length < 5) {
611+
CONFIG_REGEX.push({ "regex": "" });
604612
}
613+
await app.extensionManager.setting.set(setting_regex, CONFIG_REGEX);
605614

606615
if (!Array.isArray(app.extensionManager.setting.get(setting_theme))) {
607616
const CONFIG_THEME = CONFIG_CORE?.user?.default?.color?.theme || {

0 commit comments

Comments
 (0)