나는이 작업을 수행하는 기존 코드를 보았지만 더 나은 방법이 있어야한다고 가정합니다. 따라서 Autodesk Maya에서 메쉬 노드를 최고 수준으로 끌어 올릴 필요가 있습니다.MEL 스크립트에서 루트 노드를 얻는 방법은 무엇입니까?
// List all mesh objects
string $nodess[] = `ls -type mesh` ;
// Replace existing items on active list with this
select -r $nodess[0] ;
int $i = 1 ;
while ($i < 30) {
// Pick up the tree 30 times
pickWalk -d up ;
$i++ ;
}
// List all selected objects
string $rootNode[] = `ls -sl` ;
// Clear selection
select -cl ;
string $myroot = $rootNode[0] ;
항상 모든 장면 XD의 0 인덱스에 빈 공간을 제공합니다 –