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 DynInteraction

DynInteraction

Attributes

  • ENGLISH NAME :
  • INCLUDE : Obase
  • PATH : dynamics/description/dyninteraction.res
  • PLUGIN : dynamics
  • MAXON online help (may not exist): DYNINTERACTION

Elements

ID UI Name Type Parameters Cycle
FORCE_TYPE Type LONG  
FORCE_TYPE_LINEAR Linear
180000010
FORCE_TYPE_ANGULAR Angular
180000181
FORCE_TYPE_BOTH LinearandAngular
180000182
FORCE_OBJECT_A ObjectA LINK  
FORCE_REFERENCE_A ReferenceAxisA LONG  
FORCE_REFERENCE_X XofObject
FORCE_REFERENCE_Y YofObject
FORCE_REFERENCE_Z ZofObject
FORCE_REFERENCE_DIRECTION DirectiontoObject
FORCE_APPLICATION_A AttachmentA LONG  
FORCE_APPLICATION_COM CenterofMass
FORCE_APPLICATION_OFFSET Offset
FORCE_APPLICATION_POLYPOINT PolygonPoint
FORCE_APPLICATION_POINT_SELECTION PointSelection
FORCE_OFFSET_A Offset VECTOR UNIT
FORCE_POINT_A Index LONG  
FORCE_POINT_SELECTION_A Map LINK ANIM
FORCE_REGION_A RegionOfInfluence REAL
MIN 1.0
MAX 1000.0
UNIT PERCENT
STEP 1.0
FORCE_POINT_SELECTION_SHAPE_CONSERVATION_A ShapeConservation REAL MIN
FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_A Damping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
FORCE_OBJECT_B ObjectB LINK  
FORCE_REFERENCE_B ReferenceAxisB LONG  
FORCE_REFERENCE_X XofObject
FORCE_REFERENCE_Y YofObject
FORCE_REFERENCE_Z ZofObject
FORCE_REFERENCE_DIRECTION DirectiontoObject
FORCE_APPLICATION_B AttachmentB LONG  
FORCE_APPLICATION_COM CenterofMass
FORCE_APPLICATION_OFFSET Offset
FORCE_APPLICATION_POLYPOINT PolygonPoint
FORCE_APPLICATION_POINT_SELECTION PointSelection
FORCE_OFFSET_B Offset VECTOR UNIT
FORCE_POINT_B Index LONG  
FORCE_POINT_SELECTION_B Map LINK ANIM
FORCE_REGION_B RegionOfInfluence REAL
MIN 1.0
MAX 1000.0
UNIT PERCENT
STEP 1.0
FORCE_POINT_SELECTION_SHAPE_CONSERVATION_B ShapeConservation REAL MIN
FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_B Damping REAL
MIN 0.0
UNIT PERCENT
STEP 1.0
FORCE_ALWAYS_VISIBLE AlwaysVisible BOOL  
FORCE_SIZE DrawSize REAL
MIN 0.0
MINEX
UNIT METER

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.DynInteraction)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.FORCE_TYPE] = c4d.FORCE_TYPE_LINEAR
    obj[c4d.FORCE_REFERENCE_A] = c4d.FORCE_REFERENCE_X
    obj[c4d.FORCE_APPLICATION_A] = c4d.FORCE_APPLICATION_COM
    obj[c4d.FORCE_OFFSET_A] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.FORCE_POINT_A] = 1
    obj[c4d.FORCE_REGION_A] = 0.1
    obj[c4d.FORCE_POINT_SELECTION_SHAPE_CONSERVATION_A] = 0.1
    obj[c4d.FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_A] = 0.1
    obj[c4d.FORCE_REFERENCE_B] = c4d.FORCE_REFERENCE_X
    obj[c4d.FORCE_APPLICATION_B] = c4d.FORCE_APPLICATION_COM
    obj[c4d.FORCE_OFFSET_B] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.FORCE_POINT_B] = 1
    obj[c4d.FORCE_REGION_B] = 0.1
    obj[c4d.FORCE_POINT_SELECTION_SHAPE_CONSERVATION_B] = 0.1
    obj[c4d.FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_B] = 0.1
    obj[c4d.FORCE_ALWAYS_VISIBLE] = True
    obj[c4d.FORCE_SIZE] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.FORCE_TYPE,c4d.FORCE_TYPE_LINEAR)
    bc.SetInt32(c4d.FORCE_REFERENCE_A,c4d.FORCE_REFERENCE_X)
    bc.SetInt32(c4d.FORCE_APPLICATION_A,c4d.FORCE_APPLICATION_COM)
    bc.SetVector(c4d.FORCE_OFFSET_A, c4d.Vector(1.0,1.0,1.0)
    bc.SetInt32(c4d.FORCE_POINT_A,1)
    bc.SetFloat(c4d.FORCE_REGION_A,0.1)
    bc.SetFloat(c4d.FORCE_POINT_SELECTION_SHAPE_CONSERVATION_A,0.1)
    bc.SetFloat(c4d.FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_A,0.1)
    bc.SetInt32(c4d.FORCE_REFERENCE_B,c4d.FORCE_REFERENCE_X)
    bc.SetInt32(c4d.FORCE_APPLICATION_B,c4d.FORCE_APPLICATION_COM)
    bc.SetVector(c4d.FORCE_OFFSET_B, c4d.Vector(1.0,1.0,1.0)
    bc.SetInt32(c4d.FORCE_POINT_B,1)
    bc.SetFloat(c4d.FORCE_REGION_B,0.1)
    bc.SetFloat(c4d.FORCE_POINT_SELECTION_SHAPE_CONSERVATION_B,0.1)
    bc.SetFloat(c4d.FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_B,0.1)
    bc.SetBool(c4d.FORCE_ALWAYS_VISIBLE,True)
    bc.SetFloat(c4d.FORCE_SIZE,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../dynamics/description/dyninteraction.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(DynInteraction);
    pDoc->InsertObject(pObject);
    pDoc->StartUndo();
    pDoc->AddUndo(UNDO_NEW,pObject);
    pDoc->EndUndo();
    EventAdd(EVENT_FORCEREDRAW);
    
    //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;
    pObject->SetParameter(DescID(FORCE_TYPE),GeData(FORCE_TYPE_LINEAR),flags);
    pObject->SetParameter(DescID(FORCE_REFERENCE_A),GeData(FORCE_REFERENCE_X),flags);
    pObject->SetParameter(DescID(FORCE_APPLICATION_A),GeData(FORCE_APPLICATION_COM),flags);
    pObject->SetParameter(DescID(FORCE_OFFSET_A),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(FORCE_POINT_A),GeData(1),flags);
    pObject->SetParameter(DescID(FORCE_REGION_A),GeData(0.1),flags);
    pObject->SetParameter(DescID(FORCE_POINT_SELECTION_SHAPE_CONSERVATION_A),GeData(0.1),flags);
    pObject->SetParameter(DescID(FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_A),GeData(0.1),flags);
    pObject->SetParameter(DescID(FORCE_REFERENCE_B),GeData(FORCE_REFERENCE_X),flags);
    pObject->SetParameter(DescID(FORCE_APPLICATION_B),GeData(FORCE_APPLICATION_COM),flags);
    pObject->SetParameter(DescID(FORCE_OFFSET_B),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(FORCE_POINT_B),GeData(1),flags);
    pObject->SetParameter(DescID(FORCE_REGION_B),GeData(0.1),flags);
    pObject->SetParameter(DescID(FORCE_POINT_SELECTION_SHAPE_CONSERVATION_B),GeData(0.1),flags);
    pObject->SetParameter(DescID(FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_B),GeData(0.1),flags);
    pObject->SetParameter(DescID(FORCE_ALWAYS_VISIBLE),GeData(true),flags);
    pObject->SetParameter(DescID(FORCE_SIZE),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(FORCE_TYPE,FORCE_TYPE_LINEAR);
    bc->SetInt32(FORCE_REFERENCE_A,FORCE_REFERENCE_X);
    bc->SetInt32(FORCE_APPLICATION_A,FORCE_APPLICATION_COM);
    bc->SetVector(FORCE_OFFSET_A, c4d.Vector(1.0,1.0,1.0);
    bc->SetInt32(FORCE_POINT_A,1);
    bc->SetFloat(FORCE_REGION_A,0.1);
    bc->SetFloat(FORCE_POINT_SELECTION_SHAPE_CONSERVATION_A,0.1);
    bc->SetFloat(FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_A,0.1);
    bc->SetInt32(FORCE_REFERENCE_B,FORCE_REFERENCE_X);
    bc->SetInt32(FORCE_APPLICATION_B,FORCE_APPLICATION_COM);
    bc->SetVector(FORCE_OFFSET_B, c4d.Vector(1.0,1.0,1.0);
    bc->SetInt32(FORCE_POINT_B,1);
    bc->SetFloat(FORCE_REGION_B,0.1);
    bc->SetFloat(FORCE_POINT_SELECTION_SHAPE_CONSERVATION_B,0.1);
    bc->SetFloat(FORCE_POINT_SELECTION_SHAPE_CONSERVATION_DAMPING_B,0.1);
    bc->SetBool(FORCE_ALWAYS_VISIBLE,true);
    bc->SetFloat(FORCE_SIZE,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}