Now i want to make a script so I dont have to use the connection editor every time.
So far i was able to write
maya.cmds.connectAttr( 'outputSurfaceShape.message','geoConnector1.owner', f=True);
maya.cmds.connectAttr( 'outputSurfaceShape.outMesh','geoConnector1.localGeometry', f=True);
maya.cmds.connectAttr( 'outputSurfaceShape.worldMatrix','geoConnector1.worldMatrix', f=True);
but this will not work multiple times in a scene. i cannot figure out how to make this work with selected objects. the ideal script would use the first selected object as source and second for target for the connectAttr.
Any help would be appreciated.