レンダリング フレーム ウィンドウ(別名: 仮想フレーム バッファまたは VFB)は、3ds Max 2009 以降で反復およびプロダクション レンダリング ワークフローを実現します。
レンダラーに固有の拡張機能は、MAXScript を使用して実装されています。これは、さまざまなワークフローやサード パーティ製のレンダラーの使用を容易にするため、レンダリング フレーム ウィンドウの上部および下部に公開されているコントロールを、テクニカル
アーティストやテクニカル ディレクタが MAXScript だけを使用して拡張したり置き換えたりできることを意味します。
以下の MAXScript の追加機能は、レンダリング フレーム ウィンドウとそのプロパティへのアクセス方法およびそのパネルへの新しいロールアウトの登録方法を提供します。
イメージ ビューワの表示通知
一般イベント コールバック メカニズムに、
#preImageViewerDisplay
と
#postImageViewerDisplay
の 2 つの新しい通知が追加されました。
これらは、レンダリング フレーム ウィンドウが開かれる前と開かれた後にブロードキャストされます。
インタフェース: IVFB
callbacks.notificationParam()
メソッドは、コールバック スクリプト内で実行された場合、レンダリング フレーム ウィンドウによって公開されるプロパティとメソッドを提供する IVFB インタフェースを返します。
例:
|
次の例は、ファイル ..¥StdPlugs¥StdScripts¥VFB_Methods.ms で定義されている元のコールバックを削除し、ロールアウト パネルに新しいロールアウトを定義しています。
元の機能を復元するため、以下を評価し、
callbacks.removeScripts #preImageViewerDisplay
元のコールバックを登録するため、上で説明されているスクリプトを実行します。
もしくは、単に 3ds Max を再起動します。
|
(
global MyFirstVFBLayout --この関数はグローバルである必要があります。
fn MyFirstVFBLayout VFB_Interface = ( --コールバックによって呼び出されます。
--ウィンドウがレンダリング フレーム ウィンドウである場合、
if VFB_Interface.IsFramebuffer do (
--すべての境界線を 0 に設定して画面領域を保存します。
VFB_Interface.SetMetric #horzMarginLeft 0
VFB_Interface.SetMetric #horzMarginCenter 0
VFB_Interface.SetMetric #horzMarginRight 0
VFB_Interface.SetMetric #vertMarginTop 0
VFB_Interface.SetMetric #vertMarginCenter 0
VFB_Interface.SetMetric #vertMarginBottom 0
VFB_Interface.SetMetric #minClientWidth 320
VFB_Interface.SetMetric #minClientHeight 240
--3 つのパネルに表示する代わりのロールアウトを定義します。
rollout theTopLeftRollout "Top Left Rollout" width:200 height:45 (
dropdownlist ddl_topLeft items:#("View","Region","Crop") width:160
button btn_topLeft "Top Left Button" width:160 )
rollout theTopRightRollout "Top Right Rollout" width:200 height:50(
button btn_topLeft"Top Right Button...")
rollout theBottomRollout "Bottom Rollout" width:200 height:22(
button btn_bottomButton "Bottom Button (Try to say 3 times fast!)"
)
--左上のパネルのサイズを初期化し、
--RolloutFloater 値を元に戻します。
theTopLeftFloater = VFB_Interface.InitRolloutWindow #TopLeft 200 60
--ロールアウトを境界線およびタイトル バーなしで RolloutFloater に追加し、
addRollout theTopLeftRollout theTopLeftFloater border:false
--左上パネルの可視性を有効にします。
VFB_Interface.SetRolloutWindowVisible #TopLeft true
--右上パネルのサイズを初期化し、
--RolloutFloater 値を元に戻します。
theTopRightFloater = VFB_Interface.InitRolloutWindow #TopRight 200 60
--ロールアウトを境界線およびタイトル バー付きで RolloutFloater に追加します。
addRollout theTopRightRollout theTopRightFloater border:true
--左上パネルの可視性を有効にします。
VFB_Interface.SetRolloutWindowVisible #TopRight true
--下のパネルのサイズを初期化し、
--RolloutFloater 値を元に戻します。
theBottomFloater = VFB_Interface.InitRolloutWindow #Bottom 400 35
--ロールアウトを境界線およびタイトル バーなしで RolloutFloater に追加し、
addRollout theBottomRollout theBottomFloater border:false
--左上パネルの可視性を有効にします。
VFB_Interface.SetRolloutWindowVisible #Bottom true
VFB_Interface.InitLayout() --最後に、新しいレイアウトを初期化します。
)-- if 終了
)-- fn 終了
--関連するコールバックの登録を解除します。
callbacks.removeScripts #preImageViewerDisplay
--イメージ ビューワ表示前のコールバックを登録します。
callbacks.addScript #preImageViewerDisplay "MyFirstVFBLayout (callbacks.notificationParam())" id:#ResizeVFBPanels
)-- スクリプト終了
|