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 Ocajiggle

Ocajiggle

Attributes

  • ENGLISH NAME : Jiggle
  • NAME : Ocajiggle
  • INCLUDE : Obase
  • PATH : ca/description/ocajiggle.res
  • PLUGIN : ca
  • MAXON online help (may not exist): OCAJIGGLE

Elements

ID UI Name Type Parameters Cycle
ID_CA_JIGGLE_OBJECT_ONSTOP OnStopped BOOL  
ID_CA_JIGGLE_OBJECT_LOCAL Local BOOL  
ID_CA_JIGGLE_OBJECT_SOURCE Points LINK HIDDEN
ID_CA_JIGGLE_OBJECT_STRENGTH Strength REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
ID_CA_JIGGLE_OBJECT_STIFFNESS Stiffness REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
ID_CA_JIGGLE_OBJECT_STIFFNESS_MAP Map LINK SCALE_H
ID_CA_JIGGLE_OBJECT_STRUCTUAL_STIFFNESS Structural REAL
SCALE_H
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_JIGGLE_OBJECT_STRUCTUAL_STIFFNESS_MAP Map LINK SCALE_H
ID_CA_JIGGLE_OBJECT_DRAG Drag REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
ID_CA_JIGGLE_OBJECT_DRAG_MAP Map LINK SCALE_H
ID_CA_JIGGLE_OBJECT_MOTION_SCALE MotionScale REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
ID_CA_JIGGLE_OBJECT_SPRINGS Springs LONG
MIN 0
MAX 100
ID_CA_JIGGLE_OBJECT_ITERATIONS Iterations LONG
MIN 1
MAX 1000
ID_CA_JIGGLE_OBJECT_RESTRICT Restrict IN_EXCLUDE
NUM_FLAGS 0
INIT_STATE 1
SEND_SELCHNGMSG 1
SCALE_V
ID_CA_JIGGLE_OBJECT_GRAVITY Gravity REAL  
ID_CA_JIGGLE_OBJECT_FORCES_MAP Map LINK  
ID_CA_JIGGLE_OBJECT_FORCES Forces IN_EXCLUDE
NUM_FLAGS 0
INIT_STATE 1
SEND_SELCHNGMSG 1
SCALE_V
ID_CA_JIGGLE_OBJECT_CACHE_ENABLE Enable BOOL  
ID_CA_JIGGLE_OBJECT_CACHE_COMPRESSED Compress BOOL
SCALE_H
ANIM OFF
ID_CA_JIGGLE_OBJECT_CACHE_CALCULATE Calculate BUTTON SCALE_H
ID_CA_JIGGLE_OBJECT_CACHE_UPDATE Update BUTTON SCALE_H
ID_CA_JIGGLE_OBJECT_CACHE_DELETE EmptyCache BUTTON SCALE_H
ID_CA_JIGGLE_OBJECT_CACHE_CACHE_LOAD Load... BUTTON SCALE_H
ID_CA_JIGGLE_OBJECT_CACHE_CACHE_SAVE Save... BUTTON SCALE_H
ID_CA_JIGGLE_OBJECT_CACHE_AUTOTIME AutoTime BOOL
SCALE_H
ANIM OFF
ID_CA_JIGGLE_OBJECT_CACHE_START Start BASETIME
SCALE_H
ANIM OFF
ID_CA_JIGGLE_OBJECT_CACHE_STOP Stop BASETIME
SCALE_H
ANIM OFF
ID_CA_JIGGLE_OBJECT_CACHE_OFFSET Offset BASETIME
SCALE_H
ANIM OFF
ID_CA_JIGGLE_OBJECT_CACHE_TIMESCALE Scale REAL
UNIT PERCENT
MIN 0.0
SCALE_H
ID_CA_JIGGLE_OBJECT_CACHE_CACHE_LIMIT Cache LONG
MIN 1
MAX 1000
ANIM OFF

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.Ocajiggle)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.ID_CA_JIGGLE_OBJECT_ONSTOP] = True
    obj[c4d.ID_CA_JIGGLE_OBJECT_LOCAL] = True
    obj[c4d.ID_CA_JIGGLE_OBJECT_STRENGTH] = 0.1
    obj[c4d.ID_CA_JIGGLE_OBJECT_STIFFNESS] = 0.1
    obj[c4d.ID_CA_JIGGLE_OBJECT_STRUCTUAL_STIFFNESS] = 0.1
    obj[c4d.ID_CA_JIGGLE_OBJECT_DRAG] = 0.1
    obj[c4d.ID_CA_JIGGLE_OBJECT_MOTION_SCALE] = 0.1
    obj[c4d.ID_CA_JIGGLE_OBJECT_SPRINGS] = 1
    obj[c4d.ID_CA_JIGGLE_OBJECT_ITERATIONS] = 1
    obj[c4d.ID_CA_JIGGLE_OBJECT_GRAVITY] = 0.1
    obj[c4d.ID_CA_JIGGLE_OBJECT_CACHE_ENABLE] = True
    obj[c4d.ID_CA_JIGGLE_OBJECT_CACHE_COMPRESSED] = True
    obj[c4d.ID_CA_JIGGLE_OBJECT_CACHE_AUTOTIME] = True
    obj[c4d.ID_CA_JIGGLE_OBJECT_CACHE_TIMESCALE] = 0.1
    obj[c4d.ID_CA_JIGGLE_OBJECT_CACHE_CACHE_LIMIT] = 1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.ID_CA_JIGGLE_OBJECT_ONSTOP,True)
    bc.SetBool(c4d.ID_CA_JIGGLE_OBJECT_LOCAL,True)
    bc.SetFloat(c4d.ID_CA_JIGGLE_OBJECT_STRENGTH,0.1)
    bc.SetFloat(c4d.ID_CA_JIGGLE_OBJECT_STIFFNESS,0.1)
    bc.SetFloat(c4d.ID_CA_JIGGLE_OBJECT_STRUCTUAL_STIFFNESS,0.1)
    bc.SetFloat(c4d.ID_CA_JIGGLE_OBJECT_DRAG,0.1)
    bc.SetFloat(c4d.ID_CA_JIGGLE_OBJECT_MOTION_SCALE,0.1)
    bc.SetInt32(c4d.ID_CA_JIGGLE_OBJECT_SPRINGS,1)
    bc.SetInt32(c4d.ID_CA_JIGGLE_OBJECT_ITERATIONS,1)
    bc.SetFloat(c4d.ID_CA_JIGGLE_OBJECT_GRAVITY,0.1)
    bc.SetBool(c4d.ID_CA_JIGGLE_OBJECT_CACHE_ENABLE,True)
    bc.SetBool(c4d.ID_CA_JIGGLE_OBJECT_CACHE_COMPRESSED,True)
    bc.SetBool(c4d.ID_CA_JIGGLE_OBJECT_CACHE_AUTOTIME,True)
    bc.SetFloat(c4d.ID_CA_JIGGLE_OBJECT_CACHE_TIMESCALE,0.1)
    bc.SetInt32(c4d.ID_CA_JIGGLE_OBJECT_CACHE_CACHE_LIMIT,1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../ca/description/ocajiggle.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Ocajiggle);
    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_JIGGLE_OBJECT_ONSTOP),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_LOCAL),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_STIFFNESS),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_STRUCTUAL_STIFFNESS),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_DRAG),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_MOTION_SCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_SPRINGS),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_ITERATIONS),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_GRAVITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_CACHE_ENABLE),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_CACHE_COMPRESSED),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_CACHE_AUTOTIME),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_CACHE_TIMESCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_JIGGLE_OBJECT_CACHE_CACHE_LIMIT),GeData(1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(ID_CA_JIGGLE_OBJECT_ONSTOP,true);
    bc->SetBool(ID_CA_JIGGLE_OBJECT_LOCAL,true);
    bc->SetFloat(ID_CA_JIGGLE_OBJECT_STRENGTH,0.1);
    bc->SetFloat(ID_CA_JIGGLE_OBJECT_STIFFNESS,0.1);
    bc->SetFloat(ID_CA_JIGGLE_OBJECT_STRUCTUAL_STIFFNESS,0.1);
    bc->SetFloat(ID_CA_JIGGLE_OBJECT_DRAG,0.1);
    bc->SetFloat(ID_CA_JIGGLE_OBJECT_MOTION_SCALE,0.1);
    bc->SetInt32(ID_CA_JIGGLE_OBJECT_SPRINGS,1);
    bc->SetInt32(ID_CA_JIGGLE_OBJECT_ITERATIONS,1);
    bc->SetFloat(ID_CA_JIGGLE_OBJECT_GRAVITY,0.1);
    bc->SetBool(ID_CA_JIGGLE_OBJECT_CACHE_ENABLE,true);
    bc->SetBool(ID_CA_JIGGLE_OBJECT_CACHE_COMPRESSED,true);
    bc->SetBool(ID_CA_JIGGLE_OBJECT_CACHE_AUTOTIME,true);
    bc->SetFloat(ID_CA_JIGGLE_OBJECT_CACHE_TIMESCALE,0.1);
    bc->SetInt32(ID_CA_JIGGLE_OBJECT_CACHE_CACHE_LIMIT,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_JIGGLE_OBJECT_CACHE_CALCULATE)
c4d.CallButton(obj,c4d.ID_CA_JIGGLE_OBJECT_CACHE_UPDATE)
c4d.CallButton(obj,c4d.ID_CA_JIGGLE_OBJECT_CACHE_DELETE)
c4d.CallButton(obj,c4d.ID_CA_JIGGLE_OBJECT_CACHE_CACHE_LOAD)
c4d.CallButton(obj,c4d.ID_CA_JIGGLE_OBJECT_CACHE_CACHE_SAVE)

C++

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

DescriptionCommand dc; dc.id = DescID(ID_CA_JIGGLE_OBJECT_CACHE_UPDATE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(ID_CA_JIGGLE_OBJECT_CACHE_DELETE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(ID_CA_JIGGLE_OBJECT_CACHE_CACHE_LOAD); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(ID_CA_JIGGLE_OBJECT_CACHE_CACHE_SAVE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);