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 Ocacollisiondeformer

Ocacollisiondeformer

Attributes

  • ENGLISH NAME : CollisionDeformer
  • NAME : Ocacollisiondeformer
  • INCLUDE : Obase
  • PATH : ca/description/ocacollisiondeformer.res
  • PLUGIN : ca
  • MAXON online help (may not exist): OCACOLLISIONDEFORMER

Elements

ID UI Name Type Parameters Cycle
ID_CA_COLLISION_DEFORMER_OBJECT_COORDS Falloff LONG SCALE_H
ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_NONE None
ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_UV UV
ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_LENGTH Distance
ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_SURFACE Surface
ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_COLLIDER Collider
ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE Distance REAL
UNIT METER
MIN 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
ID_CA_COLLISION_DEFORMER_OBJECT_FALLOFF_STRENGTH Strength REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 200.0
CUSTOMGUI REALSLIDER
ID_CA_COLLISION_DEFORMER_OBJECT_RESTORESHAPE RestoreShape REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_COLLISION_DEFORMER_OBJECT_FALLOFF Curve SPLINE
ALLOW_VERT_SCALE_MOVE
USE_OPTIMAL_RANGE
X_MIN 0
X_MAX 1
OPTIMAL_X_MIN 0
OPTIMAL_X_MAX 1
OPTIMAL_Y_MIN 0
OPTIMAL_Y_MAX 1
Y_MIN -1
Y_MAX 1
ID_CA_COLLISION_DEFORMER_MOTION Solver LONG SCALE_H
ID_CA_COLLISION_DEFORMER_MOTION_INSIDE Inside
ID_CA_COLLISION_DEFORMER_MOTION_INSIDE_STRETCH Inside(Stretch)
ID_CA_COLLISION_DEFORMER_MOTION_OUTSIDE Outside
ID_CA_COLLISION_DEFORMER_MOTION_OUTSIDE_FULL Outside(Volume)
ID_CA_COLLISION_DEFORMER_MOTION_INTERSECT Intersect
ID_CA_COLLISION_DEFORMER_OBJECT_COLLIDERS Objects IN_EXCLUDE
NUM_FLAGS 2
INIT_STATE 3
SEND_SELCHNGMSG 1
SCALE_V
IMAGE_01_ON 1009316
IMAGE_01_OFF 1009320
IMAGE_02_ON 300000231
IMAGE_02_OFF 300000230
ID_CA_COLLISION_DEFORMER_OBJECTS Objects IN_EXCLUDE
NUM_FLAGS 1
INIT_STATE 1
SEND_SELCHNGMSG 1
SCALE_V
IMAGE_01_ON 1009316
IMAGE_01_OFF 1009320
ID_CA_COLLISION_DEFORMER_OBJECT_STRETCH_MAP Stretch/Relax LINK  
ID_CA_COLLISION_DEFORMER_OBJECT_FALLOFF_MAP Falloff LINK  
ID_CA_COLLISION_DEFORMER_OBJECT_RESTORE_MAP Restore LINK  
ID_CA_COLLISION_DEFORMER_OBJECT_COLLISION_MAP Collision LINK  
ID_CA_COLLISION_DEFORMER_OBJECT_COLLISION_MAP_INVERT Invert BOOL  
ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE_MAP Falloff LINK  
ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE_MAP_INVERT Invert BOOL  
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_ENABLE Enable BOOL  
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_COMPRESSED Compress BOOL
SCALE_H
ANIM OFF
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CALCULATE Calculate BUTTON SCALE_H
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_UPDATE Update BUTTON SCALE_H
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_DELETE EmptyCache BUTTON SCALE_H
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_LOAD Load... BUTTON SCALE_H
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_SAVE Save... BUTTON SCALE_H
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_AUTOTIME AutoTime BOOL
SCALE_H
ANIM OFF
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_START Start BASETIME
SCALE_H
ANIM OFF
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_STOP Stop BASETIME
SCALE_H
ANIM OFF
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_OFFSET Offset BASETIME
SCALE_H
ANIM OFF
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_TIMESCALE Scale REAL
UNIT PERCENT
MIN 0.0
SCALE_H
ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_LIMIT Cache LONG
MIN 1
MAX 1000
ANIM OFF
ID_CA_COLLISION_DEFORMER_OBJECT_SIZE Size REAL UNIT
ID_CA_COLLISION_DEFORMER_OBJECT_SAMPLING Steps LONG MIN
ID_CA_COLLISION_DEFORMER_OBJECT_ITER Stretch LONG MIN
ID_CA_COLLISION_DEFORMER_OBJECT_RELAX_ITER Relax LONG MIN
ID_CA_COLLISION_DEFORMER_OBJECT_STIFF Stiffness REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_COLLISION_DEFORMER_OBJECT_STRUCT Struct REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_COLLISION_DEFORMER_OBJECT_FLEX Flex REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER

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.Ocacollisiondeformer)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_COORDS] = c4d.ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_NONE
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE] = 0.1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_FALLOFF_STRENGTH] = 0.1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_RESTORESHAPE] = 0.1
    obj[c4d.ID_CA_COLLISION_DEFORMER_MOTION] = c4d.ID_CA_COLLISION_DEFORMER_MOTION_INSIDE
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_COLLISION_MAP_INVERT] = True
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE_MAP_INVERT] = True
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_ENABLE] = True
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_COMPRESSED] = True
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_AUTOTIME] = True
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_TIMESCALE] = 0.1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_LIMIT] = 1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_SIZE] = 0.1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_SAMPLING] = 1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_ITER] = 1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_RELAX_ITER] = 1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_STIFF] = 0.1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_STRUCT] = 0.1
    obj[c4d.ID_CA_COLLISION_DEFORMER_OBJECT_FLEX] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_COORDS,c4d.ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_NONE)
    bc.SetFloat(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE,0.1)
    bc.SetFloat(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_FALLOFF_STRENGTH,0.1)
    bc.SetFloat(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_RESTORESHAPE,0.1)
    bc.SetInt32(c4d.ID_CA_COLLISION_DEFORMER_MOTION,c4d.ID_CA_COLLISION_DEFORMER_MOTION_INSIDE)
    bc.SetBool(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_COLLISION_MAP_INVERT,True)
    bc.SetBool(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE_MAP_INVERT,True)
    bc.SetBool(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_ENABLE,True)
    bc.SetBool(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_COMPRESSED,True)
    bc.SetBool(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_AUTOTIME,True)
    bc.SetFloat(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_TIMESCALE,0.1)
    bc.SetInt32(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_LIMIT,1)
    bc.SetFloat(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_SIZE,0.1)
    bc.SetInt32(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_SAMPLING,1)
    bc.SetInt32(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_ITER,1)
    bc.SetInt32(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_RELAX_ITER,1)
    bc.SetFloat(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_STIFF,0.1)
    bc.SetFloat(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_STRUCT,0.1)
    bc.SetFloat(c4d.ID_CA_COLLISION_DEFORMER_OBJECT_FLEX,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../ca/description/ocacollisiondeformer.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Ocacollisiondeformer);
    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(ID_CA_COLLISION_DEFORMER_OBJECT_COORDS),GeData(ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_NONE),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_FALLOFF_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_RESTORESHAPE),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_MOTION),GeData(ID_CA_COLLISION_DEFORMER_MOTION_INSIDE),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_COLLISION_MAP_INVERT),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE_MAP_INVERT),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_ENABLE),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_COMPRESSED),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_AUTOTIME),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_TIMESCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_LIMIT),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_SIZE),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_SAMPLING),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_ITER),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_RELAX_ITER),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_STIFF),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_STRUCT),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_COLLISION_DEFORMER_OBJECT_FLEX),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(ID_CA_COLLISION_DEFORMER_OBJECT_COORDS,ID_CA_COLLISION_DEFORMER_OBJECT_COORDS_NONE);
    bc->SetFloat(ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE,0.1);
    bc->SetFloat(ID_CA_COLLISION_DEFORMER_OBJECT_FALLOFF_STRENGTH,0.1);
    bc->SetFloat(ID_CA_COLLISION_DEFORMER_OBJECT_RESTORESHAPE,0.1);
    bc->SetInt32(ID_CA_COLLISION_DEFORMER_MOTION,ID_CA_COLLISION_DEFORMER_MOTION_INSIDE);
    bc->SetBool(ID_CA_COLLISION_DEFORMER_OBJECT_COLLISION_MAP_INVERT,true);
    bc->SetBool(ID_CA_COLLISION_DEFORMER_OBJECT_DISTANCE_MAP_INVERT,true);
    bc->SetBool(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_ENABLE,true);
    bc->SetBool(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_COMPRESSED,true);
    bc->SetBool(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_AUTOTIME,true);
    bc->SetFloat(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_TIMESCALE,0.1);
    bc->SetInt32(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_LIMIT,1);
    bc->SetFloat(ID_CA_COLLISION_DEFORMER_OBJECT_SIZE,0.1);
    bc->SetInt32(ID_CA_COLLISION_DEFORMER_OBJECT_SAMPLING,1);
    bc->SetInt32(ID_CA_COLLISION_DEFORMER_OBJECT_ITER,1);
    bc->SetInt32(ID_CA_COLLISION_DEFORMER_OBJECT_RELAX_ITER,1);
    bc->SetFloat(ID_CA_COLLISION_DEFORMER_OBJECT_STIFF,0.1);
    bc->SetFloat(ID_CA_COLLISION_DEFORMER_OBJECT_STRUCT,0.1);
    bc->SetFloat(ID_CA_COLLISION_DEFORMER_OBJECT_FLEX,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(obj,c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CALCULATE)
c4d.CallButton(obj,c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_UPDATE)
c4d.CallButton(obj,c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_DELETE)
c4d.CallButton(obj,c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_LOAD)
c4d.CallButton(obj,c4d.ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_SAVE)

C++

DescriptionCommand dc;
dc.id = DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CALCULATE);             
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);

DescriptionCommand dc; dc.id = DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_UPDATE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_DELETE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_LOAD); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(ID_CA_COLLISION_DEFORMER_OBJECT_CACHE_CACHE_SAVE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);