'2017/09/26'에 해당되는 글 1건

  1. 2017.09.26 Custom Orient Constrain Node & Command
posted by cimple 2017. 9. 26. 17:15

Custom orient constrain node & command 를 구현하였다.


CustomOrientConstrain.py

setCustomOrientConstrain.py




위 파일로 다운로드 받으면 된다.



Warning


Maya 2017 에서 버그를 발견하였다. (내 버그가 아니라 Maya 버그)

노드를 생성하고 연결하는 CustomOrientConstrainCmd.py 에서,

현재 코드처럼 custom node 를 생성한 다음 MSelectionList 에서 dagPath 를 받으면 argument 가 부족하다는 에러가 뜬다.

에러 메시지를 뜯어보니 아마도 Maya Python API 1.0 에 있는 MSelectionList_getDagPath 가 호출되는 것으로 보이는데 이유는 불명이다.


그래서 순서를 일단 MSelectionList 에 dagPath 를 받은 다음 -> Custom node 를 생성하면 정상작동한다.