UIコールバック
After Effects は、推測や OS に直接問い合わせることなく、座標系間で転置し、描画コンテキストに関する OS 固有の情報を取得するためのコールバックを提供します。これらのコールバックを使用してください。これらのコールバックへのポインタは、PF_EventCallbacks で提供されます。これらのルーチンにアクセスするには、AE_EffectUI.h および AE_EffectCB.h のマクロを使用します。
座標系転置コールバックを実装せずに、カスタム UI を利用する機能するプラグインを構築することができます。ただし、ユーザーがレイヤー パネルにズームインしたり、レイヤーを回転したりすると、プラグインの動作がおかしくなります。これらのマクロとコールバックを追加したことで、開発者にユーザー インターフェイスのオーバーヘッドを与えることなく、カスタム ユーザー インターフェイスを After Effects UI に簡単に統合できるようになりました。またぜひご利用ください!
これらのマクロは、簡略化するために refcon およびコンテキスト ハンドルをデフォルトに設定します。 refcon は、「extra」という名前のローカル変数があることを前提としています。デフォルトのコンテキストは現在のコンテキストです。これらのデフォルト パラメーターは、PF_EventCallbacks 構造体 (AE_EffectUI.h 内) で定義されます。 PF_EventExtra 構造体を通じてコールバックにアクセスすることで、デフォルトをオーバーライドできます。ヘッダー ファイル内のマクロの変更はお勧めしません (またはサポートしません)。やめてください!
| Function | Purpose |
|---|---|
layer_to_comp | Transforms layer panel coordinates to the composition panel coordinates.PF_Err layer_to_comp ( |
comp_to_layer | Transforms composition panel coordinates to the layer panel coordinates.PF_Err comp_to_layer ( |
get_comp2layer_xform | Returns the matrix used to convert from the composition panel to the layer panel. If *exists returns FALSE, the matrix cannot be computed because the layer scales to zero.PF_Err get_comp2layer_xform ( |
get_layer2comp_xform | Returns the transformation matrix used to convert from the layer panel to the composition panel. This always exists. PF_Err get_layer2comp_xform ( |
source_to_frame | Transforms the source coordinates in the current context to screen coordinates. Screen (frame) coordinates are affected by the current zoom level. PF_Err source_to_frame( |
frame_to_source | Transforms the screen coordinates identified by *pt to the source coordinates of the current context.PF_Err frame_to_source( |
PF_GET_PLATFORM_DATA | Retrieves platform-specific data. For plug-ins loaded with localized resource files, PF_PlatData_RES_FILE_PATH will point to the external file, not the plug-in file.Use PF_PlatData_EXE_FILE_PATH if you want the path of your plug-in.Starting in CS6, use PF_PlatData_EXE_FILE_PATH_W and PF_PlatData_RES_FILE_PATH_W instead of the old non-wide calls.PF_Err PF_GET_PLATFORM_DATA (PF_PlatDataID can have the following values:- PF_PlatData_MAIN_WND- PF_PlatData_EXE_FILE_PATH_DEPRECATED- PF_PlatData_RES_FILE_PATH_DEPRECATED- PF_PlatData_RES_REFNUM // macOS- PF_PlatData_RES_DLLINSTANCE // Win- PF_PlatData_BUNDLE_REF- PF_PlatData_EXE_FILE_PATH_W // new CS6- PF_PlatData_RES_FILE_PATH_W // new CS6 |