選択中のメッシュをリストする手順を明記しておく
(親グループにはいていても使用可能)
1.メッシュを選択(親グループを選択してしまっていたも おけ)
2.選択中メッシュのリストを表示
※グループを選択しているときのためにlistRelativesを利用し子メッシュを取得
※処理が終わったら選択リストを復帰してあげる処理付き
import maya.cmds as cmds
#選択リストの取得
selections = cmds.ls( selection=1 )
#選択リストのメッシュを表示
for select in selections:
childs = cmds.listRelatives( select, children=True, allDescendents=True, type='mesh' )
for child in childs:
print( child )
#選択リストの復帰
cmds.select( selections, replace=1 )
3.選択中のメッシュがリストされる。