def transfer_outgoing_connections(src, dst):
"""Connect outgoing connections from `src` to `dst`
Connections that cannot be made are ignored.
Arguments:
src (str): Absolute path to source node
dst (str): Absolute path to destination node
"""
for destination in cmds.listConnections(src,
source=False,
plugs=True) or []:
for source in cmds.listConnections(destination,
destination=False,
plugs=True) or []:
try:
cmds.connectAttr(source.replace(src, dst),
destination, force=True)
except RuntimeError:
continue
评论列表
文章目录