ジャンプ先: 概要. 戻り値. フラグ. Python 例.
contextInfo(
[context name]
, [c=boolean], [escapeContext=boolean], [exists=boolean], [image1=boolean], [image2=boolean], [image3=boolean], [title=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
contextInfo は、取り消し可能、照会可能、および編集可能です。
このコマンドで、指定したコンテキストについての情報を取得できます。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
c, escapeContext, exists, image1, image2, image3, title
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
# Create a particle tool context, then switch to it
cmds.dynParticleCtx('dynParticleCtx1')
cmds.setToolTo('dynParticleCtx1')
# Get the class type of the current context
ctx = cmds.currentCtx()
cmds.contextInfo(ctx, c=True)
# Result: dynParticle #
# Get the title of the current context
cmds.contextInfo(ctx, t=True)
# Result: Particle Tool #