I started messing around with using symmetry constraints on controls or objects other than joints. I made a bit of code that will setup a constraint between two selected objects.
def createSymmetryConstraint(conname, axis):
if cmds.ls(sl=True) == []:
return (cmds.headsUpMessage("Select a Source and Target object"))
sel = cmds.ls(sl=True, type='transform')
sourceobj = sel[0]
targetobj = sel[1]
# Make the constraint node
symcon = cmds.createNode('symmetryConstraint', n=conname)
cmds.connectAttr('%s.translate' % sourceobj, '%s.targetTranslate' % symcon)
cmds.connectAttr('%s.rotate' % sourceobj, '%s.targetRotate' % symcon)
cmds.connectAttr('%s.scale' % sourceobj, '%s.targetScale' % symcon)
cmds.connectAttr('%s.parentMatrix[0]' % sourceobj, '%s.targetParentMatrix' % symcon)
cmds.connectAttr('%s.worldMatrix[0]' % sourceobj, '%s.targetWorldMatrix' % symcon)
cmds.connectAttr('%s.rotateOrder' % sourceobj, '%s.targetRotateOrder' % symcon)
cmds.connectAttr('%s.constraintTranslate' % symcon, '%s.translate' % targetobj)
cmds.connectAttr('%s.constraintRotate' % symcon, '%s.rotate' % targetobj)
cmds.connectAttr('%s.constraintScale' % symcon, '%s.scale' % targetobj)
cmds.connectAttr('%s.constraintRotateOrder' % symcon, '%s.rotateOrder' % targetobj)
cmds.connectAttr('%s.parentInverseMatrix[0]' % targetobj, '%s.constraintInverseParentWorldMatrix' % symcon)
cmds.parent(symcon, targetobj)
cmds.setAttr(symcon + axis, 1)
if axis == '.zAxis':
cmds.setAttr('%s.yAxis' % symcon, 0)
cmds.setAttr('%s.xAxis' % symcon, 0)
if axis == '.yAxis':
cmds.setAttr('%s.zAxis' % symcon, 0)
cmds.setAttr('%s.xAxis' % symcon, 0)
if axis == '.xAxis':
cmds.setAttr('%s.yAxis' % symcon, 0)
cmds.setAttr('%s.zAxis' % symcon, 0)