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 Ocastep

Ocastep

Attributes

  • ENGLISH NAME : CMotionStep
  • NAME : Ocastep
  • INCLUDE : Obase
  • PATH : ca/description/ocastep.res
  • PLUGIN : ca
  • MAXON online help (may not exist): OCASTEP

Elements

ID UI Name Type Parameters Cycle
ID_CA_OBJECT_STEP_DISPLAY Display LONG ANIM
ID_CA_OBJECT_STEP_DISPLAY_NONE None
ID_CA_OBJECT_STEP_DISPLAY_RECT Rectangle
ID_CA_OBJECT_STEP_DISPLAY_CIRCLE Circle
ID_CA_OBJECT_STEP_DISPLAY_PLANE Orientation LONG ANIM
ID_CA_OBJECT_STEP_DISPLAY_PLANE_XY XY
ID_CA_OBJECT_STEP_DISPLAY_PLANE_ZY ZY
ID_CA_OBJECT_STEP_DISPLAY_PLANE_XZ XZ
ID_CA_OBJECT_STEP_WIDTH Width REAL
UNIT METER
SCALE_H
ANIM OFF
ID_CA_OBJECT_STEP_HEIGHT Length REAL
UNIT METER
SCALE_H
ANIM OFF
ID_CA_OBJECT_STEP_HUB_LINK Hub LINK ANIM
ID_CA_OBJECT_STEP_TARGET_LINK Target LINK ANIM
ID_CA_OBJECT_STEP_STEP_MODE Type LONG  
ID_CA_OBJECT_STEP_STEP_MODE_HOLDER Group
ID_CA_OBJECT_STEP_STEP_MODE_STEPS Steps
ID_CA_OBJECT_STEP_STEP_MODE_STEP Step
ID_CA_OBJECT_STEP_STEP Step LONG
ANIM OFF
SCALE_H

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.Ocastep)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.ID_CA_OBJECT_STEP_DISPLAY] = c4d.ID_CA_OBJECT_STEP_DISPLAY_NONE
    obj[c4d.ID_CA_OBJECT_STEP_DISPLAY_PLANE] = c4d.ID_CA_OBJECT_STEP_DISPLAY_PLANE_XY
    obj[c4d.ID_CA_OBJECT_STEP_WIDTH] = 0.1
    obj[c4d.ID_CA_OBJECT_STEP_HEIGHT] = 0.1
    obj[c4d.ID_CA_OBJECT_STEP_STEP_MODE] = c4d.ID_CA_OBJECT_STEP_STEP_MODE_HOLDER
    obj[c4d.ID_CA_OBJECT_STEP_STEP] = 1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.ID_CA_OBJECT_STEP_DISPLAY,c4d.ID_CA_OBJECT_STEP_DISPLAY_NONE)
    bc.SetInt32(c4d.ID_CA_OBJECT_STEP_DISPLAY_PLANE,c4d.ID_CA_OBJECT_STEP_DISPLAY_PLANE_XY)
    bc.SetFloat(c4d.ID_CA_OBJECT_STEP_WIDTH,0.1)
    bc.SetFloat(c4d.ID_CA_OBJECT_STEP_HEIGHT,0.1)
    bc.SetInt32(c4d.ID_CA_OBJECT_STEP_STEP_MODE,c4d.ID_CA_OBJECT_STEP_STEP_MODE_HOLDER)
    bc.SetInt32(c4d.ID_CA_OBJECT_STEP_STEP,1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../ca/description/ocastep.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Ocastep);
    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_OBJECT_STEP_DISPLAY),GeData(ID_CA_OBJECT_STEP_DISPLAY_NONE),flags);
    pObject->SetParameter(DescID(ID_CA_OBJECT_STEP_DISPLAY_PLANE),GeData(ID_CA_OBJECT_STEP_DISPLAY_PLANE_XY),flags);
    pObject->SetParameter(DescID(ID_CA_OBJECT_STEP_WIDTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_OBJECT_STEP_HEIGHT),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_OBJECT_STEP_STEP_MODE),GeData(ID_CA_OBJECT_STEP_STEP_MODE_HOLDER),flags);
    pObject->SetParameter(DescID(ID_CA_OBJECT_STEP_STEP),GeData(1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(ID_CA_OBJECT_STEP_DISPLAY,ID_CA_OBJECT_STEP_DISPLAY_NONE);
    bc->SetInt32(ID_CA_OBJECT_STEP_DISPLAY_PLANE,ID_CA_OBJECT_STEP_DISPLAY_PLANE_XY);
    bc->SetFloat(ID_CA_OBJECT_STEP_WIDTH,0.1);
    bc->SetFloat(ID_CA_OBJECT_STEP_HEIGHT,0.1);
    bc->SetInt32(ID_CA_OBJECT_STEP_STEP_MODE,ID_CA_OBJECT_STEP_STEP_MODE_HOLDER);
    bc->SetInt32(ID_CA_OBJECT_STEP_STEP,1);
    pObject->Message(MSG_UPDATE);                                                      
}