79616801

Date: 2025-05-11 18:39:39
Score: 2
Natty:
Report link

You could use batched from itertools (https://docs.python.org/3/library/itertools.html#itertools.batched):

from itertools import batched
connections = cmds.listConnections()
for destination, source in batched(connections, 2):
    print (source, destination)

However, this will only work in python 3.12+

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Chipmonkcheeks