상세 컨텐츠

본문 제목

MItSelectionList

Maya API/Maya_API

by hwano 2014. 2. 7. 18:05

본문

 

MItSelectionList 와 MSelectionList가 있는데

 

MItSelectionList에서 It은 iterate의 약자 정도로 보면된다.

MSelectionList를 반복하기 위한 클래스 역할을 한다.

 

 

    MSelectionList activeList;
    MGlobal::activeSelectionList(activeList);
    MItSelectionList iter( activeList, MFn::kCamera );

 

 

이런식으로 카메라만 걸러내거나하는 필터기능이 있다.

 

기본적으로 next()와 isDone()의 기능을 자주 쓴다.

 

    for ( ; !iter.isDone(); iter.next() )
    {
        MDagPath camera;
        iter.getDagPath( camera );

        MFnCamera cameraFn( camera );

        // ...
   }

 

관련글 더보기