From 0809dc0b17b7e6702969d6aabc9fa7d301936cb5 Mon Sep 17 00:00:00 2001 From: luciano Date: Wed, 5 Aug 2026 16:05:51 +0200 Subject: [PATCH] Scene cues auto-activate the aux output they target A cue aimed at a connected display whose aux window was off landed nowhere and the monitor stayed black. The cue now switches that output on (persisted, row updates in the panel) and 'auxReady' re-sends the scene effect once the freshly created window has loaded. Co-Authored-By: Claude Fable 5 --- src/control.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/control.js b/src/control.js index 24165e5..4d932f0 100644 --- a/src/control.js +++ b/src/control.js @@ -758,7 +758,18 @@ function applyEffectTo(targetKey, el) { // -1 = every aux window (follow-mode ones get it via the effect broadcast) send({ type: 'auxFx', displayId: -1, effectIndex: el.effectIndex }); } else { - send({ type: 'auxFx', displayId: parseInt(targetKey, 10), effectIndex: el.effectIndex }); + const id = parseInt(targetKey, 10); + // The scene explicitly targets this display: if it is connected but its + // aux window is off, switch it on — otherwise the cue lands nowhere and + // the monitor silently stays black. The window loads async; 'auxReady' + // re-sends the scene effect once it is up. + const d = auxDisplays.find(x => x.id === id); + if (d && !(auxCfg[id] && auxCfg[id].on)) { + auxCfg[id] = auxCfg[id] || { on: false, mode: 'follow', effectIndex: null, image: null }; + auxCfg[id].on = true; + auxSave(); renderAuxList(); auxSyncAll(); + } + send({ type: 'auxFx', displayId: id, effectIndex: el.effectIndex }); } } function advanceCues(t) { @@ -2128,10 +2139,18 @@ djv.onReport((m) => { } break; case 'glbClips': renderGlbClips(m.names); break; - case 'auxReady': - // An aux window finished loading: (re)send its configuration. + case 'auxReady': { + // An aux window finished loading: (re)send its configuration, then any + // scene effect currently aimed at it (it may be the reason the window + // was just auto-activated). auxSendCfg(m.displayId); + const sc = lastScene.effect && typeof lastScene.effect === 'object' + ? lastScene.effect[String(m.displayId)] : null; + if (sc && EFFECTS.list[sc.effectIndex]) { + send({ type: 'auxFx', displayId: m.displayId, effectIndex: sc.effectIndex }); + } break; + } case 'auxClosed': if (auxCfg[m.displayId]) { auxCfg[m.displayId].on = false; auxSave(); } refreshDisplays();