042、AE脚本-开始你的第一个AE脚本
https://zhuanlan.zhihu.com/p/397252066Be5视线点
006、AE脚本-如何判断AE中的图层是否是图层?
https://zhuanlan.zhihu.com/p/392774266Be5视线点
AE脚本折腾入门(一)
https://zhuanlan.zhihu.com/p/63622672Be5视线点
Be5视线点
AE脚本学习Be5视线点
https://so.csdn.net/so/search?q=after&t=blog&u=m0_67316550Be5视线点
http://cn.voidcc.com/question/p-dnjvlejw-br.htmlBe5视线点Be5视线点AE脚本例句Be5视线点https://www.kancloud.cn/zhenhuamcu/aejiaoben/1086102Be5视线点
AE脚本一些用法
https://blog.csdn.net/xdhstc/article/details/52329616Be5视线点
Be5视线点
1,在AE中创建文件夹:Be5视线点app.project.items.addFolder("myFolder");
Be5视线点Be5视线点2,判断文件夹是否存在:Be5视线点function judgeLayer(layername) { for(var i = 1; i <= app.project.numItems; i++) { if(app.project.item(i).name == layername) { return false; } } return true; };
Be5视线点Be5视线点3,找到一个文件夹对象:Be5视线点function findFolderItemByName(name){ var found = false; for (i = 1; i <= app.project.numItems; i++){ if (app.project.item(i).name == name && app.project.item(i) instanceof FolderItem ){ var myFolder = app.project.item(i); found = myFolder; break } } return found; }
Be5视线点Be5视线点4,把文件或者文件夹放入一个父级文件夹中:Be5视线点childFolder.parentFolder = findFolderItemByName("parentFolderName");
Be5视线点Be5视线点5,获取电脑中某个文件夹中的内容:Be5视线点var folderObj = new Folder("folderPath"); var moveFileList = folderObj.getFiles();
Be5视线点Be5视线点6,导入序列文件到AE中:Be5视线点var io = new ImportOptions(); io.file = new File("filePath"); io.sequence = true; io.forceAlphabetical = true; mySeq = app.project.importFile(io); myDuration = mySeq.duration;<span style="font-family: Arial, Helvetica, sans-serif;"> </span><span style="font-family: Arial, Helvetica, sans-serif;"> </span>
Be5视线点myDuration参数表示导入的帧数
Be5视线点Be5视线点7,新建Comp:Be5视线点var myComp = app.project.items.addComp("testComp", 1920, 1080, 1, 150/25, 25);
Be5视线点这里的150/25表示的是,总共150帧,因为addComp函数接受的参数的单位是秒。
Be5视线点Be5视线点8,设置Comp的起始时间:Be5视线点myComp.displayStartTime = 2/25;
Be5视线点这里是设置起始帧为1
Be5视线点Be5视线点9,将Comp中加Layer:Be5视线点myComp.layers.add(myLayer);
Be5视线点Be5视线点10,设置Comp中某层的某属性:Be5视线点myComp.layers.byName("test").Scale.setValue([80,80]);
Be5视线点Be5视线点11,将Comp中某层移到最下:Be5视线点myComp.layers.byName("test").moveToEnd();
Be5视线点Be5视线点12,设置某层的时间:Be5视线点var nowF = (inComp.layer(1).outPoint - inComp.layer(1).inPoint); var tarF = timeDuration; var stretchValue = 100*tarF/nowF; inComp.layer(1).stretch = stretchValue;
Be5视线点Be5视线点13,设置某层的matteBe5视线点myLayer.trackMatteType= TrackMatteType.ALPHA
Be5视线点Be5视线点14,给某层加特效Be5视线点myLayer.Effects.addProperty("Roughen Edges")("Border").setValue(0); myLayer("Effects")("Roughen Edges")("Scale").setValue(170);
Be5视线点Be5视线点15,加solid层Be5视线点mySolidLayer = timeCodeComp.layers.addSolid([0,0,0],"solid",1920,1080,1,80/25);
Be5视线点Be5视线点16,给solid层加矩形maskBe5视线点newMask = mySolidLayer.Masks.addProperty("ADBE Mask Atom"); newMask.maskMode = MaskMode.ADD; newMask.color = [1,1,0]; myProperty = newMask.property("ADBE Mask Shape"); myShape = myProperty.value; myShape.vertices = [[600, 70], [600,164], [38,164],[38,70]]; myShape.closed = true; myProperty.setValue(myShape);
Be5视线点Be5视线点17,加text层Be5视线点newText = new TextDocument("test"); var theTextLayer = timeCodeComp.layers.addText(newText); theTextLayer.Position.setValue([163,143]); var textProp = theTextLayer.property("Source Text"); var textDocument = textProp.value; textDocument.fontSize=59; textDocument.font = "Microsoft YaHei"; textDocument.justification = ParagraphJustification.CENTER_JUSTIFY; textProp.setValue(textDocument);
Be5视线点Be5视线点18,激活某个compBe5视线点myComp.openInViewer();
Be5视线点