标签:style blog color io for cti div line
def printNodeConAttr(): import re sellist = mc.ls(sl=1) all=[] D={} for a in sellist: lists = mc.listConnections(a,plugs=True,scn = True,c=1) for b in lists: if re.findall(‘hyperLayout‘and‘message‘,b): lists.remove(b) all.extend(lists) all=sorted(all) for attribute in all: if (mc.connectionInfo (attribute,isSource=True)) == True: if mc.connectionInfo (attribute,dfs=True): D[attribute]=mc.connectionInfo (attribute,dfs=True)[0] for key in D: out = ‘mc.connectAttr(\‘%s.key1\‘%(key2),\‘%s.key3\‘%(key4),f=1)‘.replace(‘key1‘,key.split(‘.‘)[1]).replace(‘key2‘,key.split(‘.‘)[0]).replace(‘key3‘,D[key].split(‘.‘)[1]).replace(‘key4‘,D[key].split(‘.‘)[0]) print out printNodeConAttr()
printNodeConAttr,布布扣,bubuko.com
标签:style blog color io for cti div line
原文地址:http://www.cnblogs.com/jonn/p/printnodeconattr.html