Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tree;
- var selection;
- var angles;
- var comp;
- var shotToFind;
- var shotItems;
- var shotItem;
- var shot;
- var item;
- var wide;
- var closeup;
- var comp;
- var shotOne;
- var shotTwo;
- var shotThree;
- var wideFile;
- var closeupFile;
- var textValue;
- var textLayer;
- var textDocument;
- selection = app.project.selection;
- {
- for (var i = 0, il = selection.length; i <il; i++) {
- tree = selection[i].name.substring(1, 5);
- angles = ["A" + tree, "B" + tree];
- wide = angles[0] + ".MXF";
- closeup = angles[1] + ".MXF";
- wideFile = angleFileFinder(wide);
- closeupFile = angleFileFinder (closeup);
- sidebarsFile = sidebarsFileFinder ("Side_Bars");
- comp = app.project.items.addComp (tree, 1920, 1080, 1, 30 + closeupFile.duration, 25);
- var layers = comp.layers;
- shotOne = layers.add(wideFile);
- shotThree = layers.add(wideFile);
- layers.add(sidebarsFile);
- shotTwo = layers.add(closeupFile);
- textLayer = layers.addText("Tree " + tree);
- textDocument = textLayer.property("Source Text");
- textValue = textDocument.value;
- textValue.font = "Arial-BoldMT";
- textValue.fontSize = 80;
- textValue.fillColor = [1, 1, 1];
- textValue.strokeWidth = 3;
- textValue.justification = ParagraphJustification.CENTER_JUSTIFY;
- textDocument.setValue(textValue);
- textLayer.property('ADBE Transform Group').property('ADBE Position').setValue([
- comp.width/2,
- comp.height - 50
- ]);
- shotOne.startTime = -5;
- shotOne.inPoint = 0;
- shotOne.outPoint = 15;
- shotTwo.startTime = 15;
- shotTwo.outPoint = 15 + closeupFile.duration;
- shotThree.startTime = closeupFile.duration;
- shotThree.inPoint = closeupFile.duration + 15;
- shotThree.outPoint = shotThree.inPoint + 15;
- comp.openInViewer();
- }
- function angleFileFinder (theName) {
- var fileIndex;
- for (var i = 1, il = app.project.numItems; i < il; i++) {
- fileIndex = app.project.item(i);
- if (fileIndex.name === theName) {
- return fileIndex;
- }
- }
- }
- function sidebarsFileFinder (theName) {
- var fileIndex;
- for (var i = 1, il = app.project.numItems; i < il; i++) {
- fileIndex = app.project.item(i);
- if (fileIndex.name === theName) {
- return fileIndex;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement