Skip to content

Instantly share code, notes, and snippets.

@hmasato
Created May 10, 2013 04:39
Show Gist options
  • Save hmasato/5552408 to your computer and use it in GitHub Desktop.
Save hmasato/5552408 to your computer and use it in GitHub Desktop.
[AfterEffects] _seqInfo_min.jsx
(function (me)
{
var prj=app.project;
function _indexOf(arr, itm){
for(var i=0; i<arr.length; i++) if(arr[i]==itm) return(i);
return(-1);
}
function _note(arr)
{
var fn="note.txt";
if(prj.file!=null) fn=prj.file.name+".txt";
var f=new File(Folder.temp.fullName+"/"+fn);
if(!f.open("w")) return;
try{
for(var i=0; i< arr.length; i++) f.writeln(arr[i]);
f.close();
}catch(e){
return;
}
f.execute();
}
{
var arr=[];
for(var i=0; i< prj.numItems; i++){
var e=prj.item(i+1);
if(!(e instanceof FootageItem)) continue;
if(e.file == null) continue;
var n=e.file.fsName;
if(_indexOf(arr, n) < 0) arr.push(n);
}
if(arr.length>0) _note(arr);
}
})(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment