以下是一个简单的PR脚本,可以将所选图层居中于合成中心:

// Select the layer you want to center
var layer = app.project.activeItem.selectedLayers[0];

// Get the width and height of the composition
var compWidth = app.project.activeItem.width;
var compHeight = app.project.activeItem.height;

// Get the width and height of the layer
var layerWidth = layer.sourceRectAtTime(0, false).width;
var layerHeight = layer.sourceRectAtTime(0, false).height;

// Calculate the center position
var centerX = compWidth / 2;
var centerY = compHeight / 2;

// Set the layer's position to the center position
layer.property("Position").setValue([centerX - layerWidth / 2, centerY - layerHeight / 2]);

将此代码复制并粘贴到您的PR脚本编辑器中,然后保存为.js文件。然后,您可以在PR中选择您想要居中的图层,然后运行此脚本。它将自动将该图层居中于合成中心。


原文地址: https://www.cveoy.top/t/topic/bU14 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录