Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
Created August 5, 2017 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecilemuller/32763644a74ee43393fac5a09d992d96 to your computer and use it in GitHub Desktop.
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
/**
* @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