#808: sourcePointToComp and compPointToSource follow the layer's transform

Both returned their input unchanged. They now go through the layer's transform and its parents'
at comp time, and the inverse.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
Kristian Myram
2026-10-12 19:19:13 +02:00
co-authored by Claude Haiku 5.5
parent 470ea7a3af
commit 2ef3d977a6
3 changed files with 52 additions and 2 deletions
+6 -2
View File
@@ -1285,8 +1285,12 @@ AVLayer.prototype.constructor = AVLayer;
P.sourceRectAtTime = function (t, extents) {
return __get("sourceRect", { comp: this.__comp, layer: this.__id, time: __num(t, "time"), extents: !!extents });
};
P.sourcePointToComp = function (p) { return p; };
P.compPointToSource = function (p) { return p; };
// Source ↔ comp points, through the layer's transform and its parents' at the comp's time (#808).
function pointIn(layer, p, toComp) {
return __get("pointConvert", { comp: layer.__comp, layer: layer.__id, point: [__num(p[0], "point"), __num(p[1], "point")], toComp: toComp, time: layer.containingComp.time });
}
P.sourcePointToComp = function (p) { return pointIn(this, p, true); };
P.compPointToSource = function (p) { return pointIn(this, p, false); };
P.replaceSource = function () { throw __err("replaceSource is not supported yet"); };
P.openInViewer = function () { __call("layer.openLayer", this.__p1()); return null; };
})();