Skip to content

Commit

Permalink
fixed GLSL nodes missing from parse due to category sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Amorano committed Feb 2, 2025
1 parent e628aad commit cf3ced2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ You can colorize nodes via their `title` or `body`. This can be done to the node

## UPDATES

**2024/02/02** @1.2.67:
* fixed `GLSL` nodes missing from parse due to category sort

**2024/02/01** @1.2.66:
* patched `MIDI FILTER EZ` to work for all filters not just the first found
* cleanup pyproject for registry
Expand Down
21 changes: 5 additions & 16 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ async def jovimetrix_doc_node_comfy(request) -> Any:
logger.error(e)

# ==============================================================================
# === SUPPORT FUNCTIONS ===
# === SUPPORT ===
# ==============================================================================

def parse_reset(ident:str) -> int:
Expand All @@ -889,10 +889,6 @@ def parse_reset(ident:str) -> int:
except Exception as e:
logger.error(str(e))

# ==============================================================================
# === NODE LOADER ===
# ==============================================================================

def configLoad(fname:Path, as_json:bool=True) -> Any | list[str] | None:
try:
with open(fname, 'r', encoding='utf-8') as fn:
Expand Down Expand Up @@ -988,17 +984,6 @@ def loader():
NODE_CLASS_MAPPINGS = {x[0] : x[1] for x in sorted(NODE_CLASS_MAPPINGS.items(),
key=lambda item: getattr(item[1], 'SORT', 0))}

# now sort the categories...
prime = NODE_CLASS_MAPPINGS.copy()
NODE_CLASS_MAPPINGS = {}
for c in ["CREATE", "ADJUST", "COMPOSE", "IMAGE",
"CALC", "ANIMATE", "FLOW", "DEVICE", "AUDIO",
"UTILITY"]:

for k, v in prime.items():
if v.CATEGORY.endswith(c):
NODE_CLASS_MAPPINGS[k] = v

keys = NODE_CLASS_MAPPINGS.keys()
for name in keys:
logger.debug(f"✅ {name}")
Expand All @@ -1009,4 +994,8 @@ def loader():
with open(str(ROOT) + "/node_list.json", "w", encoding="utf-8") as f:
json.dump(NODE_LIST_MAP, f, sort_keys=True, indent=4 )

# ==============================================================================
# === BOOTSTRAP ===
# ==============================================================================

loader()
1 change: 1 addition & 0 deletions core/create_glsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ def import_dynamic() -> Tuple[str,...]:
continue
meta = shader_meta(shader)
if meta.get('hide', False):
logger.warning(f"hide shader file {fname}")
continue

name = meta.get('name', name.split('.')[0]).upper()
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "jovimetrix"
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."
version = "1.2.66"
version = "1.2.67"
license = { file = "LICENSE" }
readme = "README.md"
authors = [{ name = "Alexander G. Morano", email = "[email protected]" }]
Expand Down Expand Up @@ -52,4 +52,4 @@ Issues = "https://github.com/Amorano/Jovimetrix/issues"
[tool.comfy]
PublisherId = "amorano"
DisplayName = "Jovimetrix"
Icon = "https://raw.githubusercontent.com/Amorano/Jovimetrix-examples/refs/heads/master/res/logo-jovimetrix-small.png"
Icon = "https://raw.githubusercontent.com/Amorano/Jovimetrix-examples/refs/heads/master/res/logo-jvmx.png"

0 comments on commit cf3ced2

Please sign in to comment.