0.10.6: setButtonEnabled action — disable buttons from the timeline

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.7 committed 2026-04-22 19:17:48 +02:00
1 parent d3c5b8b640
commit 0bbef66192
8 files changed
+221 -2

No files matched your search

+9 -1
View File
@@ -10,7 +10,7 @@ function isProject(p: ExportPayload): p is Project {
return Array.isArray((p as Partial<Project>).scenes)
}
const RUNTIME_VERSION = '25'
const RUNTIME_VERSION = '26'
const ENGINE_SOURCE = `(function(){
if (window.AnimatrPlayer && window.AnimatrPlayer.__v === '${RUNTIME_VERSION}') return;
@@ -568,6 +568,14 @@ const ENGINE_SOURCE = `(function(){
}
return;
}
case 'setButtonEnabled': {
// Runtime override lives on runtime.buttonDisabled — keyed by
// scene-layer id. True = disabled, false = enabled. Clearing
// the entry would fall back to layer.buttonDisabled, which is
// the persisted initial flag, not what the script just asked for.
runtime.buttonDisabled[act.layerId] = !act.enabled;
return;
}
case 'script': {
var parsed=parseScriptSource(act.source);
if(parsed.errors.length){