ジャンプ先: 概要. 戻り値. 関連. フラグ. 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]], [removeShape=string], [solver=string], [spinImpulse=[float, float, float]], [standInObject=string], [staticFriction=float], [tesselationFactor=int], [velocity=boolean])

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

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

ポリゴン サーフェスか NURBS サーフェスからリジッド ボディを作成します。

戻り値

string新しいリジッド ボディの名前。

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

関連

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, removeShape, solver, spinImpulse, standInObject, staticFriction, tesselationFactor, velocity
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
active(act) boolean createqueryedit
アクティブ リジッド ボディを作成します。アクティブ リジッド ボディは衝突の作用を受け、衝突を起こし、ダイナミック フィールドの影響を受けます。これは既定です。
angularVelocity(av) boolean query
リジッド ボディの現在の角速度です。
applyForceAt(afa) string createqueryedit
リジッド ボディにフォースを適用する方法を決めます。選択肢は、centerOfMass、boundingBox、verticesOrCVs です。既定: boundingBox
bounciness(b) float createqueryedit
リジッド ボディの回復(弾性)を設定します。範囲: 0.0 - 2.0 既定: 0.6
cache(c) boolean createqueryedit
リジッド ボディのキャッシュのオン(1)とオフ(0)を切り替えます。既定: オフ
centerOfMass(com) [float, float, float] createqueryedit
リジッド ボディの重心(x,y,z)を設定します。既定: 実際の重心。
collisions(cl) boolean createqueryedit
リジッド ボディの衝突のオンとオフを切り替えます。衝突がオフの場合、リジッド ボディは他のリジッド ボディと衝突しません。既定: オン。
contactCount(cc) boolean query
リジッド ボディの現在のコンタクト数を返します。
contactName(cn) boolean query
このシェイプにコンタクトしているすべてのリジッド ボディの名前を返します。各コンタクトについて 1 つの名前が返されます。
contactPosition(cp) boolean query
すべてのコンタクト位置を返します。各コンタクトについて 1 つの位置が返されます。
damping(dp) float createqueryedit
リジッド ボディのダンピング値を設定します。範囲: -2.0 - 2.0 既定: 0.0
deleteCache(dc) boolean edit
リジッド ボディのキャッシュを削除します(キャッシュが存在する場合)。
dynamicFriction(df) float createqueryedit
リジッド ボディの動摩擦を設定します。範囲: 0.0 - 1.0 既定: 0.2
force(f) boolean query
リジッド ボディに作用している現在のフォースです。
ignore(ig) boolean createqueryedit
リジッド ボディがリジッド ボディ ソルバ内で無視されます。既定: オフ
impulse(i) [float, float, float] createedit
リジッド ボディに瞬間的なインパルス フォースを適用します。既定: 0.0 0.0 0.0
impulsePosition(imp) [float, float, float] createedit
インパルス フォースを適用する位置。既定: リジッド ボディの重心。
initialAngularVelocity(iav) [float, float, float] createqueryedit
リジッド ボディの初期角速度を設定します。既定: 0.0 0.0 0.0
initialVelocity(iv) [float, float, float] createqueryedit
リジッド ボディの初期速度を設定します。既定: 0.0 0.0 0.0
layer(l) int createqueryedit
リジッド ボディの衝突レイヤを設定します。同じ衝突レイヤにあるリジッド ボディだけが、互いに衝突できます。範囲: >= 0 既定: 0
lockCenterOfMass(lcm) boolean createqueryedit
リジッド ボディの重心をロックします。既定: オフ
mass(m) float createqueryedit
リジッド ボディの質量を設定します。範囲: > 0 既定: 1.0
name(n) string createqueryedit
指定した名前をリジッド ボディに割り当てます。
orientation(o) [float, float, float] createqueryedit
リジッド ボディの初期方向(x,y,z)を設定します。既定: 現在の方向。
particleCollision(pc) boolean createqueryedit
リジッド ボディがパーティクルと衝突する機能のオンとオフを切り替えます。パーティクルはリジッド ボディにフォースの影響を及ぼします。既定: オフ
passive(pas) boolean createqueryedit
パッシブ リジッド ボディを作成します。パッシブ リジッド ボディは衝突に反応しませんが、アクティブ リジッド ボディと衝突することができます。パッシブ リジッド ボディは、ダイナミック フィールドの影響は受けません。キーフレームを設定できるのは、パッシブ リジッド ボディだけです。
position(p) [float, float, float] createqueryedit
リジッド ボディの初期位置(x,y,z)を設定します。既定: 現行位置。
removeShape(rs) string createqueryedit
名前の付いたシェイプを削除します。
solver(slv) string createqueryedit
このリジッド ノードが属するソルバの名前。ソルバが存在しない場合は、リジッド ボディは作成されません。ソルバを追加する編集フラグを設定すると、リジッド ボディはそのソルバに移動します。
spinImpulse(si) [float, float, float] createedit
リジッド ボディにスピン インパルス(瞬間的な回転)フォースを適用します。既定: 0.0 0.0 0.0
standInObject(sio) string createqueryedit
シミュレーションの際、シミュレータが代用オブジェクトを使用します。選択肢は none、cube、sphere です。既定は「none」です。既定: なし
staticFriction(sf) float createqueryedit
リジッド ボディの静止摩擦を設定します。範囲: 0.0 - 1.0 既定: 0.2
tesselationFactor(tf) int createquery
リジッド ボディ サーフェスのテッセレーション係数を設定します。範囲: >= 10 既定: 200
velocity(vel) boolean query
リジッド ボディの現在の速度です。

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

Python 例

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 )