ジャンプ先: 概要. 戻り値. フラグ. Python 例.
manipRotateContext(
[object]
, [activeHandle=int], [alignAlong=[float, float, float]], [centerTrackball=boolean], [constrainAlongNormal=boolean], [currentActiveHandle=int], [editPivotMode=boolean], [editPivotPosition=boolean], [exists=boolean], [image1=string], [image2=string], [image3=string], [lastMode=int], [manipVisible=boolean], [mode=int], [modifyTranslation=boolean], [orientAxes=[float, float, float]], [orientObject=string], [orientTowards=[float, float, float]], [pinPivot=boolean], [pivotOriHandle=boolean], [position=boolean], [postCommand=script], [postDragCommand=[script, string]], [preCommand=script], [preDragCommand=[script, string]], [preserveChildPosition=boolean], [preserveUV=boolean], [reflection=boolean], [reflectionAbout=int], [reflectionAxis=int], [reflectionTolerance=float], [rotate=[float, float, float]], [snap=boolean], [snapPivotOri=boolean], [snapPivotPos=boolean], [snapRelative=boolean], [snapValue=float], [tweakMode=boolean], [useCenterPivot=boolean], [useManipPivot=boolean], [useObjectPivot=boolean], [xformConstraint=string])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
manipRotateContext は、取り消し可能、照会可能、および編集可能です。
回転マニピュレータ コンテキストの作成、編集、照会を実行するときに使用します。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
activeHandle, alignAlong, centerTrackball, constrainAlongNormal, currentActiveHandle, editPivotMode, editPivotPosition, exists, image1, image2, image3, lastMode, manipVisible, mode, modifyTranslation, orientAxes, orientObject, orientTowards, pinPivot, pivotOriHandle, position, postCommand, postDragCommand, preCommand, preDragCommand, preserveChildPosition, preserveUV, reflection, reflectionAbout, reflectionAxis, reflectionTolerance, rotate, snap, snapPivotOri, snapPivotPos, snapRelative, snapValue, tweakMode, useCenterPivot, useManipPivot, useObjectPivot, xformConstraint
| ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
|
activeHandle(ah)
|
int
|

|
|
マニピュレータの既定のアクティブ ハンドルを設定します。つまり、ツールを有効にしたとき最初にアクティブにするハンドルです。次の値を指定することができます。
- 0 - X 軸ハンドルがアクティブ
- 1 - Y 軸ハンドルがアクティブ
- 2 - Z 軸ハンドルがアクティブ
- 3 - 表示回転ハンドル(外側リング)がアクティブ(既定)
|
|
alignAlong(aa)
|
[float, float, float]
|

|
|
|
centerTrackball(ctb)
|
boolean
|
 
|
|
中心がトラックボールと同様に処理されるようにするかどうかを指定します。
|
|
constrainAlongNormal(xn)
|
boolean
|

|
|
true の場合は、最初に頂点法線方向にトランスフォーム コンストレイントが適用されます。法線方向に交差が検出されなかった場合は、最近接ポイントのみが使用されます。
|
|
currentActiveHandle(cah)
|
int
|

|
|
マニピュレータのアクティブ ハンドルを設定します。次の値を指定することができます。
- 0 - X 軸ハンドルがアクティブ
- 1 - Y 軸ハンドルがアクティブ
- 2 - Z 軸ハンドルがアクティブ
- 3 - 表示回転ハンドル(外側リング)がアクティブ
- 4 - 円弧ボールがアクティブ
|
|
editPivotMode(epm)
|
boolean
|
|
|
マニピュレータが編集ピボット モードにある場合は true を返します。
|
|
editPivotPosition(epp)
|
boolean
|
|
|
編集ピボット マニピュレータの現在位置を返します。
|
|
exists(ex)
|
boolean
|
|
|
指定したオブジェクトが存在するかどうかによって、true または false を返します。他のフラグは無視されます。
|
|
image1(i1)
|
string
|
 
|
|
コンテキストに関連付けられているツールを表す 3 つの可能なアイコンの中の最初のアイコンです。
|
|
image2(i2)
|
string
|
 
|
|
コンテキストに関連付けられているツールを表す 3 つの可能なアイコンの中の 2 番目のアイコンです。
|
|
image3(i3)
|
string
|
 
|
|
コンテキストに関連付けられているツールを表す 3 つの可能なアイコンの中の 3 番目のアイコンです。
|
|
lastMode(lm)
|
int
|
|
|
|
manipVisible(vis)
|
boolean
|
|
|
回転マニピュレータが表示されている場合は true を返します。
|
|
mode(m)
|
int
|

|
|
回転 モード:
- 0 - オブジェクト空間(既定)
- 1 - ワールド空間
- 2 - ジンバル(Gimbal)モード
- 3 - カスタム軸方向
- 10 - コンポーネント空間
|
|
modifyTranslation(mt)
|
boolean
|

|
|
false の場合で、オブジェクトがその回転ピボット以外の点を中心として回転されている場合は、オブジェクトを正しい位置に配置するように rotateTranslate アトリビュートは修正されます。true の場合、移動アトリビュートが代わりに使用されます。既定は false です。
|
|
orientAxes(oa)
|
[float, float, float]
|

|
|
軸を中心に回転するマニピュレータの向きを指定した角度だけ変えます。
|
|
orientObject(oo)
|
string
|

|
|
マニピュレータを、渡されたオブジェクト/コンポーネントの方向に位置合わせします。
|
|
orientTowards(ot)
|
[float, float, float]
|

|
|
アクティブ ハンドルをワールド ポイント方向へ向けます。
|
|
pinPivot(pin)
|
boolean
|

|
|
コンポーネント ピボットを固定します。コンポーネント ピボットが設定され、固定されると、選択項目の変更によってピボットの位置と方向がリセットされなくなります。
|
|
pivotOriHandle(poh)
|
boolean
|

|
|
true の場合は、編集中にピボット マニピュレータは方向ハンドルを表示します。既定は true です。
|
|
position(p)
|
boolean
|
|
|
|
postCommand(psc)
|
script
|

|
|
ツールを終了したときに実行されるコマンドを指定します。
|
|
postDragCommand(pod)
|
[script, string]
|

|
|
コマンドおよびノード タイプを指定します。このコマンドは、指定されたタイプのノードが選択範囲内に入っているときに、ドラッグを終了すると実行されます。
|
|
preCommand(prc)
|
script
|

|
|
ツールを開始したときに実行されるコマンドを指定します。
|
|
preDragCommand(prd)
|
[script, string]
|

|
|
コマンドおよびノード タイプを指定します。このコマンドは、指定されたタイプのノードが選択範囲内に入っているときに、ドラッグを開始すると実行されます。
|
|
preserveChildPosition(pcp)
|
boolean
|

|
|
false の場合は、親が回転したときに子オブジェクトは移動します。true の場合は、親が移動しても子のワールド空間位置は維持されます。既定は false です。
|
|
preserveUV(puv)
|
boolean
|

|
|
false の場合、uv は頂点の編集に合わせて変更されません。true の場合、頂点の移動につれてテクスチャがずれるのを止めるため、新しい値を投影するように uv が編集されます。
|
|
reflection(rfl)
|
boolean
|
|
|
このフラグは現在サポートしていません。対称(Reflection)は、symmetricModeling コマンドを使用した選択自体の一部として管理されます。
|
|
reflectionAbout(rab)
|
int
|
|
|
このフラグは現在サポートしていません。対称(Reflection)は、symmetricModeling コマンドを使用した選択自体の一部として管理されます。
|
|
reflectionAxis(rfa)
|
int
|
|
|
このフラグは現在サポートしていません。対称(Reflection)は、symmetricModeling コマンドを使用した選択自体の一部として管理されます。
|
|
reflectionTolerance(rft)
|
float
|
|
|
このフラグは現在サポートしていません。対称(Reflection)は、symmetricModeling コマンドを使用した選択自体の一部として管理されます。
|
|
rotate(ro)
|
[float, float, float]
|

|
|
マニピュレータの現在の方向/モードの回転を返します。
|
|
snap(s)
|
boolean
|
 
|
|
|
snapPivotOri(spo)
|
boolean
|

|
|
ピボットのスナップ方向です。ピボットをコンポーネントにスナップする場合のピボット方向を変更します。
|
|
snapPivotPos(spp)
|
boolean
|

|
|
ピボットのスナップ位置です。ピボットをコンポーネントにスナップする場合のピボット位置を変更します。
|
|
snapRelative(sr)
|
boolean
|
 
|
|
|
snapValue(sv)
|
float
|
 
|
|
|
tweakMode(twk)
|
boolean
|

|
|
True にすると、マニピュレータが非表示になり、ハイライト表示されたコンポーネントを選択できるようになります。これをクリック & ドラッグ操作による 1 回のステップで回転させることができます。
|
|
useCenterPivot(ucp)
|
boolean
|

|
|
true の場合、すべてのオブジェクトの回転の中心として、選択項目のバウンディング ボックスの中心を使用します。
|
|
useManipPivot(ump)
|
boolean
|

|
|
true の場合、すべてのオブジェクトの回転の中心として、マニピュレータのセンターを使用します。
|
|
useObjectPivot(uop)
|
boolean
|

|
|
true の場合、回転の中心として各オブジェクトのピボットを使用します。
|
|
xformConstraint(xc)
|
string
|

|
|
- none - トランスフォーム コンストレイントなし
- edge - エッジ トランスフォーム コンストレイント
- surface - サーフェス トランスフォーム コンストレイント
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
# To create a new rotate context:
cmds.manipRotateContext()
# To query the mode of an existing context:
cmds.manipRotateContext( 'manipRotateContext1', q=True, mode=True )
# To edit an existing context to come up with the X axis
# handle active by default:
cmds.manipRotateContext( 'manipRotateContext1', e=True, ah=0 )