var numItems = app.project.numItems;
for(i = 1; i <= numItems; i++) {
if(app.project.item(i).typeName == "フッテージ") {
if( !app.project.item(i) ) continue;
var cItem = app.project.item(i).file;
if( !cItem ) continue;
var cItemPath = cItem.path;
var cItemName = cItem.name;
//拡張子
var fooPattern = /(.+)(\.[^.]+$)/;
var tExt = cItemName.match(fooPattern)[2];
var cItemExt = tExt;
//alert (cItemExt);
//alert (cItemName);
var psdExt = "psd"
var cItemFullPath = cItemPath + "/" + cItemName;
// 置換処理++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var rFilePath = cItemPath.replace(/y/, "x");
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var rFileFullPath = rFilePath + "/" + cItemName;
//alert (rFileFullPath)
var cItemMainSource = app.project.item(i).mainSource;
var cFrameRate = cItemMainSource.conformFrameRate;
var dFrameRate = cItemMainSource.displayFrameRate;
var nFrameRate = cItemMainSource.nativeFrameRate;
//alert (cFrameRate +"_"+ dFrameRate +"_"+ nFrameRate);
if( cItemMainSource.isStill == true ) {
if ( cItemExt == ".psd" ){
//alert ("psdファイルはスキップします")
}
else if ( cItemExt == ".PSD" ){
//alert ("PSDファイルはスキップします")
}
else{
var cFootageImageName = (rFileFullPath);
var cFootageImageName = decodeURI(cFootageImageName);
//alert (cFrameRate +"_"+ dFrameRate +"_"+ nFrameRate);
//alert (cFootageImageName , "イメージ")
app.project.item(i).replace(new File(cFootageImageName));
}
}
else{
if( cFrameRate == 0 ){
var cFootageMsName = (rFileFullPath);
var cFootageMsName = decodeURI(cFootageMsName);
//alert (cFrameRate +"_"+ dFrameRate +"_"+ nFrameRate);
//alert (cFootageMsName , "ムービかサウンド")
app.project.item(i).replace(new File(cFootageMsName));
}
else{
var cFootageSeqName = (rFileFullPath);
var cFootageSeqName = decodeURI(cFootageSeqName);
//alert (cFrameRate +"_"+ dFrameRate +"_"+ nFrameRate);
//alert (cFootageSeqName , "連番イメージ")
try{
app.project.item(i).replaceWithSequence(new File(cFootageSeqName),false);
} catch(err) {
var msg = cFootageSeqName + "はファイルが無いようです";
alert(msg);
}
}
}
}
}
alert ("ドライブレターの変更終了")
0 件のコメント:
コメントを投稿