View Full Version : Python-dmm emit fluids

08 August 2012, 06:03 PM
Hi, i am new to Python and am trying to write a script to allow a DMM object to emit fluids. In this someone show how to connect three attributes so that the DMM object can emit fluids.

Example (

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.

CGTalk Moderation
08 August 2012, 06:03 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.