maya_execute
Execute arbitrary Python code in Autodesk Maya for any task without a dedicated tool, such as rigging, UV, deformers, custom nodes, and Bifrost. Combine multiple operations into one call to reduce cost and overhead.
Instructions
Maya 안에서 임의의 Python 코드를 실행합니다. Maya 로 되는 모든 작업의 통로입니다.
전용 툴이 없는 작업(리깅, UV, 디포머, 커스텀 노드, Bifrost 등)은 전부 이 툴로 하세요. 여러 작업을 한 번에 묶어 보내는 편이 툴을 여러 번 호출하는 것보다 훨씬 빠르고 저렴합니다.
사용 가능한 이름: cmds (maya.cmds), mel (maya.mel), om (maya.api.OpenMaya).
반환 규약:
코드가 단일 표현식이면 그 값이
value가 됩니다. 예)cmds.ls(selection=True)여러 줄이면
result변수에 담긴 값이value가 됩니다.stdout에 print 출력이, 실패하면error에 트레이스백이 담깁니다. 실패 시 에러를 읽고 고쳐서 다시 시도하세요.
Args: code: 실행할 Python 코드. undo_chunk: True 면 실행 전체를 하나의 undo 단위로 묶습니다. 사용자가 Ctrl+Z 한 번으로 되돌릴 수 있으므로 기본값을 유지하세요.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| undo_chunk | No |