SyntaxHighlighter

2014年4月28日月曜日

プロジェクト設定

//プロジェクト設定スクリプト CS6
//=============================================================================================
//Pref_SCRIPTING_FILE_NETWORK_SECURITYの値判定

function isSecurityPrefSet(){
    var securitySetting = app.preferences.getPrefAsLong("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY");
    return (securitySetting == 1);
    }

//=============================================================================================

if (isSecurityPrefSet() == true){
/*  プロジェクト設定  */

//=============================================================================================
/*  時間の表示形式   */

//タイムコード
//app.project.timeDisplayType = TimeDisplayType.TIMECODE;
//alert (app.project.timeDisplayType)
/*  タイムコード指定時フッテージの開始時間
FTCS_START_0
FTCS_USE_SOURCE_MEDIA
*/
//app.project.footageTimecodeDisplayStartType = FootageTimecodeDisplayStartType.FTCS_USE_SOURCE_MEDIA;

//フレーム
app.project.timeDisplayType = TimeDisplayType.FRAMES;

/*  フレーム指定時にフィート+フレームのオンオフ
0
1
*/
app.project.framesUseFeetFrames = 0;

/*  フレーム指定時にフィート+フレームのタイプ指定 
MM16
MM35
*/
//app.project.feetFramesFilmType = FeetFramesFilmType.MM35;

/*  プロジェクト設定ダイアログの「フレーム数」の設定
FC_START_0
FC_START_1
FC_TIMECODE_CONVERSION で指定
*/
app.project.framesCountType = FramesCountType.FC_START_1;

//=============================================================================================
/*  カラー設定   */
/*  プロジェクトの色深度
8
16
32
*/
app.project.bitsPerChannel = 8;

/*  ガンマ1.0でカラーをブレンド
0
1
*/
app.project.linearBlending = 0;


//=============================================================================================
/*  環境設定  */

/*  読み込み設定_シーケンスフッテージ
"24.000000"
"30.000000"
*/
app.preferences.savePrefAsString("Import Options Preference Section", "Import Options Default Sequence FPS","24.000000");
/*  一般設定_ツールヒントを表示
00
01
*/    
app.preferences.savePrefAsBool("Main Pref Section", "Pref_TOOL_TIPS",01);

/*  一般設定_JavaScriptデバッガーを使用
"0"
"1"
*/ 
app.preferences.savePrefAsString("Main Pref Section", "Pref_JAVASCRIPT_DEBUGGER","1");

/*  ディスプレイ設定_情報パネルとフローチャートにレンダリングの進行状況を表示
00
01
*/ 
app.preferences.savePrefAsBool("Main Pref Section", "Pref_SHOW_INFO_FLOATER_PROGRESS",01);

//app.preferences.saveToDisk();
//app.preferences.reload();
//=============================================================================================
/*  プロジェクト設定  */

//プロジェクト設定の「時間の表示形式」に相当。タイムコードかフレームかの設定
var tDisplayType = app.project.timeDisplayType;
//タイムコード指定時フッテージの開始時間
var pfTimecodeDsiplayStartType = app.project.footageTimecodeDisplayStartType;
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
//フレーム指定時のフィート+フレームのオン・オフ設定
var pFramesUseFeetFrames = app.project.framesUseFeetFrames;
//フレーム指定時のフィート+フレームのタイプの設定
var pFeetFramesFilmType  = app.project.feetFramesFilmType;
//フレーム指定時の「フレーム数」の設定
var pFramesCountType = app.project.framesCountType;
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
//プロジェクトの色深度
var pBitPerChannel = app.project.bitsPerChannel;
//ガンマ1.0でカラーをブレンド
var pLinearBlending = app.project.linearBlending;
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
/*  環境設定  */

//読み込み設定_シーケンスフッテージ
var pPrefImportFps = app.preferences.getPrefAsString("Import Options Preference Section", "Import Options Default Sequence FPS");
//一般設定_ツールヒントを表示
var pPrefToolTips =app.preferences.getPrefAsBool("Main Pref Section", "Pref_TOOL_TIPS");
//一般設定_JavaScriptデバッガーを使用
var pPrefJavascriptDebugger = app.preferences.getPrefAsString("Main Pref Section", "Pref_JAVASCRIPT_DEBUGGER");
//ディスプレイ設定_情報パネルとフローチャートにレンダリングの進行状況を表示
var pPrefShowInfoProgress = app.preferences.getPrefAsBool("Main Pref Section", "Pref_SHOW_INFO_FLOATER_PROGRESS");

//-------------------------------------------------------------------------------------------------------------------------------------------------------------------

if  (tDisplayType == 1812){
    var tDisplayType = "表示形式>>>タイムコード";
    if (pfTimecodeDsiplayStartType == 2012){
        var  pfTimecodeDsiplayStartType = "メディアのデータを使用";
        }
    else if (pfTimecodeDsiplayStartType == 2013){
        var  pfTimecodeDsiplayStartType = "00:00:00:00";
        }
    }
else if (tDisplayType == 1813){
        var tDisplayType = "表示形式>>>フレーム";
        if  (pFramesUseFeetFrames == true){
            var pFramesUseFeetFrames = "オン";
            if (pFeetFramesFilmType == 2213){
                var pFeetFramesFilmType = "35mm";
                }
            else if (pFeetFramesFilmType == 2212){
                var pFeetFramesFilmType = "16mm";
                }       
            }
        else if (pFramesUseFeetFrames == false){
            var pFramesUseFeetFrames = "オフ";
            }
        }

if (pFramesCountType ==  2413){
    var pFramesCountType = "1から開始"
    }
else if (pFramesCountType ==  2412){
    var pFramesCountType = "0から開始"
    }
else if (pFramesCountType ==  2414){
    var pFramesCountType = "タイムコード変換"
    }

if (tDisplayType == "表示形式>>>タイムコード"){
    var timeDisplay = tDisplayType +"\n"
    + "フレーム数"+">>>"+ pfTimecodeDsiplayStartType;
    }
else if (tDisplayType = "表示形式>>>フレーム"){
    if (pFramesUseFeetFrames == "オン"){
        var timeDisplay = tDisplayType +"\n"
        + "フィート+フレーム" +  ">>>" + pFramesUseFeetFrames +"\n"
        + "表示形式" + ">>>" + pFeetFramesFilmType + "\n" 
        + "フレーム数"+">>>"+ pFramesCountType;
        }
    else if (pFramesUseFeetFrames == "オフ"){
        var timeDisplay =  tDisplayType +"\n"
        + "フィート+フレーム" +  ">>>" + pFramesUseFeetFrames +"\n"
        + "フレーム数"+">>>"+ pFramesCountType;
         }
    }
 //-------------------------------------------------------------------------------------------------------------------------------------------------------------------

if (pBitPerChannel == 8){
    var pBitPerChannel = "色深度>>>8bit/チャンネル";
    }
else if (pBitPerChannel == 16){
    var pBitPerChannel = "色深度>>>16bit/チャンネル";
    }
else if (pBitPerChannel == 32){
    var pBitPerChannel = "色深度>>>32bit/チャンネル(浮動小数点数)";
    }

if (pLinearBlending == true){
    var pLinearBlending = "ガンマ値1.0でカラーをブレンド>>>オン";
    }
else if  (pLinearBlending == false){
    var pLinearBlending = "ガンマ値1.0でカラーをブレンド>>>オフ";
    }


var colorSetting = pBitPerChannel + "\n" + pLinearBlending

//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
var importFPS = "環境設定>>>読み込み設定>>>"+pPrefImportFps+" FPS";

if (pPrefToolTips == true){
    var toolTips = "環境設定>>>一般設定>>>ツールヒントを表示>>>オン";
    }
else if  (pPrefToolTips == false){
    var toolTips = "環境設定>>>一般設定>>>ツールヒントを表示>>>オフ";
    }

if (pPrefJavascriptDebugger == "1"){
    var javascriptDebugger = "環境設定>>>一般設定>>>Javascriptデバッガーを使用>>>オン";
    }
else if  (pPrefJavascriptDebugger == "0"){
    var javascriptDebugger = "環境設定>>>一般設定>>>Javascriptデバッガーを使用>>>オフ";
    }

if (pPrefShowInfoProgress == true){
    var showInfoProgress = "環境設定>>>ディスプレイ設定>>>情報パネルに進行状況を表示>>>オン";
    }
else if  (pPrefShowInfoProgress == false){
    var showInfoProgress = "環境設定>>>ディスプレイ設定>>>情報パネルに進行状況を表示>>>オフ";
    }


alert 
(
"=============================================================="
+ "\n" 
+ "プロジェクト設定\n"
+ "\n"
+ "++++++時間の表示形式++++++\n"
+ timeDisplay + "\n"
+ "\n"
+ "++++++++カラー設定+++++++++\n"
+ colorSetting + "\n"
+ "\n"
+ "++++++++環境設定++++++++++\n"
+ "\n" 
+ importFPS
+ "\n" 
+toolTips
+ "\n" 
+javascriptDebugger
+ "\n" 
+showInfoProgress
+ "\n" 
+"=============================================================="
)


}
else{
alert ("環境設定>\n一般設定>\nスクリプトによるファイルへの書き込みとネットワークへのアクセス許可\n↑\nのチェックをオンにしてください、スクリプト実行時に必要な場合があります");

}

2014年4月21日月曜日

Launch Pad.jsxを複数起動する方法

Launch Pad.jsxを複数起動する方法
launchPad_scriptsFoloderの部分をすべて置換、スクリプト本体の名前も同様にリネームします
スクリプト本体の置き場所はLaunch Pad.jsxと同じで下記にしておかないとフローティングパネル化しないと思います
C:\Program Files\Adobe\Adobe After Effects CS[各バージョン]\Support Files\Scripts\ScriptUI Panels
初回起動時にLaunch Padに表示するスクリプトの場所を聞かれます

2014年4月8日火曜日

タイムリマップのオンオフ

control = thisComp.layer("expNull").effect("timeRemapOnOff")("チェックボックス") ;

if (control == 1){
value;
}else{
time;
}