25 lines
596 B
Python
25 lines
596 B
Python
|
#!/usr/bin/env python
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
import maya.cmds as cmds
|
||
|
from Core import SetMeshes
|
||
|
|
||
|
def uv_transfer_vertex_order():
|
||
|
"""
|
||
|
传递UV顶点顺序
|
||
|
在两个选中的对象之间传递UV顶点顺序
|
||
|
"""
|
||
|
# 获取选中的对象
|
||
|
sel = cmds.ls(selection=True)
|
||
|
|
||
|
# 检查是否正好选择了两个对象
|
||
|
if len(sel) != 2:
|
||
|
raise RuntimeError("Please select two objects...")
|
||
|
return
|
||
|
|
||
|
# 传递顶点顺序
|
||
|
SetMeshes(tvo=sel[0], value=sel[1])
|
||
|
|
||
|
# 如果直接运行此脚本
|
||
|
if __name__ == '__main__':
|
||
|
uv_transfer_vertex_order()
|