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.

Thanks in advance

  • $\begingroup$ 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 $\endgroup$
    – Chebhou
    Feb 14, 2015 at 8:14
  • $\begingroup$ @Chebhou yeah it works to search in space bar for it $\endgroup$ Feb 14, 2015 at 8:16
  • $\begingroup$ does that solve the problem ? $\endgroup$
    – Chebhou
    Feb 14, 2015 at 8:18
  • $\begingroup$ @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 $\endgroup$ Feb 14, 2015 at 8:21

1 Answer 1


to add force field to all selected objects :

import bpy

for ob in bpy.context.selected_objects :
    bpy.context.scene.objects.active = ob

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

  • to copy constraints from one object to others :

enter image description here

  • 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
         bpy.ops.rigidbody.constraint_add(type = Type)
         bpy.context.active_object.rigid_body_constraint.object1 = obj1 
         bpy.context.active_object.rigid_body_constraint.object2 = obj2 
         bpy.context.active_object.rigid_body_constraint.use_breaking = use_br 
         bpy.context.active_object.rigid_body_constraint.use_override_solver_iterations = over_itr

Blender >2.8 Line 9 has to be changed to:

    bpy.context.view_layer.objects.active = ob
  • $\begingroup$ sorry I don't understand how python works or how to add a script. And how would it work to add constraints to every object? $\endgroup$ Feb 14, 2015 at 8:39
  • $\begingroup$ you can add constraints with the copy option that i gave you in the comment, this answer is to add forcefield only $\endgroup$
    – Chebhou
    Feb 14, 2015 at 8:43
  • $\begingroup$ i will edit to include the constraints $\endgroup$
    – Chebhou
    Feb 14, 2015 at 8:44
  • $\begingroup$ It's not working. I have the active object as the one with constraints but it still doesn't add constraints to the other object. It just only has the rigidbody setting in the physics tab and no rigid body constraint $\endgroup$ Feb 14, 2015 at 8:53
  • 1
    $\begingroup$ ok , i'll edit to include the physics constraints $\endgroup$
    – Chebhou
    Feb 14, 2015 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .