AfterEffectsでiPhone用アニメーションイメージ生成
//created by @swifee | |
#target "aftereffects" | |
var activeItem = app.project.activeItem; | |
if ((activeItem == null) || !(activeItem instanceof CompItem)) { | |
alert("コンポジションを選択した状態でスクリプトを実行して下さい。"); | |
}else{ | |
var comp_x = activeItem.width; | |
var comp_y = activeItem.height; | |
var comp_fDur = activeItem.frameDuration; | |
var comp_dur = activeItem.duration/comp_fDur; | |
var newComp = app.project.items.addComp("CombinedImage", comp_x, comp_y*comp_dur, 1, 1, 1); | |
var t; | |
for(i=0;i<comp_dur;i++){ | |
t = newComp.layers.add(activeItem); | |
t.anchorPoint.setValue([0, 0, 0]); | |
t.position.setValue([0, comp_y*i, 0]); | |
t.timeRemapEnabled = true; | |
t.timeRemap.setValueAtTime(0, i*comp_fDur); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment