我有这个脚本,我想父控件一起重命名图标。现在它命名组,但不命名控件或它们的父级。有人能帮我吗?你知道吗
def priming(*args):
jointChain = pm.ls(sl = True, dag = True)
jointChain.pop(-1)
ori = raw_input()
systemName = raw_input()
suffix = "prime"
prime1Name = "{0}_{1}_00_{2}1".format(ori, systemName, suffix)
prime2Name = "{0}_{1}_00_{2}2".format(ori, systemName, suffix)
pm.select(cl = True)
for jointName in jointChain:
primeIcon = pm.circle(nr = [1, 0, 0])
groupOne = pm.group(em = True, n = prime1Name)
groupTwo = pm.group(em = True, n = prime2Name)
pm.parent(groupTwo, groupOne)
pm.parent(primeIcon, groupTwo)
tempConstraint = pm.parentConstraint(jointName, groupOne, mo = False)
pm.delete(tempConstraint)
pm.makeIdentity(primeIcon, a = True, t = 1, r = 1, s = 1)
tempConstraintTwo = pm.orientConstraint(primeIcon, jointName, mo = True)
这是您的代码的修改版本。这是组和控制器的父级,还根据命名方案对它们进行命名(如果需要,可以调整命名方案):
相关问题 更多 >
编程相关推荐