//必要な情報を取得
var oCam = GetViewCamera(-1);
var oViews = GetValue(oCam)
var oCurrentPass = GetCurrentPass();
var oCurrentPassName = oCurrentPass.name
var oPicturesFolder = Application.ActiveProject2.Path + "\\Pictures\\"
var oCurrentFrame = GetValue("PlayControl.Current");
var oRenderer = GetValue(oCurrentPass + ".Renderer");
var oFilename = GetValue(oCurrentPass + ".Main.Filename");
var oFormat = GetValue(oCurrentPass + ".Main.Format");
var oRendCam = GetValue(oCurrentPass + ".Camera");
//スクリーンショット用の設定にセット
SetValue(oCurrentPass + ".Renderer", "Hardware Renderer", null);
SetValue(oCurrentPass + ".Main.Filename",oPicturesFolder + oCurrentPassName + "_ScreenShot", null);
SetValue(oCurrentPass + ".Main.Format", "psd", null);
SetValue(oCurrentPass + ".Camera", oViews, null);
//現在のフレームでレンダ
RenderPasses(oCurrentPass, oCurrentFrame, oCurrentFrame, 1, siRenderVerbosityDefault);
//元の設定に戻す
SetValue(oCurrentPass + ".Renderer", oRenderer, null);
SetValue(oCurrentPass + ".Main.Filename", oFilename, null);
SetValue(oCurrentPass + ".Main.Format", oFormat, null);
SetValue(oCurrentPass + ".Camera", oRendCam, null);
なんか頭悪い感じするのは気のせいではありません(´・ω:;.:...
2014/03/26
アクティブビューでスクリーンショット的なアレ
何となく作って、最近よく使うスクリプト。
アクティブビューでスクリーンショット的なアレ。
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿