ジャンプ先: 概要. 戻り値. フラグ. MEL 例.

概要

contextInfo [-class] [-escapeContext] [-exists] [-image1] [-image2] [-image3] [-title] [context name]

contextInfo は、取り消し可能、照会可能、および編集可能です。

このコマンドで、指定したコンテキストについての情報を取得できます。

戻り値

string要求された情報

照会モードでは、戻り値のタイプは照会されたフラグに基づきます。

フラグ

class, escapeContext, exists, image1, image2, image3, title
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-class(-c) create
指定したコンテキストのクラス タイプを返します。
-escapeContext(-esc) create
現在のツールを終了できるコマンド文字列を返します。
-exists(-ex) create
コンテキストが存在する場合は true を、存在しない(または内部的なもので操作できない)場合は false を返します。
-image1(-i1) create
指定したコンテキストに関連付けられた xpm の名前を返します。
-image2(-i2) create
指定したコンテキストに関連付けられた xpm の名前を返します。
-image3(-i3) create
指定したコンテキストに関連付けられた xpm の名前を返します。
-title(-t) create
指定したコンテキストのタイトル文字列を返します。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

MEL 例

// Create a particle tool context, then switch to it
dynParticleCtx dynParticleCtx1;
setToolTo dynParticleCtx1;

// Get the class type of the current context
string $ctx = `currentCtx`;
contextInfo -c $ctx;
// Result: dynParticle //

// Get the title of the current context
contextInfo -t $ctx;
// Result: Particle Tool //