# Rigidbody Operators

`bpy.ops.rigidbody.``bake_to_keyframes`(frame_start=1, frame_end=250, step=1)

  Bake rigid body transformations of selected objects to keyframes

  Parameters: | frame_start (int in [0, 300000], (optional)) – Start Frame, Start frame for baking frame_end (int in [1, 300000], (optional)) – End Frame, End frame for baking step (int in [1, 120], (optional)) – Frame Step, Frame Step
  File: | startup/bl_operators/rigidbody.py:117

`bpy.ops.rigidbody.``connect`(con_type='FIXED', pivot_type='CENTER', connection_pattern='SELECTED_TO_ACTIVE')

  Create rigid body constraints between selected rigid bodies

  Parameters: | con_type (enum in [‘FIXED’, ‘POINT’, ‘HINGE’, ‘SLIDER’, ‘PISTON’, ‘GENERIC’, ‘GENERIC_SPRING’, ‘MOTOR’], (optional)) – Type, Type of generated constraint `FIXED` Fixed, Glue rigid bodies together. `POINT` Point, Constrain rigid bodies to move around common pivot point. `HINGE` Hinge, Restrict rigid body rotation to one axis. `SLIDER` Slider, Restrict rigid body translation to one axis. `PISTON` Piston, Restrict rigid body translation and rotation to one axis. `GENERIC` Generic, Restrict translation and rotation to specified axes. `GENERIC_SPRING` Generic Spring, Restrict translation and rotation to specified axes with springs. `MOTOR` Motor, Drive rigid body around or along an axis. pivot_type (enum in [‘CENTER’, ‘ACTIVE’, ‘SELECTED’], (optional)) – Location, Constraint pivot location `CENTER` Center, Pivot location is between the constrained rigid bodies. `ACTIVE` Active, Pivot location is at the active object position. `SELECTED` Selected, Pivot location is at the selected object position. connection_pattern (enum in [‘SELECTED_TO_ACTIVE’, ‘CHAIN_DISTANCE’], (optional)) – Connection Pattern, Pattern used to connect objects `SELECTED_TO_ACTIVE` Selected to Active, Connect selected objects to the active object. `CHAIN_DISTANCE` Chain by Distance, Connect objects as a chain based on distance, starting at the active object.
  File: | startup/bl_operators/rigidbody.py:272

`bpy.ops.rigidbody.``constraint_add`(type='FIXED')

  Add Rigid Body Constraint to active object

  Parameters: | type (enum in [‘FIXED’, ‘POINT’, ‘HINGE’, ‘SLIDER’, ‘PISTON’, ‘GENERIC’, ‘GENERIC_SPRING’, ‘MOTOR’], (optional)) – Rigid Body Constraint Type `FIXED` Fixed, Glue rigid bodies together. `POINT` Point, Constrain rigid bodies to move around common pivot point. `HINGE` Hinge, Restrict rigid body rotation to one axis. `SLIDER` Slider, Restrict rigid body translation to one axis. `PISTON` Piston, Restrict rigid body translation and rotation to one axis. `GENERIC` Generic, Restrict translation and rotation to specified axes. `GENERIC_SPRING` Generic Spring, Restrict translation and rotation to specified axes with springs. `MOTOR` Motor, Drive rigid body around or along an axis.

`bpy.ops.rigidbody.``constraint_remove`()

  Remove Rigid Body Constraint from Object

`bpy.ops.rigidbody.``mass_calculate`(material='DEFAULT', density=1.0)

  Automatically calculate mass values for Rigid Body Objects based on volume

  Parameters: | material (enum in [‘DEFAULT’], (optional)) – Material Preset, Type of material that objects are made of (determines material density) density (float in [1.17549e-38, inf], (optional)) – Density, Custom density value (kg/m^3) to use instead of material preset

`bpy.ops.rigidbody.``object_add`(type='ACTIVE')

  Add active object as Rigid Body

  Parameters: | type (enum in [‘ACTIVE’, ‘PASSIVE’], (optional)) – Rigid Body Type `ACTIVE` Active, Object is directly controlled by simulation results. `PASSIVE` Passive, Object is directly controlled by animation system.

`bpy.ops.rigidbody.``object_remove`()

  Remove Rigid Body settings from Object

`bpy.ops.rigidbody.``object_settings_copy`()

  Copy Rigid Body settings from active object to selected

  File: | startup/bl_operators/rigidbody.py:59

`bpy.ops.rigidbody.``objects_add`(type='ACTIVE')

  Add selected objects as Rigid Bodies

  Parameters: | type (enum in [‘ACTIVE’, ‘PASSIVE’], (optional)) – Rigid Body Type `ACTIVE` Active, Object is directly controlled by simulation results. `PASSIVE` Passive, Object is directly controlled by animation system.

`bpy.ops.rigidbody.``objects_remove`()

  Remove selected objects from Rigid Body simulation

`bpy.ops.rigidbody.``shape_change`(type='MESH')

  Change collision shapes for selected Rigid Body Objects

  Parameters: | type (enum in [‘BOX’, ‘SPHERE’, ‘CAPSULE’, ‘CYLINDER’, ‘CONE’, ‘CONVEX_HULL’, ‘MESH’], (optional)) – Rigid Body Shape `BOX` Box, Box-like shapes (i.e. cubes), including planes (i.e. ground planes). `SPHERE` Sphere. `CAPSULE` Capsule. `CYLINDER` Cylinder. `CONE` Cone. `CONVEX_HULL` Convex Hull, A mesh-like surface encompassing (i.e. shrinkwrap over) all vertices (best results with fewer vertices). `MESH` Mesh, Mesh consisting of triangles only, allowing for more detailed interactions than convex hulls.

`bpy.ops.rigidbody.``world_add`()

  Add Rigid Body simulation world to the current scene

`bpy.ops.rigidbody.``world_remove`()

  Remove Rigid Body simulation world from the current scene