Skip to content

Instantly share code, notes, and snippets.

@andywang646691
andywang646691 / addTextLayerBaselineGuide.js
Created October 20, 2021 07:32
基于文本基线创建辅助线
// from https://community.adobe.com/t5/after-effects-discussions/baselinelocs-make-me-confused/td-p/12385553
function addTextLayerBaselineGuide(layer, comp) {
guideIndex = [];
var anchorPoint = layer.anchorPoint.value,
positionPoint = layer.sourcePointToComp([ anchorPoint[0], anchorPoint[1] ]),
tlW = layer.sourceRectAtTime(comp.time, !1).width,
tlH = layer.sourceRectAtTime(comp.time, !1).height,
tlT = layer.sourceRectAtTime(comp.time, !1).top,
tlL = layer.sourceRectAtTime(comp.time, !1).left,