このコールバックは、カスタム ディスプレイと Softimage 間のやりとりを管理するために使用します。 選択、値、または時間に変更があると、Softimage は該当の通知オブジェクトが捕捉できる通知を送信します。
このコールバックは入力として ViewContext オブジェクトを取ります。また、このオブジェクトは、次のいずれかのビュー通知オブジェクトを取得するために使用できます。
void <custom_display_name>_Notify( CRef& in_context )
{
...
}
|
<custom_display_name> は、PluginRegistrar::RegisterCustomDisplay の呼び出しで指定されている名前です。この名前に含まれるスペースはアンダースコアに置き換えられます。
| パラメータ | タイプ | 詳細 |
|---|---|---|
| in_context | CRef& | ViewContext オブジェクトへのリファレンス。 |
CStatus XSILoadPlugin( PluginRegistrar& in_reg )
{
// Set installation options
in_reg.PutVersion( 1, 0 );
// ... (see PluginRegistrar for details)
// Register your custom display (view)
CStatus in_reg.RegisterCustomDisplay( L"MyCustomDisplayName" );
}
CStatus MyCustomDisplayName_Init( CRef& in_context )
{
// Get the Softimage parent window handle to use to create a child window
ViewContext ctx( in_context );
HWND hParent = ctx.GetParentWindowHandle();
// Create a new window as a child of the Softimage parent window
HWND hChild = CreateDialog( MyDllInstance,
MAKEINTRESOURCE(IDD_MYCUSTOMWINDOW), hParent, (DLGPROC)MyWindowProc );
// ...
}
CStatus MyCustomDisplayName_Notify( CRef& in_context )
{
// Get the notification data through the ViewContext object
ViewContext ctx( in_context );
siEventID in_eNotifcation;
void* in_pData;
ctx.GetNotificationData ( in_eNotifcation, &in_pData );
// Notification handlers
switch ( in_eNotifcation )
{
case siOnSelectionChange:
{
// If selection changed...
}
case siOnTimeChange:
{
// If time changed...
}
case siOnValueChange:
{
// If value changed...
}
}
// ...
}
|