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

概要

connectDynamic( [objects] , [collisions=string], [delete=boolean], [emitters=string], [fields=string])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

connectDynamic は 「元に戻す」が可能、「照会」が不可能「編集」が不可能 です。

ダイナミック接続は、オブジェクトのフォース フィールド、エミッタ、あるいはコリジョンが、他のダイナミック オブジェクトに影響するよう指定します。フィールド、エミッタ、コリジョンに接続されているダイナミック オブジェクトは、それらのフィールド、エミッタ、あるいはコリジョン オブジェクトに影響されます。 それぞれのフィールド、エミッタ、コリジョンに接続が設定されます。したがって、1 つのオブジェクトにいくつものフィールドがある場合に、ユーザがその中のいくつかのフィールドでオブジェクトに影響を与えたいときは、「-f」フラグを使用します。一方、オブジェクトに属するすべてのフィールドをコネクトしたい場合は、「-f」フラグでオブジェクト名を指定します。エミッタとコリジョンについても同様です。 同じオブジェクトの対での、異なるコネクション タイプ(すなわちフィールドとエミッタ)は、理論的には独立しています。すなわち、オブジェクトは、別のオブジェクトのエミッタやコリジョンに影響されなくても、別のオブジェクトのフィールドによって影響を受けることがあります。 それぞれの接続されたオブジェクトは、ダイナミック オブジェクトでなければなりません。接続先のオブジェクトは、フィールド、エミッタなどを持つオブジェクトならどんなものでもかまいません。ダイナミック オブジェクトである必要はありません。影響力を持つオブジェクトは、パーティクル、ジオメトリ オブジェクト(NURBS とポリゴン)とラティスです。影響を受けるオブジェクトは、シェイプ名あるいはトランスフォーム名のいずれでも指定することが出来ます。

戻り値

string

関連項目

air, drag, emitter, gravity, newton, particle, radial

フラグ

collisions, delete, emitters, fields
ロング ネーム(ショート ネーム) 引数型 プロパティ
fields(f) string createmultiuse
特定のオブジェクトのフィールドに各オブジェクトをコネクトします。
emitters(em) string createmultiuse
特定のオブジェクトのエミッタに各オブジェクトをコネクトします。
collisions(c) string createmultiuse
特定のオブジェクトのコリジョン モデルに各オブジェクトをコネクトします。
delete(d) boolean create
既存のコネクションを削除します。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python 例

import maya.cmds as cmds

cmds.connectDynamic( 'Book', c='Floor' )
# Connects the dynamic object "Book" to the collision model of the
# "Floor". This means that the book will collide with and bounce off of
# the floor.

cmds.connectDynamic( 'Moon', 'Spaceship', f='Moon' )
# Connects dynamic object "Spaceship" to the all fields and emitters
# owned by "Moon".

cmds.connectDynamic( 'Spaceship', f='newtonField1' )
# Connects dynamic object "Spaceship" to "newtonField1" owned by "Moon".

cmds.connectDynamic( 'Moon', f='newtonField1' )
# If the selection list consists of "Spaceship", connects dynamic object
# "Spaceship" to "newtonField1" and all emitters owned by "Moon".

cmds.connectDynamic( 'Spaceship', d=True, f='Moon' )
# Deletes the field connection between all the fields owned by "Moon" and
# "Spaceship". Note that the command establishing the connection need not
# be in the undo queue.

cmds.connectDynamic( 'Spaceship', d=True, f='newtonField1' )
# Deletes the field connection between "newtonField1" owned by "Moon" and
# "Spaceship".