2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

プロジェクト内で、選択されたフォルダ内のコンポを取得するスクリプト

Last updated at Posted at 2015-11-16

AfterEffectsのスクリプト(jsx)で、選択されたフォルダ内のコンポを取得する。

select_compo_in_folder.jsx
//まず選択されているコンポを取得
for (var i=1; i<=app.project.items.length; i++)
{
    if( app.project.item(i).selected ){
        srcCompos.push(app.project.item(i));

        //タイプがフォルダーだったら
        if( app.project.item(i).typeName == "フォルダー"){
            myFunc(app.project.item(i).items);
        }
    }
}


var myFunc = function (items){
    for(var i=1; i<=items.length;i++){
        //ファイル名をアラート
        alert(items[i].name);
    }
}

参考

AEスクリプトはここを参考にした。
http://www.openspc2.org/book/AfterEffectsCS4/
https://sites.google.com/site/annamillersclub/script-menu/gyakubikiscript
http://aejsx.hiroshisaito.net/reversereference
それでもわからない場合は、本家のPDFを参考にした。
http://blogs.adobe.com/aftereffects/files/2012/06/After-Effects-CS6-Scripting-Guide.pdf

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?