Merge pull request #846 from Ni-zav/fix/808-script-comments-and-marker-params-s20261011T141200Z-fd2e

fix(script): persist layer comments and unnamed marker parameters

# Conflicts:
#	crates/script/src/tests.rs
This commit is contained in:
Brandon Thomas
2026-10-12 03:23:20 -04:00
2 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -1018,7 +1018,7 @@ MarkerProperty.prototype = {
t = __num(t, "time");
if (!(mv instanceof MarkerValue)) throw __err("value must be a MarkerValue");
var p = this.__p({ time: t, duration: mv.duration || 0, comment: mv.comment, chapter: mv.chapter, url: mv.url, frameTarget: mv.frameTarget, protected: !!mv.protectedRegion, label: mv.label || 0 });
p.cuePoint = mv.cuePointName ? { name: mv.cuePointName, navigation: !mv.eventCuePoint, params: mv.__params } : null;
p.cuePoint = (mv.cuePointName || mv.__params.length) ? { name: mv.cuePointName, navigation: !mv.eventCuePoint, params: mv.__params } : null;
var l = this.__list(), at = -1;
for (var i = 0; i < l.length; i++) if (Math.abs(l[i].time - t) < 1e-6) at = i;
if (at >= 0) p.index = at;
@@ -1119,6 +1119,7 @@ Layer.prototype = {
__call("edit.label", this.__p({ label: n }));
},
get comment() { return this.__info().comment; },
set comment(v) { __call("layer.setComment", this.__p({ comment: String(v) })); },
get selected() { return this.__info().selected; },
set selected(v) {
var sel = this.containingComp.__info().selectedLayers;