Created
August 5, 2017 19:53
-
-
Save cecilemuller/32763644a74ee43393fac5a09d992d96 to your computer and use it in GitHub Desktop.
After Effect: create a composition per footage and postprocess it using Mettle Skybox Blur
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file Creates a composition for every panorama and adds 360 blur. | |
*/ | |
var renderQueue = app.project.renderQueue; | |
var footages = new Array(); | |
for (i = 1; i <= app.project.numItems; i++){ | |
var item = app.project.item(i); | |
if ((item instanceof FootageItem) && (item.mainSource instanceof FileSource) && (item.mainSource.isStill)){ | |
footages.push(item.id); | |
} | |
} | |
var l = footages.length; | |
for (var i = 0; i < l; i++){ | |
var footage = app.project.itemByID(footages[i]); | |
var comp = app.project.items.addComp("panorama-" + i, footage.width, footage.height, 1, 1, 1); | |
var layer = comp.layers.add(footage); | |
var effect = layer("Effects").addProperty("Skybox Blur"); | |
effect.Blurriness.setValue(175); | |
var queueItem = renderQueue.items.add(comp); | |
queueItem.outputModule(1).applyTemplate("PNG Sequence"); | |
queueItem.outputModule(1).file = new File("Output/panorama-" + i + "-[#].png"); | |
} | |
renderQueue.render(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment