Here you will find documentation on all the descriptions that Cinema 4D currently has. You can list them Alphabetically, by Type or Plugin . The sample Python and C++ code is automatically generated and in some cases may not be 100% correct. If something doesn't work then please refer to the official Cinema 4D SDK documentation for more information.

IDs and information for DynRigidBodyTag

DynRigidBodyTag

Attributes

  • ENGLISH NAME : DynamicsBodyTag
  • NAME : name
  • INCLUDE : Tbase
  • PATH : dynamics/description/dynrigidbodytag.res
  • PLUGIN : dynamics
  • MAXON online help (may not exist): DYNRIGIDBODYTAG

Elements

ID UI Name Type Parameters Cycle
RIGID_BODY_ENABLED Enabled BOOL  
RIGID_BODY_ENABLED_SELECTION MoGraphSelection LINK  
RIGID_BODY_DYNAMIC Dynamic LONG  
RIGID_BODY_DYNAMIC_OFF Off
RIGID_BODY_DYNAMIC_ON On
RIGID_BODY_DYNAMIC_GHOST Ghost
RIGID_BODY_DYNAMIC_SELECTION MoGraphSelection LINK  
RIGID_BODY_SET_INITIAL_STATE SetInitialState BUTTON  
RIGID_BODY_CLEAR_INITIAL_STATE ClearInitialState BUTTON  
RIGID_BODY_SHOW ShowinVisualization BOOL  
RIGID_BODY_TRIGGER Trigger LONG  
RIGID_BODY_TRIGGER_IMMEDIATELY Immediately
RIGID_BODY_TRIGGER_AT_PEAK AtVelocityPeak
RIGID_BODY_TRIGGER_ON_COLLISION OnCollision
RIGID_BODY_TRIGGER_XPRESSO ByXPresso
RIGID_BODY_TRIGGER_ON_COLLISION_VELOCITY TriggerVelocityThreshold REAL UNIT
RIGID_BODY_USE_INITIAL_VELOCITY CustomInitialVelocity BOOL  
RIGID_BODY_INITIAL_LINEAR_VELOCITY InitialLinearVelocity VECTOR UNIT
RIGID_BODY_INITIAL_ANGULAR_VELOCITY InitialAngularVelocity VECTOR UNIT
RIGID_BODY_LOCAL_INITIAL_VELOCITY ObjectCoordinates BOOL ANIM
RIGID_BODY_DYNAMIC_TRANSITION DynamicTransition BOOL  
RIGID_BODY_TRANSITION_TIME TransitionTime BASETIME MIN
RIGID_BODY_SLEEPING_LINEAR_VELOCITY LinearVelocityThreshold REAL
MIN 0.0
UNIT METER
RIGID_BODY_SLEEPING_ANGULAR_VELOCITY AngularVelocityThreshold REAL
MIN 0.0
UNIT DEGREE
RIGID_BODY_HIERARCHY InheritTag LONG  
RIGID_BODY_HIERARCHY_NONE None
RIGID_BODY_HIERARCHY_APPLY_TAG ApplyTagtoChildren
RIGID_BODY_HIERARCHY_COMPOUND_SHAPE CompoundCollisionShape
RIGID_BODY_SPLIT_CACHE IndividualElements LONG  
RIGID_BODY_SPLIT_CACHE_OFF Off
RIGID_BODY_SPLIT_CACHE_TOP_LEVEL TopLevel
RIGID_BODY_SPLIT_CACHE_SECOND_LEVEL SecondLevel
RIGID_BODY_SPLIT_CACHE_ON All
RIGID_BODY_SELF_COLLISIONS SelfCollisions BOOL  
RIGID_BODY_SHAPE_DEFORMEDSTATE UseDeformedObject BOOL  
RIGID_BODY_SHAPE Shape LONG  
RIGID_BODY_SHAPE_DEFAULT Automatic
RIGID_BODY_SHAPE_DEFAULT_MODYNAMICS Automatic(MoDynamics)
RIGID_BODY_SHAPE_BOX Box
RIGID_BODY_SHAPE_ELLIPSOID Ellipsoid
RIGID_BODY_SHAPE_CYLINDER_X CylinderX-Axis
RIGID_BODY_SHAPE_CYLINDER_Y CylinderY-Axis
RIGID_BODY_SHAPE_CYLINDER_Z CylinderZ-Axis
RIGID_BODY_SHAPE_CONVEX_HULL ConvexHull
RIGID_BODY_SHAPE_KINETIC_MESH MovingMesh
RIGID_BODY_SHAPE_STATIC_MESH StaticMesh
RIGID_BODY_SHAPE_REFERENCE AnotherObject
RIGID_BODY_SHAPE_NO_SHAPE Off
RIGID_BODY_SHAPE_SIZE_INCREMENT SizeIncrement REAL UNIT
RIGID_BODY_SPECIFIC_MARGIN UseCollisionMargin BOOL ANIM
RIGID_BODY_MARGIN Margin REAL
MIN 0.0
UNIT METER
RIGID_BODY_REFERENCE_SHAPE Object LINK  
RIGID_BODY_SB_KEEP_SHAPE KeepSoftBodyShape BOOL  
RIGID_BODY_RESTITUTION Bounce REAL
MIN 0.0
UNIT PERCENT
STEP 5.0
RIGID_BODY_FRICTION Friction REAL
MIN 0.0
UNIT PERCENT
STEP 5.0
RIGID_BODY_COLLISION_NOISE CollisionNoise REAL
MIN 0.0
MAX 90.0
UNIT PERCENT
STEP 0.1
RIGID_BODY_MASS_SWITCH UseMass LONG ANIM
RIGID_BODY_MASS_SWITCH_DEFAULT WorldDensity
RIGID_BODY_MASS_SWITCH_DENSITY CustomDensity
RIGID_BODY_MASS_SWITCH_MASS CustomMass
RIGID_BODY_DENSITY Density REAL
MINEX
MIN 0.0
RIGID_BODY_MASS Mass REAL
MINEX
MIN 0.0
RIGID_BODY_INERTIA_FACTOR RotationalMass REAL
MIN 1
MAX 10000
UNIT PERCENT
RIGID_BODY_USE_CENTER_OF_MASS UseCenterofMass BOOL ANIM
RIGID_BODY_CENTER_OF_MASS CenterofMass VECTOR UNIT
RIGID_BODY_LINEAR_FOLLOW_STRENGTH FollowPosition REAL
MIN 0.0
MAX 100.0
RIGID_BODY_ANGULAR_FOLLOW_STRENGTH FollowRotation REAL
MIN 0.0
MAX 100.0
RIGID_BODY_LINEAR_DAMPING LinearDamping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_ANGULAR_DAMPING AngularDamping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_FORCE_MODE ForceMode LONG  
RIGID_BODY_FORCE_MODE_INCLUDE Include
RIGID_BODY_FORCE_MODE_EXCLUDE Exclude
RIGID_BODY_FORCE_INCLUDE_LIST ForceList IN_EXCLUDE
NUM_FLAGS 0
INIT_STATE 0
SEND_SELCHNGMSG 1
RIGID_BODY_AERODYNAMICS_DRAG Drag REAL
MIN 0.0
UNIT PERCENT
STEP 0.1
RIGID_BODY_AERODYNAMICS_LIFT Lift REAL
MIN 0.0
UNIT PERCENT
STEP 0.1
RIGID_BODY_AERODYNAMICS_TWO_SIDED Two-Sided BOOL  
RIGID_BODY_SOFT SoftBody LONG  
RIGID_BODY_SOFT_OFF Off
RIGID_BODY_SOFT_ON MadeofPolygons/Lines
RIGID_BODY_SOFT_OF_CLONES MadeofClones
RIGID_BODY_SB_REST_STATE RestState LINK  
RIGID_BODY_SB_MASS_MAP MassMap LINK  
RIGID_BODY_SB_ACCURATE_SOLVER UseAccurateSolver BOOL  
RIGID_BODY_SB_STRUCTURAL Structural REAL MIN
RIGID_BODY_SB_STRUCTURAL_MAP Map LINK  
RIGID_BODY_SB_STRUCTURAL_DAMPING Damping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_STRUCTURAL_DAMPING_MAP Map LINK  
RIGID_BODY_SB_ELASTIC_LIMIT ElasticLimit REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_ELASTIC_LIMIT_MAP Map LINK  
RIGID_BODY_SB_SHEAR Shear REAL MIN
RIGID_BODY_SB_SHEAR_MAP Map LINK  
RIGID_BODY_SB_SHEAR_DAMPING Damping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_SHEAR_DAMPING_MAP Map LINK  
RIGID_BODY_SB_FLEXION Flexion REAL MIN
RIGID_BODY_SB_FLEXION_MAP Map LINK  
RIGID_BODY_SB_FLEXION_DAMPING Damping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_FLEXION_DAMPING_MAP Map LINK  
RIGID_BODY_SB_FLEXION_ELASTIC_LIMIT ElasticLimit REAL
MIN 0.0
MAX 180.0
UNIT DEGREE
STEP 1.0
RIGID_BODY_SB_FLEXION_ELASTIC_LIMIT_MAP Map LINK  
RIGID_BODY_SB_REST_LENGTH RestLength REAL
MIN 1.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_REST_LENGTH_MAP Map LINK  
RIGID_BODY_SB_TEAR_OUT_LENGTH Tear-outLength REAL
MIN 1.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_TEAR_OUT_LENGTH_MAP Map LINK  
RIGID_BODY_SB_CLONE_ROTATION FixRotation REAL MIN
RIGID_BODY_SB_CLONE_ROTATION_MAP Map LINK  
RIGID_BODY_SB_CLONE_ROTATION_DAMPING Damping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_CLONE_ROTATION_DAMPING_MAP Map LINK  
RIGID_BODY_SB_SHAPE_CONSERVATION Stiffness REAL MIN
RIGID_BODY_SB_SHAPE_CONSERVATION_MAP Map LINK  
RIGID_BODY_SB_SHAPE_VOLUME_CONSERVATION Volume REAL
MIN 0.0
MAX 100.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_SHAPE_CONSERVATION_DAMPING Damping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_SB_SHAPE_CONSERVATION_DAMPING_MAP Map LINK  
RIGID_BODY_SB_SHAPE_CONSERVATION_ELASTIC_LIMIT ElasticLimit REAL
MIN 0.0
UNIT METER
STEP 1.0
RIGID_BODY_SB_SHAPE_CONSERVATION_ELASTIC_LIMIT_MAP Map LINK  
RIGID_BODY_SB_PRESSURE Pressure REAL  
RIGID_BODY_SB_VOLUME_CONSERVATION VolumeConservation REAL MIN
RIGID_BODY_SB_PRESSURE_DAMPING Damping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
RIGID_BODY_CACHE_LOCAL LocalCoordinates BOOL  
RIGID_BODY_CACHE_INCLUDE_COLLISIONS IncludeCollisionData BOOL  
RIGID_BODY_CACHE_BAKE BakeObject BUTTON  
RIGID_BODY_CACHE_BAKE_ALL BakeAll BUTTON  
RIGID_BODY_CACHE_CLEAR ClearObjectCache BUTTON  
RIGID_BODY_CACHE_CLEAR_ALL ClearAllCaches BUTTON  
RIGID_BODY_CACHE_USE UseCachedData BOOL  

Example Code

The following code does not use the correct values when setting the data. You should check directly in C4D for the correct values that you should use in place of the ones that are shown. This code is just to show you how to access the values for getting and setting the parameters.

Python

import c4d
from c4d import gui
def main():
    obj = c4d.BaseObject(c4d.Osphere)
    tag = obj.MakeTag(c4d.DynRigidBodyTag)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.RIGID_BODY_ENABLED] = True
    tag[c4d.RIGID_BODY_DYNAMIC] = c4d.RIGID_BODY_DYNAMIC_OFF
    tag[c4d.RIGID_BODY_SHOW] = True
    tag[c4d.RIGID_BODY_TRIGGER] = c4d.RIGID_BODY_TRIGGER_IMMEDIATELY
    tag[c4d.RIGID_BODY_TRIGGER_ON_COLLISION_VELOCITY] = 0.1
    tag[c4d.RIGID_BODY_USE_INITIAL_VELOCITY] = True
    tag[c4d.RIGID_BODY_INITIAL_LINEAR_VELOCITY] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.RIGID_BODY_INITIAL_ANGULAR_VELOCITY] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.RIGID_BODY_LOCAL_INITIAL_VELOCITY] = True
    tag[c4d.RIGID_BODY_DYNAMIC_TRANSITION] = True
    tag[c4d.RIGID_BODY_SLEEPING_LINEAR_VELOCITY] = 0.1
    tag[c4d.RIGID_BODY_SLEEPING_ANGULAR_VELOCITY] = 0.1
    tag[c4d.RIGID_BODY_HIERARCHY] = c4d.RIGID_BODY_HIERARCHY_NONE
    tag[c4d.RIGID_BODY_SPLIT_CACHE] = c4d.RIGID_BODY_SPLIT_CACHE_OFF
    tag[c4d.RIGID_BODY_SELF_COLLISIONS] = True
    tag[c4d.RIGID_BODY_SHAPE_DEFORMEDSTATE] = True
    tag[c4d.RIGID_BODY_SHAPE] = c4d.RIGID_BODY_SHAPE_DEFAULT
    tag[c4d.RIGID_BODY_SHAPE_SIZE_INCREMENT] = 0.1
    tag[c4d.RIGID_BODY_SPECIFIC_MARGIN] = True
    tag[c4d.RIGID_BODY_MARGIN] = 0.1
    tag[c4d.RIGID_BODY_SB_KEEP_SHAPE] = True
    tag[c4d.RIGID_BODY_RESTITUTION] = 0.1
    tag[c4d.RIGID_BODY_FRICTION] = 0.1
    tag[c4d.RIGID_BODY_COLLISION_NOISE] = 0.1
    tag[c4d.RIGID_BODY_MASS_SWITCH] = c4d.RIGID_BODY_MASS_SWITCH_DEFAULT
    tag[c4d.RIGID_BODY_DENSITY] = 0.1
    tag[c4d.RIGID_BODY_MASS] = 0.1
    tag[c4d.RIGID_BODY_INERTIA_FACTOR] = 0.1
    tag[c4d.RIGID_BODY_USE_CENTER_OF_MASS] = True
    tag[c4d.RIGID_BODY_CENTER_OF_MASS] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.RIGID_BODY_LINEAR_FOLLOW_STRENGTH] = 0.1
    tag[c4d.RIGID_BODY_ANGULAR_FOLLOW_STRENGTH] = 0.1
    tag[c4d.RIGID_BODY_LINEAR_DAMPING] = 0.1
    tag[c4d.RIGID_BODY_ANGULAR_DAMPING] = 0.1
    tag[c4d.RIGID_BODY_FORCE_MODE] = c4d.RIGID_BODY_FORCE_MODE_INCLUDE
    tag[c4d.RIGID_BODY_AERODYNAMICS_DRAG] = 0.1
    tag[c4d.RIGID_BODY_AERODYNAMICS_LIFT] = 0.1
    tag[c4d.RIGID_BODY_AERODYNAMICS_TWO_SIDED] = True
    tag[c4d.RIGID_BODY_SOFT] = c4d.RIGID_BODY_SOFT_OFF
    tag[c4d.RIGID_BODY_SB_ACCURATE_SOLVER] = True
    tag[c4d.RIGID_BODY_SB_STRUCTURAL] = 0.1
    tag[c4d.RIGID_BODY_SB_STRUCTURAL_DAMPING] = 0.1
    tag[c4d.RIGID_BODY_SB_ELASTIC_LIMIT] = 0.1
    tag[c4d.RIGID_BODY_SB_SHEAR] = 0.1
    tag[c4d.RIGID_BODY_SB_SHEAR_DAMPING] = 0.1
    tag[c4d.RIGID_BODY_SB_FLEXION] = 0.1
    tag[c4d.RIGID_BODY_SB_FLEXION_DAMPING] = 0.1
    tag[c4d.RIGID_BODY_SB_FLEXION_ELASTIC_LIMIT] = 0.1
    tag[c4d.RIGID_BODY_SB_REST_LENGTH] = 0.1
    tag[c4d.RIGID_BODY_SB_TEAR_OUT_LENGTH] = 0.1
    tag[c4d.RIGID_BODY_SB_CLONE_ROTATION] = 0.1
    tag[c4d.RIGID_BODY_SB_CLONE_ROTATION_DAMPING] = 0.1
    tag[c4d.RIGID_BODY_SB_SHAPE_CONSERVATION] = 0.1
    tag[c4d.RIGID_BODY_SB_SHAPE_VOLUME_CONSERVATION] = 0.1
    tag[c4d.RIGID_BODY_SB_SHAPE_CONSERVATION_DAMPING] = 0.1
    tag[c4d.RIGID_BODY_SB_SHAPE_CONSERVATION_ELASTIC_LIMIT] = 0.1
    tag[c4d.RIGID_BODY_SB_PRESSURE] = 0.1
    tag[c4d.RIGID_BODY_SB_VOLUME_CONSERVATION] = 0.1
    tag[c4d.RIGID_BODY_SB_PRESSURE_DAMPING] = 0.1
    tag[c4d.RIGID_BODY_CACHE_LOCAL] = True
    tag[c4d.RIGID_BODY_CACHE_INCLUDE_COLLISIONS] = True
    tag[c4d.RIGID_BODY_CACHE_USE] = True
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetBool(c4d.RIGID_BODY_ENABLED,True)
    bc.SetInt32(c4d.RIGID_BODY_DYNAMIC,c4d.RIGID_BODY_DYNAMIC_OFF)
    bc.SetBool(c4d.RIGID_BODY_SHOW,True)
    bc.SetInt32(c4d.RIGID_BODY_TRIGGER,c4d.RIGID_BODY_TRIGGER_IMMEDIATELY)
    bc.SetFloat(c4d.RIGID_BODY_TRIGGER_ON_COLLISION_VELOCITY,0.1)
    bc.SetBool(c4d.RIGID_BODY_USE_INITIAL_VELOCITY,True)
    bc.SetVector(c4d.RIGID_BODY_INITIAL_LINEAR_VELOCITY, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.RIGID_BODY_INITIAL_ANGULAR_VELOCITY, c4d.Vector(1.0,1.0,1.0)
    bc.SetBool(c4d.RIGID_BODY_LOCAL_INITIAL_VELOCITY,True)
    bc.SetBool(c4d.RIGID_BODY_DYNAMIC_TRANSITION,True)
    bc.SetFloat(c4d.RIGID_BODY_SLEEPING_LINEAR_VELOCITY,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SLEEPING_ANGULAR_VELOCITY,0.1)
    bc.SetInt32(c4d.RIGID_BODY_HIERARCHY,c4d.RIGID_BODY_HIERARCHY_NONE)
    bc.SetInt32(c4d.RIGID_BODY_SPLIT_CACHE,c4d.RIGID_BODY_SPLIT_CACHE_OFF)
    bc.SetBool(c4d.RIGID_BODY_SELF_COLLISIONS,True)
    bc.SetBool(c4d.RIGID_BODY_SHAPE_DEFORMEDSTATE,True)
    bc.SetInt32(c4d.RIGID_BODY_SHAPE,c4d.RIGID_BODY_SHAPE_DEFAULT)
    bc.SetFloat(c4d.RIGID_BODY_SHAPE_SIZE_INCREMENT,0.1)
    bc.SetBool(c4d.RIGID_BODY_SPECIFIC_MARGIN,True)
    bc.SetFloat(c4d.RIGID_BODY_MARGIN,0.1)
    bc.SetBool(c4d.RIGID_BODY_SB_KEEP_SHAPE,True)
    bc.SetFloat(c4d.RIGID_BODY_RESTITUTION,0.1)
    bc.SetFloat(c4d.RIGID_BODY_FRICTION,0.1)
    bc.SetFloat(c4d.RIGID_BODY_COLLISION_NOISE,0.1)
    bc.SetInt32(c4d.RIGID_BODY_MASS_SWITCH,c4d.RIGID_BODY_MASS_SWITCH_DEFAULT)
    bc.SetFloat(c4d.RIGID_BODY_DENSITY,0.1)
    bc.SetFloat(c4d.RIGID_BODY_MASS,0.1)
    bc.SetFloat(c4d.RIGID_BODY_INERTIA_FACTOR,0.1)
    bc.SetBool(c4d.RIGID_BODY_USE_CENTER_OF_MASS,True)
    bc.SetVector(c4d.RIGID_BODY_CENTER_OF_MASS, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.RIGID_BODY_LINEAR_FOLLOW_STRENGTH,0.1)
    bc.SetFloat(c4d.RIGID_BODY_ANGULAR_FOLLOW_STRENGTH,0.1)
    bc.SetFloat(c4d.RIGID_BODY_LINEAR_DAMPING,0.1)
    bc.SetFloat(c4d.RIGID_BODY_ANGULAR_DAMPING,0.1)
    bc.SetInt32(c4d.RIGID_BODY_FORCE_MODE,c4d.RIGID_BODY_FORCE_MODE_INCLUDE)
    bc.SetFloat(c4d.RIGID_BODY_AERODYNAMICS_DRAG,0.1)
    bc.SetFloat(c4d.RIGID_BODY_AERODYNAMICS_LIFT,0.1)
    bc.SetBool(c4d.RIGID_BODY_AERODYNAMICS_TWO_SIDED,True)
    bc.SetInt32(c4d.RIGID_BODY_SOFT,c4d.RIGID_BODY_SOFT_OFF)
    bc.SetBool(c4d.RIGID_BODY_SB_ACCURATE_SOLVER,True)
    bc.SetFloat(c4d.RIGID_BODY_SB_STRUCTURAL,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_STRUCTURAL_DAMPING,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_ELASTIC_LIMIT,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_SHEAR,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_SHEAR_DAMPING,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_FLEXION,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_FLEXION_DAMPING,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_FLEXION_ELASTIC_LIMIT,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_REST_LENGTH,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_TEAR_OUT_LENGTH,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_CLONE_ROTATION,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_CLONE_ROTATION_DAMPING,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_SHAPE_CONSERVATION,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_SHAPE_VOLUME_CONSERVATION,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_SHAPE_CONSERVATION_DAMPING,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_SHAPE_CONSERVATION_ELASTIC_LIMIT,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_PRESSURE,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_VOLUME_CONSERVATION,0.1)
    bc.SetFloat(c4d.RIGID_BODY_SB_PRESSURE_DAMPING,0.1)
    bc.SetBool(c4d.RIGID_BODY_CACHE_LOCAL,True)
    bc.SetBool(c4d.RIGID_BODY_CACHE_INCLUDE_COLLISIONS,True)
    bc.SetBool(c4d.RIGID_BODY_CACHE_USE,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../dynamics/description/dynrigidbodytag.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Osphere);
    pDoc->InsertObject(pObject);
    pDoc->StartUndo();
    pDoc->AddUndo(UNDOTYPE_NEW,pObject);
    pDoc->EndUndo();
    pDoc->StartUndo();
    BaseTag *pTag = pObject->MakeTag(DynRigidBodyTag);
    pDoc->AddUndo(UNDOTYPE_NEW,pTag);
    pDoc->EndUndo();
    pObject->Message(MSG_UPDATE);
    
    //You can set parameters two different ways. 

    //First way              
    //Some objects do not store all their data in the container. You need to use GetParameter()/SetParameter() instead. 

    DESCFLAGS_SET flags = DESCFLAGS_SET_PARAM_SET;
    pTag->SetParameter(DescID(RIGID_BODY_ENABLED),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_DYNAMIC),GeData(RIGID_BODY_DYNAMIC_OFF),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SHOW),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_TRIGGER),GeData(RIGID_BODY_TRIGGER_IMMEDIATELY),flags);
    pTag->SetParameter(DescID(RIGID_BODY_TRIGGER_ON_COLLISION_VELOCITY),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_USE_INITIAL_VELOCITY),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_INITIAL_LINEAR_VELOCITY),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(RIGID_BODY_INITIAL_ANGULAR_VELOCITY),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(RIGID_BODY_LOCAL_INITIAL_VELOCITY),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_DYNAMIC_TRANSITION),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SLEEPING_LINEAR_VELOCITY),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SLEEPING_ANGULAR_VELOCITY),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_HIERARCHY),GeData(RIGID_BODY_HIERARCHY_NONE),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SPLIT_CACHE),GeData(RIGID_BODY_SPLIT_CACHE_OFF),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SELF_COLLISIONS),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SHAPE_DEFORMEDSTATE),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SHAPE),GeData(RIGID_BODY_SHAPE_DEFAULT),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SHAPE_SIZE_INCREMENT),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SPECIFIC_MARGIN),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_MARGIN),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_KEEP_SHAPE),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_RESTITUTION),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_FRICTION),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_COLLISION_NOISE),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_MASS_SWITCH),GeData(RIGID_BODY_MASS_SWITCH_DEFAULT),flags);
    pTag->SetParameter(DescID(RIGID_BODY_DENSITY),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_MASS),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_INERTIA_FACTOR),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_USE_CENTER_OF_MASS),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_CENTER_OF_MASS),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(RIGID_BODY_LINEAR_FOLLOW_STRENGTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_ANGULAR_FOLLOW_STRENGTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_LINEAR_DAMPING),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_ANGULAR_DAMPING),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_FORCE_MODE),GeData(RIGID_BODY_FORCE_MODE_INCLUDE),flags);
    pTag->SetParameter(DescID(RIGID_BODY_AERODYNAMICS_DRAG),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_AERODYNAMICS_LIFT),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_AERODYNAMICS_TWO_SIDED),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SOFT),GeData(RIGID_BODY_SOFT_OFF),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_ACCURATE_SOLVER),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_STRUCTURAL),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_STRUCTURAL_DAMPING),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_ELASTIC_LIMIT),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_SHEAR),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_SHEAR_DAMPING),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_FLEXION),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_FLEXION_DAMPING),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_FLEXION_ELASTIC_LIMIT),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_REST_LENGTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_TEAR_OUT_LENGTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_CLONE_ROTATION),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_CLONE_ROTATION_DAMPING),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_SHAPE_CONSERVATION),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_SHAPE_VOLUME_CONSERVATION),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_SHAPE_CONSERVATION_DAMPING),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_SHAPE_CONSERVATION_ELASTIC_LIMIT),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_PRESSURE),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_VOLUME_CONSERVATION),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_SB_PRESSURE_DAMPING),GeData(0.1),flags);
    pTag->SetParameter(DescID(RIGID_BODY_CACHE_LOCAL),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_CACHE_INCLUDE_COLLISIONS),GeData(true),flags);
    pTag->SetParameter(DescID(RIGID_BODY_CACHE_USE),GeData(true),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetBool(RIGID_BODY_ENABLED,true);
    bc->SetInt32(RIGID_BODY_DYNAMIC,RIGID_BODY_DYNAMIC_OFF);
    bc->SetBool(RIGID_BODY_SHOW,true);
    bc->SetInt32(RIGID_BODY_TRIGGER,RIGID_BODY_TRIGGER_IMMEDIATELY);
    bc->SetFloat(RIGID_BODY_TRIGGER_ON_COLLISION_VELOCITY,0.1);
    bc->SetBool(RIGID_BODY_USE_INITIAL_VELOCITY,true);
    bc->SetVector(RIGID_BODY_INITIAL_LINEAR_VELOCITY, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(RIGID_BODY_INITIAL_ANGULAR_VELOCITY, c4d.Vector(1.0,1.0,1.0);
    bc->SetBool(RIGID_BODY_LOCAL_INITIAL_VELOCITY,true);
    bc->SetBool(RIGID_BODY_DYNAMIC_TRANSITION,true);
    bc->SetFloat(RIGID_BODY_SLEEPING_LINEAR_VELOCITY,0.1);
    bc->SetFloat(RIGID_BODY_SLEEPING_ANGULAR_VELOCITY,0.1);
    bc->SetInt32(RIGID_BODY_HIERARCHY,RIGID_BODY_HIERARCHY_NONE);
    bc->SetInt32(RIGID_BODY_SPLIT_CACHE,RIGID_BODY_SPLIT_CACHE_OFF);
    bc->SetBool(RIGID_BODY_SELF_COLLISIONS,true);
    bc->SetBool(RIGID_BODY_SHAPE_DEFORMEDSTATE,true);
    bc->SetInt32(RIGID_BODY_SHAPE,RIGID_BODY_SHAPE_DEFAULT);
    bc->SetFloat(RIGID_BODY_SHAPE_SIZE_INCREMENT,0.1);
    bc->SetBool(RIGID_BODY_SPECIFIC_MARGIN,true);
    bc->SetFloat(RIGID_BODY_MARGIN,0.1);
    bc->SetBool(RIGID_BODY_SB_KEEP_SHAPE,true);
    bc->SetFloat(RIGID_BODY_RESTITUTION,0.1);
    bc->SetFloat(RIGID_BODY_FRICTION,0.1);
    bc->SetFloat(RIGID_BODY_COLLISION_NOISE,0.1);
    bc->SetInt32(RIGID_BODY_MASS_SWITCH,RIGID_BODY_MASS_SWITCH_DEFAULT);
    bc->SetFloat(RIGID_BODY_DENSITY,0.1);
    bc->SetFloat(RIGID_BODY_MASS,0.1);
    bc->SetFloat(RIGID_BODY_INERTIA_FACTOR,0.1);
    bc->SetBool(RIGID_BODY_USE_CENTER_OF_MASS,true);
    bc->SetVector(RIGID_BODY_CENTER_OF_MASS, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(RIGID_BODY_LINEAR_FOLLOW_STRENGTH,0.1);
    bc->SetFloat(RIGID_BODY_ANGULAR_FOLLOW_STRENGTH,0.1);
    bc->SetFloat(RIGID_BODY_LINEAR_DAMPING,0.1);
    bc->SetFloat(RIGID_BODY_ANGULAR_DAMPING,0.1);
    bc->SetInt32(RIGID_BODY_FORCE_MODE,RIGID_BODY_FORCE_MODE_INCLUDE);
    bc->SetFloat(RIGID_BODY_AERODYNAMICS_DRAG,0.1);
    bc->SetFloat(RIGID_BODY_AERODYNAMICS_LIFT,0.1);
    bc->SetBool(RIGID_BODY_AERODYNAMICS_TWO_SIDED,true);
    bc->SetInt32(RIGID_BODY_SOFT,RIGID_BODY_SOFT_OFF);
    bc->SetBool(RIGID_BODY_SB_ACCURATE_SOLVER,true);
    bc->SetFloat(RIGID_BODY_SB_STRUCTURAL,0.1);
    bc->SetFloat(RIGID_BODY_SB_STRUCTURAL_DAMPING,0.1);
    bc->SetFloat(RIGID_BODY_SB_ELASTIC_LIMIT,0.1);
    bc->SetFloat(RIGID_BODY_SB_SHEAR,0.1);
    bc->SetFloat(RIGID_BODY_SB_SHEAR_DAMPING,0.1);
    bc->SetFloat(RIGID_BODY_SB_FLEXION,0.1);
    bc->SetFloat(RIGID_BODY_SB_FLEXION_DAMPING,0.1);
    bc->SetFloat(RIGID_BODY_SB_FLEXION_ELASTIC_LIMIT,0.1);
    bc->SetFloat(RIGID_BODY_SB_REST_LENGTH,0.1);
    bc->SetFloat(RIGID_BODY_SB_TEAR_OUT_LENGTH,0.1);
    bc->SetFloat(RIGID_BODY_SB_CLONE_ROTATION,0.1);
    bc->SetFloat(RIGID_BODY_SB_CLONE_ROTATION_DAMPING,0.1);
    bc->SetFloat(RIGID_BODY_SB_SHAPE_CONSERVATION,0.1);
    bc->SetFloat(RIGID_BODY_SB_SHAPE_VOLUME_CONSERVATION,0.1);
    bc->SetFloat(RIGID_BODY_SB_SHAPE_CONSERVATION_DAMPING,0.1);
    bc->SetFloat(RIGID_BODY_SB_SHAPE_CONSERVATION_ELASTIC_LIMIT,0.1);
    bc->SetFloat(RIGID_BODY_SB_PRESSURE,0.1);
    bc->SetFloat(RIGID_BODY_SB_VOLUME_CONSERVATION,0.1);
    bc->SetFloat(RIGID_BODY_SB_PRESSURE_DAMPING,0.1);
    bc->SetBool(RIGID_BODY_CACHE_LOCAL,true);
    bc->SetBool(RIGID_BODY_CACHE_INCLUDE_COLLISIONS,true);
    bc->SetBool(RIGID_BODY_CACHE_USE,true);
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

This node has buttons. Buttons can manually be executed by calling the following code

Python

c4d.CallButton(tag,c4d.RIGID_BODY_SET_INITIAL_STATE)
c4d.CallButton(tag,c4d.RIGID_BODY_CLEAR_INITIAL_STATE)
c4d.CallButton(tag,c4d.RIGID_BODY_CACHE_BAKE)
c4d.CallButton(tag,c4d.RIGID_BODY_CACHE_BAKE_ALL)
c4d.CallButton(tag,c4d.RIGID_BODY_CACHE_CLEAR)
c4d.CallButton(tag,c4d.RIGID_BODY_CACHE_CLEAR_ALL)

C++

DescriptionCommand dc;
dc.id = DescID(RIGID_BODY_SET_INITIAL_STATE);             
pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);

DescriptionCommand dc; dc.id = DescID(RIGID_BODY_CLEAR_INITIAL_STATE); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(RIGID_BODY_CACHE_BAKE); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(RIGID_BODY_CACHE_BAKE_ALL); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(RIGID_BODY_CACHE_CLEAR); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(RIGID_BODY_CACHE_CLEAR_ALL); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);