diff --git a/templates.py b/templates.py index a876b4fc..2e97e563 100644 --- a/templates.py +++ b/templates.py @@ -1556,7 +1556,7 @@ async def funpack_parse_timeline(request): data = await request.json() prompt = str(data.get("prompt") or "") refinement_key = str(data.get("refinement_key") or "") - custom_map = load_custom_transition_triggers() if not refinement_key else {} + custom_map = load_custom_transition_triggers() try: from .conditioning import parse_timeline_segments except ImportError: diff --git a/web/funpack_studio.js b/web/funpack_studio.js index b66c2e8d..ab94846d 100644 --- a/web/funpack_studio.js +++ b/web/funpack_studio.js @@ -1239,8 +1239,22 @@ function openPanel(node) { } // ── Timeline ─────────────────────────────────────────────────────────────── + function resolveInputValue(n, inputName) { + const w = widgetByName(n, inputName); + if (w) return String(w.value || ""); + const idx = (n.inputs || []).findIndex(i => i.name === inputName); + if (idx === -1) return ""; + const linkId = n.inputs[idx].link; + if (!linkId) return ""; + const link = app.graph?.links?.[linkId]; + if (!link) return ""; + const src = app.graph.getNodeById(link.origin_id); + if (!src) return ""; + return String(src.widgets?.[0]?.value || ""); + } + async function renderTimeline() { - const prompt = String(widgetByName(node, "positive_prompt")?.value || "").trim(); + const prompt = resolveInputValue(node, "positive_prompt").trim(); if (!prompt) { body.append(el("div", "funpack-studio-hint", "No prompt — type or connect a positive_prompt to preview the timeline.")); return;