文章目录
1.算法程序
- 1.算法程序
- 2.作者答疑
AfterEffect(AE)插件是Adobe公司开发的特效制作软件,稳定快速的功能和特效,在视频制作领域使用非常广泛,本文向大家介绍如何在项目里进行复制组合图层功能。源代码如下所示:
{
// Double-Up.jsx
//
// This script creates duplicates of the layers in a composition and
// lays them side by side with the original layers. You can use this
// script to compare different settings on the same footage.
//
// Notes:
// This script works best when it is initially applied to a footage layer
// that's the same size as and centered within its composition.
// Re-running the script allows you to double-up the previous layers.
function DoubleUp()
{
var doubleUpData = new Object();
doubleUpData.scriptName = "Double-Up";
doubleUpData.strErrNoCompSel = "Select or open a composition, then try again.";
doubleUpData.favorLongerDim = 0; // set to 1 to lay side-by-side along longest dimension (width or height)
var comp = app.project.activeItem;
if ((comp == null) || !(comp instanceof CompItem)) {
alert(doubleUpData.strErrNoCompSel, doubleUpData.scriptName);
return;
}
var selLayers = new Array();
for (var i=1; i comp.height);
var xOffset = (doubleUpData.favorLongerDim == widthIsLonger) ? comp.width : 0;
var yOffset = (doubleUpData.favorLongerDim == widthIsLonger) ? 0 : comp.height;
app.beginUndoGroup(doubleUpData.scriptName);
comp.width = comp.width * ((doubleUpData.favorLongerDim == widthIsLonger) ? 2 : 1);
comp.height = comp.height * ((doubleUpData.favorLongerDim == widthIsLonger) ? 1 : 2);
for (var i=0; i
关注
打赏
热门博文
- Adobe illustrator插件开发-SPInterfaceSuite-插件A向插件B传递消息-插件通信-AI插件开发
- javascript-ztree-树形控件-初始化-加载节点数据-节点数据获取
- Adobe illustrator插件开发-坐标系统-AIHardSoftSuite-画板坐标-页面坐标-AI插件开发
- Adobe illustrator插件开发-AIUIDUtilsSuite-AIUIDPoolSuite-AIUIDSuite-AIUIDREFSuite-Art唯一标识符与索引-AI插件开发
- C++-逆向分析-类的成员函数地址与对象地址动态绑定-this指针-成员函数和成员虚函数反汇编解析
- C++-逆向分析-结构体和类-内存布局-this指针-静态数据成员-对象作为参数和返回值
- Adobe illustrator插件开发-命令名称-AddCommand -AI插件开发
- Adobe illustrator插件开发-事件-PlugPlugAddEventListener-向系统注册事件-AI插件开发
- Adobe illustrator插件开发-ole拖拽粘贴交换数据格式-RegisterClipboardFormat函数-AI插件开发
- Adobe illustrator插件开发-所有模块列表-内部存在大量非公开的Suite-AI插件开发