Add accumulator preview reordering

This commit is contained in:
2026-06-25 08:52:53 +02:00
parent 55477bd826
commit 4e5370626f
3 changed files with 104 additions and 0 deletions
+16
View File
@@ -343,6 +343,7 @@ try:
LOOP_NODE_DISPLAY_NAME_MAPPINGS,
accumulator_delete_entries,
accumulator_list_entries,
accumulator_move_entry,
)
from .prompt_builder import (
build_camera_config_json,
@@ -418,6 +419,7 @@ except ImportError:
LOOP_NODE_DISPLAY_NAME_MAPPINGS,
accumulator_delete_entries,
accumulator_list_entries,
accumulator_move_entry,
)
from prompt_builder import (
build_camera_config_json,
@@ -524,6 +526,20 @@ if PromptServer is not None and web is not None:
except Exception as exc:
return web.json_response({"error": str(exc)}, status=400)
@PromptServer.instance.routes.post("/sxcp/accumulator/move")
async def sxcp_accumulator_move(request):
try:
payload = await request.json()
result = accumulator_move_entry(
store_key=str(payload.get("store_key") or ""),
entry_id=str(payload.get("entry_id") or ""),
index=int(payload.get("index") or 0),
direction=str(payload.get("direction") or "up"),
)
return web.json_response(result)
except Exception as exc:
return web.json_response({"error": str(exc)}, status=400)
class SxCPPromptBuilder:
@classmethod