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

概要

listConnections([connections=boolean], [destination=boolean], [exactType=boolean], [fullNodeName=boolean], [plugs=boolean], [shapes=boolean], [skipConversionNodes=boolean], [source=boolean], [type=string])

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

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

特定のオブジェクトに接続されている、指定したタイプのすべてのアトリビュートやオブジェクトのリストを返します。オブジェクトを指定しない場合、選択したノードの接続がリスト表示されます。

戻り値

string[]接続 プラグ/ノードのリスト

キーワード

connection, dg, dependency, graph, plug, connect

関連

connectAttr, connectionInfo, disconnectAttr, getAttr, isConnected, listAttr, setAttr

フラグ

connections, destination, exactType, fullNodeName, plugs, shapes, skipConversionNodes, source, type
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
connections(c) boolean create
true の場合、接続に関連する両アトリビュートを返します。指定したオブジェクトのアトリビュートを先に返します。既定は false です。
destination(d) boolean create
特定のオブジェクトへの接続の「目的」側にあるアトリビュートやオブジェクトを返します。既定は true です。
exactType(et) boolean create
true に設定した場合、-t/type はこのタイプのノードのみを考慮します。それ以外の場合は、派生タイプも考慮に入れられます。
fullNodeName(fnn)
2023.1
boolean create
結果の完全なノード名を返します。
plugs(p) boolean create
true の場合、接続されたアトリビュート名を返します。false の場合、接続されたオブジェクト名のみを返します。既定は false です。
shapes(sh) boolean create
シェイプを「選択」した場合、トランスフォームの代わりにシェイプ名を返します。既定は false です。
skipConversionNodes(scn) boolean create
true の場合、単位変換ノードをスキップし、反対側の変換ノードに接続されたノードを返します。既定は false です。
source(s) boolean create
特定のオブジェクトへの接続の「ソース」側にあるアトリビュートやオブジェクトを返します。既定は true です。
type(t) string create
指定した場合、指定したタイプのオブジェクトのみが考慮されます。

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

Python 例

import maya.cmds as cmds

cmds.sphere( ch=True, n='BALL' )
cmds.setKeyframe()
# List all connections to BALL
list = cmds.listConnections('BALL')

# List only incoming connections from BALL.tx
cmds.listConnections( 'BALL.tx', d=False, s=True )

# List connections from BALL to nodes of type 'transform'
cmds.listConnections( t='transform' )

# List connections on BALL, ignoring unit conversion nodes
cmds.listConnections( 'BALL', scn=True )