移動先: 概要 戻り値 関連項目. フラグ. Python 例.
rigidBody([active=boolean], [angularVelocity=boolean], [applyForceAt=string], [bounciness=float], [cache=boolean], [centerOfMass=[float, float, float]], [collisions=boolean], [contactCount=boolean], [contactName=boolean], [contactPosition=boolean], [damping=float], [deleteCache=boolean], [dynamicFriction=float], [force=boolean], [ignore=boolean], [impulse=[float, float, float]], [impulsePosition=[float, float, float]], [initialAngularVelocity=[float, float, float]], [initialVelocity=[float, float, float]], [layer=int], [lockCenterOfMass=boolean], [mass=float], [name=string], [orientation=[float, float, float]], [particleCollision=boolean], [passive=boolean], [position=[float, float, float]], [solver=string], [spinImpulse=[float, float, float]], [standInObject=string], [staticFriction=float], [tesselationFactor=int], [velocity=boolean])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
rigidBody は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。
ポリゴン サーフェスか NURBS サーフェスからリジッド ボディを作成します。
戻り値の型は照会モードでは照会フラグが基になります。
air, constrain, drag, gravity, newton, radial, rigidSolver
active, angularVelocity, applyForceAt, bounciness, cache, centerOfMass, collisions, contactCount, contactName, contactPosition, damping, deleteCache, dynamicFriction, force, ignore, impulse, impulsePosition, initialAngularVelocity, initialVelocity, layer, lockCenterOfMass, mass, name, orientation, particleCollision, passive, position, solver, spinImpulse, standInObject, staticFriction, tesselationFactor, velocity
ロング ネーム(ショート ネーム) |
引数型 |
プロパティ |
name(n)
|
string
|
 
|
|
position(p)
|
[float, float, float]
|
 
|
|
リジッド ボディの初期位置(x,y,z)を設定します。
デフォルト: 現行位置。
|
|
orientation(o)
|
[float, float, float]
|
 
|
|
リジッド ボディの初期方向(x,y,z)を設定します。
デフォルト: カレントの方向。
|
|
active(act)
|
boolean
|
 
|
|
アクティブ リジッド ボディを作成します。アクティブ リジッド ボディはコリジョンの作用を受け、コリジョンを起こし、ダイナミック フィールドの影響を受けます。これはデフォルトです。
|
|
passive(pas)
|
boolean
|
 
|
|
パッシブ リジッド ボディを作成します。パッシブ リジッド ボディはコリジョンに反応しませんが、アクティブ リジッド ボディと衝突することができます。
パッシブ リジッド ボディは、ダイナミック フィールドの影響は受けません。キーフレームを設定できるのは、パッシブ リジッド ボディだけです。
|
|
layer(l)
|
int
|
 
|
|
リジッド ボディのコリジョン レイヤを設定します。同じコリジョン レイヤにあるリジッド ボディだけが、互いに衝突できます。
範囲: >= 0 デフォルト: 0
|
|
collisions(cl)
|
boolean
|
 
|
|
リジッド ボディのコリジョンのオンとオフを切り替えます。コリジョンがオフの場合、リジッド ボディは他のリジッド ボディと衝突しません。
デフォルト: オン。
|
|
tesselationFactor(tf)
|
int
|

|
|
リジッド ボディ サーフェスのテッセレーション係数を設定します。
範囲: >= 10 デフォルト: 200
|
|
mass(m)
|
float
|
 
|
|
リジッド ボディの質量を設定します。
範囲: > 0 デフォルト: 1.0
|
|
staticFriction(sf)
|
float
|
 
|
|
リジッド ボディの静止摩擦を設定します。
範囲: 0.0 - 1.0
デフォルト: 0.2
|
|
dynamicFriction(df)
|
float
|
 
|
|
リジッド ボディの動摩擦を設定します。
範囲: 0.0 - 1.0
デフォルト: 0.2
|
|
bounciness(b)
|
float
|
 
|
|
リジッド ボディの回復(弾性)を設定します。
範囲: 0.0 - 2.0
デフォルト: 0.6
|
|
damping(dp)
|
float
|
 
|
|
リジッド ボディのダンピング値を設定します。
範囲: -2.0 - 2.0
デフォルト: 0
|
|
initialVelocity(iv)
|
[float, float, float]
|
 
|
|
リジッド ボディの初期速度を設定します。
デフォルト: 0.0 0.0 0.0
|
|
initialAngularVelocity(iav)
|
[float, float, float]
|
 
|
|
リジッド ボディの初期角速度を設定します。
デフォルト: 0.0 0.0 0.0
|
|
centerOfMass(com)
|
[float, float, float]
|
 
|
|
リジッド ボディの重心(x,y,z)を設定します。
デフォルト: 実際の重心
|
|
lockCenterOfMass(lcm)
|
boolean
|
 
|
|
リジッド ボディの重心をロックします。
デフォルト: オフ
|
|
cache(c)
|
boolean
|
 
|
|
リジッド ボディのキャッシュのオン(1)とオフ(0)を切り替えます。
デフォルト: オフ
|
|
deleteCache(dc)
|
boolean
|
|
|
リジッド ボディのキャッシュを削除します(キャッシュが存在する場合)。
|
|
particleCollision(pc)
|
boolean
|
 
|
|
リジッド ボディがパーティクルと衝突する機能のオンとオフを切り替えます。パーティクルはリジッド ボディにフォースの影響を及ぼします。
デフォルト: オフ
|
|
standInObject(sio)
|
string
|
 
|
|
シミュレーションの際、シミュレータが代用オブジェクトを使用します。
選択肢は none、cube、sphere です。デフォルトは「none」です。
デフォルト: none
|
|
impulse(i)
|
[float, float, float]
|

|
|
リジッド ボディに衝動的な(瞬間的な)フォースを適用します。
デフォルト: 0.0 0.0 0.0
|
|
impulsePosition(imp)
|
[float, float, float]
|

|
|
衝撃的なフォースを適用する位置。
デフォルト: リジッド ボディの重心。
|
|
spinImpulse(si)
|
[float, float, float]
|

|
|
リジッド ボディにスピン インパルス(瞬間的な回転)フォースを適用します。
デフォルト: 0.0 0.0 0.0
|
|
solver(slv)
|
string
|
 
|
|
このリジッド ノードが属するソルバの名前。ソルバが存在しない場合は、リジッド ボディは作成されません。ソルバを追加する編集フラグを設定すると、リジッド ボディはそのソルバに移動します。
|
|
ignore(ig)
|
boolean
|
 
|
|
リジッド ボディがリジッド ボディ ソルバ内で無視されます。
デフォルト: オフ
|
|
applyForceAt(afa)
|
string
|
 
|
|
リジッド ボディにフォースを適用する方法を決めます。
選択肢は、centerOfMass、boundingBox、verticesOrCVs です。
デフォルト: boundingBox
|
|
velocity(vel)
|
boolean
|
|
|
angularVelocity(av)
|
boolean
|
|
|
force(f)
|
boolean
|
|
|
リジッド ボディに作用している現在のフォースです。
|
|
contactCount(cc)
|
boolean
|
|
|
contactPosition(cp)
|
boolean
|
|
|
すべてのコンタクト位置を返します。各コンタクトについて 1 つの位置が返されます。
|
|
contactName(cn)
|
boolean
|
|
|
このシェイプにコンタクトしているすべてのリジッド ボディの名前を返します。各コンタクトについて 1 つの名前が返されます。
|
|
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
# Creates a rigid body with a initial velocity of 10 in the x
# direction, a bounciness of 0.5 and a static friction coefficent
# of 0.4.
#
cmds.rigidBody( n='myRigidBody', active=True, iv=(10, 0, 0), b=0.5, sf=0.4 )