# How do you copy things like rigidbody constraints and force fields to other objects?

How do you copy things like rigidbody constraints and force fields to other objects?

I made a cell fracture and I would like to give each cell the same constraints and force fields.

• there is a copy physics settings in the physics tab "on the left" and you can copy constraints "type in space bar copy constraints" and if you enable "copy attribute menu" addon use Ctrl+C – Chebhou Feb 14 '15 at 8:14
• @Chebhou yeah it works to search in space bar for it – Chickenator Feb 14 '15 at 8:16
• does that solve the problem ? – Chebhou Feb 14 '15 at 8:18
• @Chebhou it doesn't work. It changes the settings to existing rigid body constraints but it doesn't add new ones. I need it to copy the setting but also add new ones to where there isn't rigidbody constraint – Chickenator Feb 14 '15 at 8:21

to add force field to all selected objects :

import bpy

for ob in bpy.context.selected_objects :
bpy.context.scene.objects.active = ob
bpy.ops.object.forcefield_toggle()


to run the script copy it and paste in the text editor and cick Run Script

• to copy constraints from one object to others :

• to copy rigid body constraints select the objects while the active object is the one with constraints and run this script :

import bpy

Type = bpy.context.active_object.rigid_body_constraint.type
obj1 = bpy.context.active_object.rigid_body_constraint.object1
obj2 = bpy.context.active_object.rigid_body_constraint.object2
use_br = bpy.context.active_object.rigid_body_constraint.use_breaking
over_itr = bpy.context.active_object.rigid_body_constraint.use_override_solver_iterations
for ob in bpy.context.selected_objects :
bpy.context.scene.objects.active = ob