Merge pull request #847 from Ni-zav/fix/816-script-transform-shortcuts-s20261011T141200Z-fd2e

fix(script): expose AVLayer transform property shortcuts

# Conflicts:
#	crates/script/src/tests.rs
This commit is contained in:
Brandon Thomas
2026-10-12 03:23:21 -04:00
2 changed files with 25 additions and 0 deletions
+5
View File
@@ -1187,6 +1187,11 @@ AVLayer.prototype.constructor = AVLayer;
var P = AVLayer.prototype;
function def(name, get, set) { Object.defineProperty(P, name, { get: get, set: set }); }
def("source", function () { return __item(this.__info().source); });
// After Effects exposes the most common Transform properties directly on AVLayer.
// Return the original Property object, not its current value: scripts can keyframe it.
["anchorPoint", "position", "scale", "rotation", "opacity"].forEach(function (name) {
def(name, function () { return this.transform[name]; });
});
def("width", function () { return this.__info().width; });
def("height", function () { return this.__info().height; });
def("threeDLayer", function () { return this.__info().threeDLayer; }, function (v) { this.__switch("threeD", v); });