ジャンプ先: 概要. 戻り値. フラグ. Python 例. 
      
       listRelatives(
[objects]
    , [allDescendents=boolean], [allParents=boolean], [children=boolean], [fullPath=boolean], [noIntermediate=boolean], [parent=boolean], [path=boolean], [shapes=boolean], [type=string])  
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
      listRelatives は、取り消し可能、照会不可能、および編集不可能です。
      DAG オブジェクトの親と子がリストされます。-c/children フラグ、-ad/allDescendents フラグ、-s/shapes フラグ、-p/parent フラグ、-ap/allParents フラグを同時に指定することはできません。1 つのコマンドでは、このうち 1 つのみを使用できます。
ワールドのすぐ下でオブジェクトの親をリストすると、このコマンドは空の親リストを返します。シェイプのすぐ下でオブジェクト(アンダーワールド オブジェクト)の親をリストすると、親のリストに含まれるシェイプ ノードが返されます。オブジェクトのコンポーネントの親をリストすると、そのオブジェクトが返されます。
子をリストする場合、シェイプ ノードでは、子のリストでアンダーワールド オブジェクトが返されます。オブジェクトのコンポーネントの子をリストしても、何も返されません。
-ni/noIntermediate フラグは -s/shapes フラグとともに動作します。このフラグを使用すると、派生するものの中間シェイプが無視されます。
	  
      
      
      
      
      
    
      allDescendents, allParents, children, fullPath, noIntermediate, parent, path, shapes, type
      
      
		
		  
			|  フラグはコマンドの作成モードで表示できます |  フラグはコマンドの編集モードで表示できます | 
		  
			|  フラグはコマンドの照会モードで表示できます |  フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。 | 
		
import maya.cmds as cmds
# create an object and an instance for queries
cmds.sphere( n='nexus' )
cmds.instance( n='ball' )
# List the name of the shape below the transform node.
shapes = cmds.listRelatives('nexus')
# list all parents of shape
# (The result of the command is shown)
cmds.listRelatives( shapes[0], allParents=True )
# Result:[u'nexus', u'ball'] #