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) – Start Frame, Start frame for baking (in [0, 300000], optional)
frame_end (int) – End Frame, End frame for baking (in [1, 300000], optional)
step (int) – Frame Step, Frame Step (in [1, 120], optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- File:
- 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 (Literal['FIXED', 'POINT', 'HINGE', 'SLIDER', 'PISTON', 'GENERIC', 'GENERIC_SPRING', 'MOTOR']) –
Type, Type of generated constraint (optional)
FIXEDFixed – Glue rigid bodies together.POINTPoint – Constrain rigid bodies to move around common pivot point.HINGEHinge – Restrict rigid body rotation to one axis.SLIDERSlider – Restrict rigid body translation to one axis.PISTONPiston – Restrict rigid body translation and rotation to one axis.GENERICGeneric – Restrict translation and rotation to specified axes.GENERIC_SPRINGGeneric Spring – Restrict translation and rotation to specified axes with springs.MOTORMotor – Drive rigid body around or along an axis.
pivot_type (Literal['CENTER', 'ACTIVE', 'SELECTED']) –
Location, Constraint pivot location (optional)
CENTERCenter – Pivot location is between the constrained rigid bodies.ACTIVEActive – Pivot location is at the active object position.SELECTEDSelected – Pivot location is at the selected object position.
connection_pattern (Literal['SELECTED_TO_ACTIVE', 'CHAIN_DISTANCE']) –
Connection Pattern, Pattern used to connect objects (optional)
SELECTED_TO_ACTIVESelected to Active – Connect selected objects to the active object.CHAIN_DISTANCEChain by Distance – Connect objects as a chain based on distance, starting at the active object.
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- File:
- bpy.ops.rigidbody.constraint_add(*, type='FIXED')
Add Rigid Body Constraint to active object
- Parameters:
type (Literal[Rigidbody Constraint Type Items]) – Rigid Body Constraint Type, (optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.constraint_remove()
Remove Rigid Body Constraint from Object
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.mass_calculate(*, material='DEFAULT', density=1.0)
Automatically calculate mass values for Rigid Body Objects based on volume
- Parameters:
material (Literal['DEFAULT']) – Material Preset, Type of material that objects are made of (determines material density) (optional)
density (float) – Density, Density value (kg/m^3), allows custom value if the ‘Custom’ preset is used (in [1.17549e-38, inf], optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.object_add(*, type='ACTIVE')
Add active object as Rigid Body
- Parameters:
type (Literal[Rigidbody Object Type Items]) – Rigid Body Type, (optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.object_remove()
Remove Rigid Body settings from Object
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.object_settings_copy()
Copy Rigid Body settings from active object to selected
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- File:
- bpy.ops.rigidbody.objects_add(*, type='ACTIVE')
Add selected objects as Rigid Bodies
- Parameters:
type (Literal[Rigidbody Object Type Items]) – Rigid Body Type, (optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.objects_remove()
Remove selected objects from Rigid Body simulation
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.shape_change(*, type='MESH')
Change collision shapes for selected Rigid Body Objects
- Parameters:
type (Literal[Rigidbody Object Shape Items]) – Rigid Body Shape, (optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.world_add()
Add Rigid Body simulation world to the current scene
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.rigidbody.world_remove()
Remove Rigid Body simulation world from the current scene
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]