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

概要

rigidSolver([autoTolerances=boolean], [bounciness=boolean], [cacheData=boolean], [collide=boolean], [collisionTolerance=float], [contactData=boolean], [create=boolean], [current=boolean], [deleteCache=boolean], [displayCenterOfMass=boolean], [displayConstraint=boolean], [displayVelocity=boolean], [dynamics=boolean], [friction=boolean], [interpenetrate=boolean], [interpenetrationCheck=boolean], [name=string], [rigidBodies=boolean], [rigidBodyCount=boolean], [showCollision=boolean], [showInterpenetration=boolean], [solverMethod=int], [startTime=float], [state=boolean], [statistics=boolean], [stepSize=float], [velocityVectorScale=float])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

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

リジッド ソルバのアトリビュートを設定します。

戻り値

なし

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

関連

constrain, rigidBody

フラグ

autoTolerances, bounciness, cacheData, collide, collisionTolerance, contactData, create, current, deleteCache, displayCenterOfMass, displayConstraint, displayVelocity, dynamics, friction, interpenetrate, interpenetrationCheck, name, rigidBodies, rigidBodyCount, showCollision, showInterpenetration, solverMethod, startTime, state, statistics, stepSize, velocityVectorScale
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
autoTolerances(at) boolean queryedit
許容値を自動的に計算するかどうかを切り替えます。自動計算による許容値は、既定のまたはユーザ定義のステップ サイズの値や、シーンのオブジェクトに基づいて計算される衝突の許容値より優先されます。既定: 0 (オフ)
bounciness(b) boolean queryedit
シミュレーションのオブジェクトで弾性のオンとオフを切り替えます。既定値: オン
cacheData(cd) boolean queryedit
システム内のすべてのリジッド ボディでキャッシュをオンに切り替えます。既定値: オフ
collide(c) boolean queryedit
リスト表示した 2 つのリジッド ボディが相互に貫通しないようにします。既定: すべてのリジッド ボディで衝突がオンになっています。
collisionTolerance(ct) float queryedit
衝突の許容値を設定します。2 つのオブジェクトが衝突するとみなされる場合にはエラーとなります。範囲: 0.0005 - 1.000 既定: 0.02
contactData(ctd) boolean queryedit
すべてのリジッド ボディでコンタクト データ情報のオンとオフを切り替えます。既定値: オフ
create(cr) boolean create
新しいリジッド ソルバを作成します。
current(cu) boolean create
リジッド ソルバを現在のソルバとして設定します。
deleteCache(deleteCache) boolean queryedit
システム内のすべてのリジッド ボディでキャッシュを削除します。
displayCenterOfMass(dcm) boolean queryedit
重心アイコンを表示します。既定値: オン
displayConstraint(dc) boolean queryedit
コンストレイント ベクトルを表示します。既定値: オン
displayVelocity(dv) boolean queryedit
速度ベクトルを表示します。既定値: オフ
dynamics(d) boolean queryedit
シミュレーションのオブジェクトでダイナミクスのオンとオフを切り替えます。既定値: オン
friction(f) boolean queryedit
シミュレーションのオブジェクトで摩擦のオンとオフを切り替えます。既定値: オン
interpenetrate(i) boolean queryedit
リスト表示した 2 つのリジッド ボディを相互に貫通させます。既定: 相互貫通はすべてのボディでオフになっています。
interpenetrationCheck(ic) boolean edit
シーン内で相互に貫通するリジッド ボディをチェックします。
name(n) string createqueryedit
新しいオブジェクトの名前です。
rigidBodies(rb) boolean query
ソルバ内のリジッド ボディのリスト表示を返します。
rigidBodyCount(rbc) boolean query
ソルバ内のリジッド ボディの数を返します。
showCollision(sc) boolean queryedit
衝突するオブジェクトを別のカラーで表示します。
showInterpenetration(si) boolean queryedit
相互に貫通するオブジェクトを別のカラーで表示します。
solverMethod(sm) int queryedit
ソルバのメソッドを設定します。選択肢は 0、1、2 です。0=Euler (最も速い/最も不正確)、1=Runge-Kutta (Euler より遅い/Euler より正確)、2=適応 Runge-Kutta (最も遅い/最も正確)。既定は 2 (適応 Runge-Kutta)です。
startTime(stt) float createqueryedit
ソルバの開始時間を設定します。
state(st) boolean queryedit
リジッド ソルバのオンとオフを切り替えます。
statistics(sta) boolean queryedit
すべてのリジッド ボディでスタティック情報のオンとオフを切り替えます。既定値: オフ
stepSize(s) float queryedit
ソルバのステップ サイズを設定します。ソルバが 1 回で取りうるステップの最大のサイズです。範囲: 0.0004 - 0.100 既定: 0.0333
velocityVectorScale(vs) float queryedit
速度ベクトルの表示をスケールします。既定値: 1.0

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

import maya.cmds as cmds

# Set the playback time range to [1, 100]
cmds.playbackOptions(min=1, max=100)
# Create a poly cube named "floor"
cmds.polyCube(w=10, h=0.10, d=10, sx=10, sy=1, sz=10, ax=(0, 1, 0), name='floor')
# Create a poly sphere named "ball", then move it to 0 9 0
cmds.polySphere(r=1, sx=20, sy=20, ax=(0, 1, 0), name='ball')
cmds.move(0, 9.0, 0, r=True)
# Create a new rigid body solver
cmds.rigidSolver(create=True, name='rigidSolver1')
# Set the floor to passive rigid body
cmds.select('floor')
cmds.rigidBody(passive=True, solver='rigidSolver1', name='passiveRigidBody')
# Set the ball to active rigid body
cmds.select('ball')
cmds.rigidBody(active=True, solver='rigidSolver1', name='activeRigidBody')
# Add a gravity field, and connect it to ball
cmds.gravity(pos=(0, 0, 0), m=9.8, dx=0, dy=-1, dz=0, name='gravityField')
cmds.connectDynamic('activeRigidBody', f='gravityField')
# Play
cmds.play(w=True)

# Set the rigid solver to allow the ball to interpenetrate the floor, then replay
cmds.currentTime(1, e=True)
cmds.rigidSolver('passiveRigidBody', 'activeRigidBody', 'rigidSolver1', e=True, interpenetrate=True)
cmds.play(w=True)

# Set the rigid solver to disallow the ball to interpenetrate the floor, replay
cmds.currentTime(1, e=True)
cmds.rigidSolver('passiveRigidBody', 'activeRigidBody', 'rigidSolver1', e=True, collide=True)
cmds.play(w=True)

# Set the rigid solver to turn off the bounciness, replay
cmds.currentTime(1, e=True)
cmds.rigidSolver('rigidSolver1', e=True, bounciness=False)
cmds.play(w=True)