Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 12-06-2015 , 01:35 PM
Registered User
Join Date: Jun 2015
Posts: 8

Merge bullet solvers? Python

Hi,

Im new at the forum, and new with maya, but experienced in other 3d programs.

Im creating a scene where my objects '.mb' are loaded with python using cmds.file().

Each loaded object will be used in a bullet simulation.

So, as there are hundreds of objects I figured that I rather set up the "active rigid body" in my separate ".mb" files.

Loading in the ".mb" files, already containing bullet, into a new scene by running my python script, multiple bullet solvers are added to the scene, not caring about the other solvers / bodies.

How do I change / merge the solver for a rigid body? I can see the solver under the Dynamics System > Solver in the rigid body shape. But I cant change it.

/ Best Ola

# 2 12-06-2015 , 04:34 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
You can do this by simply switching around the connections that are listed in the node editor. Select the two solvers and graph them. You will see the connections from the objects to their solvers. Now, you just need to swap the connections from one solver, to another.

From the solver you want to assign to the rigidBodyShape, connect the following to the rigidBodyShape.
outSolverUpdated -> solverUpdated
outSolverInitialized -> solverInitialized
currentTime -> currentTime
startTime -> startTime

Then connect the following from the rigidBodyShape to the new solver.
outRigidBodyData -> rigidBodies[n]

Where n is a number that hasn't been used yet.


Imagination is more important than knowledge.
# 3 15-06-2015 , 10:59 AM
Registered User
Join Date: Jun 2015
Posts: 8
Thank you a lot, this worked perfectly and solved my problems user added image

// Best Ola

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads