ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud Debate

After Effects Script - loop through selected items

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Stephen KennedyAfter Effects Script - loop through selected items
by on Jan 21, 2012 at 9:15:26 am

Hi,

I've just started trying to write my first script for AE. Have managed to cobble together a script that executes fine for a single selected item, but I can't seem to find a way to build a for loop to execute the script for every selected item. The script simply takes the item (which will be an image sequence), places it in a new 1920x1080 comp, adds a Transform effect and rescales to 150%. Can anyone help me build a loop for this?
Here is the code:

var mySelection = app.project.activeItem
var myComp = app.project.items.addComp(mySelection.name, 1920, 1080, 1, mySelection.duration, 24)
var myLayer = myComp.layers.add(mySelection)
var myTransform = myLayer.Effects.addProperty("Transform")
myTransform.property(4).setValue(150)


Posts IndexRead Thread


Current Message Thread:





© 2016 CreativeCOW.net All Rights Reserved
[TOP]