34 lines
720 B
Python
34 lines
720 B
Python
|
#!/usr/bin/env python
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
import maya.cmds as cmds
|
||
|
from scripts.utils.Core import (
|
||
|
GetMeshes,
|
||
|
BodyJointsLocator,
|
||
|
MainAmendAxis,
|
||
|
SkinAmendAxis
|
||
|
)
|
||
|
|
||
|
def set_body_neutral_joint_translation():
|
||
|
"""
|
||
|
设置身体模型的关节中性位置
|
||
|
"""
|
||
|
# 获取身体模型
|
||
|
body_mesh = GetMeshes(m=50)
|
||
|
|
||
|
# 如果身体模型不存在,直接返回
|
||
|
if not cmds.objExists(body_mesh):
|
||
|
return
|
||
|
|
||
|
# 执行身体关节定位
|
||
|
BodyJointsLocator()
|
||
|
|
||
|
# 执行主要轴向修正
|
||
|
MainAmendAxis()
|
||
|
|
||
|
# 执行蒙皮轴向修正
|
||
|
SkinAmendAxis()
|
||
|
|
||
|
# 如果直接运行此脚本
|
||
|
if __name__ == '__main__':
|
||
|
set_body_neutral_joint_translation()
|