30 lines
688 B
Python
30 lines
688 B
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
版权所有: 深圳时光科技有限公司
|
|
联系方式: q.100@qq.com
|
|
创建日期: 2024/04/02
|
|
"""
|
|
|
|
import maya.cmds as cmds
|
|
|
|
def sg_uv_transfer_vertex_order():
|
|
"""
|
|
传递UV顶点顺序
|
|
在两个选中的对象之间传递UV顶点顺序
|
|
"""
|
|
# 获取选中的对象
|
|
sel = cmds.ls(selection=True)
|
|
|
|
# 检查是否正好选择了两个对象
|
|
if len(sel) != 2:
|
|
raise RuntimeError("Please select two objects...")
|
|
return
|
|
|
|
# 传递顶点顺序
|
|
cmds.SGSetMeshes(tvo=sel[0], value=sel[1])
|
|
|
|
# 如果直接运行此脚本
|
|
if __name__ == '__main__':
|
|
sg_uv_transfer_vertex_order() |