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

概要

dragAttrContext [-connectTo name] [-exists] [-history boolean] [-image1 string] [-image2 string] [-image3 string] [-name string] [-reset] [name]

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

dragAttrContext によって、ビューポート内でバーチャル スライダを使用してオブジェクトのアトリビュートを操作できます。バーチャル スライダは、ビューポート内で中マウス ボタンを押しながらドラッグして使用します。アトリビュートが変更されるスピードのコントロールは、スピードを下げるには Ctrl キーを押したままで、スピードを上げるには Shift キーを押したままでできます。

戻り値

string作成されたコンテキストの名前

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

フラグ

connectTo, exists, history, image1, image2, image3, name, reset
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-connectTo(-ct) name createqueryeditmultiuse
コンテキストを接続するアトリビュートを指定します。これは多目的フラグですが、使用するすべてのアトリビュートは 1 つのオブジェクトに属している必要があります。
-exists(-ex) create
指定したオブジェクトが存在するかどうかによって、true または false を返します。他のフラグは無視されます。
-history(-ch) boolean create
ツール コマンドの場合、対象となるツールのコンストラクション ヒストリをオンにします。
-image1(-i1) string createqueryedit
コンテキストに関連付けられているツールを表す 3 つの可能なアイコンの中の最初のアイコンです。
-image2(-i2) string createqueryedit
コンテキストに関連付けられているツールを表す 3 つの可能なアイコンの中の 2 番目のアイコンです。
-image3(-i3) string createqueryedit
コンテキストに関連付けられているツールを表す 3 つの可能なアイコンの中の 3 番目のアイコンです。
-name(-n) string create
これがツール コマンドの場合、ツールに適切に名前を付けます。
-reset(-r) createedit
コンテキストを接続するアトリビュートのリストをリセットします。

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

MEL 例

polyPlane -w 10 -h 10 -sx 3 -sy 3 -ax 0 1 0 -tx 1 -ch 1;

dragAttrContext myDragAttrContext;

// Example 1: Move along X direction and rotate around X at the same time.
dragAttrContext -edit
       -connectTo pPlane1.translateX
       -connectTo pPlane1.rotateX
       myDragAttrContext;
setToolTo myDragAttrContext;

// Example 2: Extrude a face and then modify the distance that it is extruded by.
polyExtrudeFacet -ch 1 -kft 0 -pvx -1.633333373 -pvy -1.111623654 -pvz 3.142515589 -tx 0 -ty 0 -tz 0 -rx 0 -ry 0 -rz 0 -sx 1 -sy 1 -sz 1 -ran 0 -divisions 1 -twist 0 -taper 1 -off 0 -ltz 0 -ws 0 -ltx 0 -lty 0 -lrx 0 -lry 0 -lrz 0 -lsx 1 -lsy 1 -lsz 1 -ldx 1 -ldy 0 -ldz 0 -w 0 -gx 0 -gy -1 -gz 0 -att 0 -mx 0 -my 0 -mz 0 -sma 30 pPlane1.f[0];
dragAttrContext -edit -connectTo polyExtrudeFace1.localTranslateZ myDragAttrContext;
setToolTo myDragAttrContext;

// Example 3: Do a wedge face and modify both the number of divisions and the
// angle at the same time.
polyWedgeFace -ws 1 -wedgeAngle 90 -divisions 4 -ed 30 -ch 1 pPlane1.f[0] pPlane1.e[30];
dragAttrContext -edit -connectTo polyWedgeFace1.wedgeAngle
       -connectTo polyWedgeFace1.divisions
       myDragAttrContext;
setToolTo myDragAttrContext;