MetaFusion/scripts/utils/EditBlendShape.py

21 lines
501 B
Python
Raw Normal View History

2025-02-07 05:10:30 +08:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import maya.cmds as cmds
def edit_blend_shape(index, blend_shape):
"""
编辑混合变形目标
参数:
index (int): 目标索引
blend_shape (str): 混合变形节点名称
"""
try:
# 重置当前雕刻目标
cmds.sculptTarget(blend_shape, edit=True, target=-1)
# 设置新的雕刻目标
cmds.sculptTarget(blend_shape, edit=True, target=index)
except:
pass