ジャンプ先: 概要. 戻り値. フラグ. Python 例.
buttonManip(
script [selectionItem]
, [icon=string])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
buttonManip は、取り消し可能、照会不可能、および編集不可能です。
このコマンドは、ボタン マニピュレータを作成します。このマニピュレータは空間内に位置し、位置決めのために 3 ポイント マニピュレータを持っています。マニピュレータの上部をクリックすると、1 番目の引数によって定義されたコマンドが実行されます。このコマンドは、作成されたときのマニピュレータに関連付けられています。DAG オブジェクトがコマンド ラインに含まれる場合、マニピュレータはそのオブジェクトにペアレント化されます。これは、オブジェクトを移動すると、マニピュレータも移動することを意味します。三つ組のマニピュレータを使って、マニピュレータをオブジェクトと独立して移動することができます。
buttonManip は複数のオブジェクトに対してペアレント化できないことに注意してください。
なし
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
icon(i)
|
string
|
|
||
|
||||
import maya.cmds as cmds # Example 1. # # Create a button manipulator that will be parented to a sphere and will # print "Button Manipulator" whenever it is pressed. # # Note that moving the sphere will also move the manipulator. # sphere = cmds.sphere() cmds.buttonManip( 'print "Button Manipulator"', sphere[0]) # Example 2. # # Create a button manipulator that will execute the 'setKeyframe' command # when it is pressed. # cmds.buttonManip( 'setKeyframe' )