great, simpler than expected. Thanks for you help! Can you please elaborate the proximity check for me, or point out the node/object that handles this?
Am still curious as how to achieve this using soup itself, as I'd like to understand such basics better, so far haven't noodled anything meaningful together... But to follow up you suggestion, here is my reply to the pythonic approach, including a test scene containing two curves with attributes on both Shapes (roots positioned on a sphere).
Quote: Then run proximity check on them and find the closest pairs between them.
"Elegant' proximity checking is the only thing I am not yet familiar with in Maya, ie. how to script the nearest point evaluation part using a function that has this built-in. Only know of a direct 'if condition' B == A of the actual two point position values in the 2 lists, say rounded to the third floating point value. Is there a node/maya object to handle this comparison instead? Similar to Houdini's copy (by nearest point) node?
This is a simple start to saving the point positions for the test scene supplied. I'd add code to create a second list of the new curves .cv positions (vector array). In an if loop compare if curveB pos == curveA pos, if condition is met, setAttr A->B.
You can ignore this half baked script part if you want, it needs some improvements 🙂
''' 1 - save old root positions for curvesA cv list '''
from maya import cmds
curvesA = cmds.ls(sl=True)
rootCvListA = list()
for c in curvesA:
getRootCv = cmds.ls("%s.cv" %c, fl=1)
''' using cmds.xform, could use cmds.pointPosition just the same '''
rootCvPositionA = cmds.xform(getRootCv, q=True, ws=True, t=True)
''' 2 - same code as above for new root positions on curvesB list'''
curvesB = cmds.ls(sl=True)
''' as above etc etc '''
''' 3 - temp code: a loop setting the attr, to do: better rounding formatting for the if condition, exception handling if list len differs, etc '''
for i in rootCvListA:
if rootCvListB[i] == rootCvListA:
cmds.setAttr('%s.deformationRadius' %curvesB[i], '%s.deformationRadius' %curvesA[i])