如何使形状节点的名称与其父节点的名称相似?(假设每个几何体/对象只有一个形状节点)
例如,父图形被称为test_geo1
,但是它的形状节点是testing_geo2Shape
,而不是{
我试着做以下事情:
all = cmds.ls(sl=True, dag=True, shapes=True)
for shape in all:
prt = cmds.listRelatives(shape, parent=True)
for i in prt:
child = cmds.listRelatives(i, c = True)
for c in child:
cmds.rename(c, str(prt) + "Shape")
我得到了一些有趣的名字,比如u_test_geo1__Shape
等等
测试的层次结构如下:
^{pr2}$仅选择顶部grp
相关问题 更多 >
编程相关推荐