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 Ocacluster

Ocacluster

Attributes

  • ENGLISH NAME : Cluster
  • NAME : Ocacluster
  • INCLUDE : Obase
  • PATH : ca/description/ocacluster.res
  • PLUGIN : ca
  • MAXON online help (may not exist): OCACLUSTER

Elements

ID UI Name Type Parameters Cycle
ID_CA_CLUSTER_OBJECT_LINK Points LINK  
ID_CA_CLUSTER_OBJECT_TARGET Target LINK  
ID_CA_CLUSTER_OBJECT_TARGET_ADD Set BUTTON  
ID_CA_CLUSTER_OBJECT_STRENGTH Strength REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_CLUSTER_OBJECT_TRANSFORM Transform LONG SCALE_H
ID_CA_CLUSTER_OBJECT_TRANSFORM_LOCAL Local
ID_CA_CLUSTER_OBJECT_TRANSFORM_WORLD World
ID_CA_CLUSTER_OBJECT_MATRIX Matrix LONG SCALE_H
ID_CA_CLUSTER_OBJECT_MATRIX_OBJECT Object
ID_CA_CLUSTER_OBJECT_MATRIX_POINT_CENTER PointCenter
ID_CA_CLUSTER_OBJECT_MATRIX_POINT_ALIGN PointAlign
ID_CA_CLUSTER_OBJECT_ALIGN_AXIS Axis LONG SCALE_H
ID_CA_CLUSTER_OBJECT_ALIGN_AXIS_X X
ID_CA_CLUSTER_OBJECT_ALIGN_AXIS_Y Y
ID_CA_CLUSTER_OBJECT_ALIGN_AXIS_Z Z
ID_CA_CLUSTER_FALLOFF_MODE Falloff LONG SCALE_H
ID_CA_CLUSTER_FALLOFF_MODE_NONE None
ID_CA_CLUSTER_FALLOFF_MODE_WORLD World
ID_CA_CLUSTER_FALLOFF_MODE_LOCAL Local
ID_CA_CLUSTER_FALLOFF_MODE_SURFACE Surface
ID_CA_CLUSTER_FALLOFF Type LONG SCALE_H
ID_CA_CLUSTER_FALLOFF_SIMPLE Hardness
ID_CA_CLUSTER_FALLOFF_LINEAR Linear
ID_CA_CLUSTER_FALLOFF_DOME Dome
ID_CA_CLUSTER_FALLOFF_BELL Bell
ID_CA_CLUSTER_FALLOFF_CIRCLE Circle
ID_CA_CLUSTER_FALLOFF_NEEDLE Needle
ID_CA_CLUSTER_FALLOFF_SPLINE Curve
ID_CA_CLUSTER_FALLOFF_RADIUS Radius REAL
UNIT METER
MIN 0.0
MAXSLIDER 100.0
SCALE_H
CUSTOMGUI REALSLIDER
ID_CA_CLUSTER_WIDTH Width REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_CLUSTER_HARDNESS Hardness REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_CLUSTER_FALLOFF_CURVE Curve SPLINE  
ID_CA_CLUSTER_OBJECT_MAINTAIN_OFFSET Maintain BOOL  
ID_CA_CLUSTER_OBJECT_MAINTAIN_P_OFFSET P VECTOR
UNIT METER
CUSTOMGUI SUBDESCRIPTION
ID_CA_CLUSTER_OBJECT_MAINTAIN_S_OFFSET S VECTOR
STEP 0.01
CUSTOMGUI SUBDESCRIPTION
ID_CA_CLUSTER_OBJECT_MAINTAIN_R_OFFSET R VECTOR
UNIT DEGREE
CUSTOMGUI SUBDESCRIPTION
ID_CA_CLUSTER_OBJECT_P_WEIGHT P REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_CLUSTER_OBJECT_P_WEIGHT_MAP Map LINK  
ID_CA_CLUSTER_OBJECT_S_WEIGHT S REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_CLUSTER_OBJECT_S_WEIGHT_MAP Map LINK  
ID_CA_CLUSTER_OBJECT_R_WEIGHT R REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_CLUSTER_OBJECT_R_WEIGHT_MAP Map LINK  
ID_CA_CLUSTER_EFFECTOR Effectors IN_EXCLUDE
NUM_FLAGS 0
INIT_STATE 1
SEND_SELCHNGMSG 1
SCALE_V

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.Ocacluster)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.ID_CA_CLUSTER_OBJECT_STRENGTH] = 0.1
    obj[c4d.ID_CA_CLUSTER_OBJECT_TRANSFORM] = c4d.ID_CA_CLUSTER_OBJECT_TRANSFORM_LOCAL
    obj[c4d.ID_CA_CLUSTER_OBJECT_MATRIX] = c4d.ID_CA_CLUSTER_OBJECT_MATRIX_OBJECT
    obj[c4d.ID_CA_CLUSTER_OBJECT_ALIGN_AXIS] = c4d.ID_CA_CLUSTER_OBJECT_ALIGN_AXIS_X
    obj[c4d.ID_CA_CLUSTER_FALLOFF_MODE] = c4d.ID_CA_CLUSTER_FALLOFF_MODE_NONE
    obj[c4d.ID_CA_CLUSTER_FALLOFF] = c4d.ID_CA_CLUSTER_FALLOFF_SIMPLE
    obj[c4d.ID_CA_CLUSTER_FALLOFF_RADIUS] = 0.1
    obj[c4d.ID_CA_CLUSTER_WIDTH] = 0.1
    obj[c4d.ID_CA_CLUSTER_HARDNESS] = 0.1
    obj[c4d.ID_CA_CLUSTER_OBJECT_MAINTAIN_OFFSET] = True
    obj[c4d.ID_CA_CLUSTER_OBJECT_MAINTAIN_P_OFFSET] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.ID_CA_CLUSTER_OBJECT_MAINTAIN_S_OFFSET] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.ID_CA_CLUSTER_OBJECT_MAINTAIN_R_OFFSET] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.ID_CA_CLUSTER_OBJECT_P_WEIGHT] = 0.1
    obj[c4d.ID_CA_CLUSTER_OBJECT_S_WEIGHT] = 0.1
    obj[c4d.ID_CA_CLUSTER_OBJECT_R_WEIGHT] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetFloat(c4d.ID_CA_CLUSTER_OBJECT_STRENGTH,0.1)
    bc.SetInt32(c4d.ID_CA_CLUSTER_OBJECT_TRANSFORM,c4d.ID_CA_CLUSTER_OBJECT_TRANSFORM_LOCAL)
    bc.SetInt32(c4d.ID_CA_CLUSTER_OBJECT_MATRIX,c4d.ID_CA_CLUSTER_OBJECT_MATRIX_OBJECT)
    bc.SetInt32(c4d.ID_CA_CLUSTER_OBJECT_ALIGN_AXIS,c4d.ID_CA_CLUSTER_OBJECT_ALIGN_AXIS_X)
    bc.SetInt32(c4d.ID_CA_CLUSTER_FALLOFF_MODE,c4d.ID_CA_CLUSTER_FALLOFF_MODE_NONE)
    bc.SetInt32(c4d.ID_CA_CLUSTER_FALLOFF,c4d.ID_CA_CLUSTER_FALLOFF_SIMPLE)
    bc.SetFloat(c4d.ID_CA_CLUSTER_FALLOFF_RADIUS,0.1)
    bc.SetFloat(c4d.ID_CA_CLUSTER_WIDTH,0.1)
    bc.SetFloat(c4d.ID_CA_CLUSTER_HARDNESS,0.1)
    bc.SetBool(c4d.ID_CA_CLUSTER_OBJECT_MAINTAIN_OFFSET,True)
    bc.SetVector(c4d.ID_CA_CLUSTER_OBJECT_MAINTAIN_P_OFFSET, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.ID_CA_CLUSTER_OBJECT_MAINTAIN_S_OFFSET, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.ID_CA_CLUSTER_OBJECT_MAINTAIN_R_OFFSET, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.ID_CA_CLUSTER_OBJECT_P_WEIGHT,0.1)
    bc.SetFloat(c4d.ID_CA_CLUSTER_OBJECT_S_WEIGHT,0.1)
    bc.SetFloat(c4d.ID_CA_CLUSTER_OBJECT_R_WEIGHT,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../ca/description/ocacluster.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Ocacluster);
    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_CLUSTER_OBJECT_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_TRANSFORM),GeData(ID_CA_CLUSTER_OBJECT_TRANSFORM_LOCAL),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_MATRIX),GeData(ID_CA_CLUSTER_OBJECT_MATRIX_OBJECT),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_ALIGN_AXIS),GeData(ID_CA_CLUSTER_OBJECT_ALIGN_AXIS_X),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_FALLOFF_MODE),GeData(ID_CA_CLUSTER_FALLOFF_MODE_NONE),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_FALLOFF),GeData(ID_CA_CLUSTER_FALLOFF_SIMPLE),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_FALLOFF_RADIUS),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_WIDTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_HARDNESS),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_MAINTAIN_OFFSET),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_MAINTAIN_P_OFFSET),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_MAINTAIN_S_OFFSET),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_MAINTAIN_R_OFFSET),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_P_WEIGHT),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_S_WEIGHT),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_CLUSTER_OBJECT_R_WEIGHT),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetFloat(ID_CA_CLUSTER_OBJECT_STRENGTH,0.1);
    bc->SetInt32(ID_CA_CLUSTER_OBJECT_TRANSFORM,ID_CA_CLUSTER_OBJECT_TRANSFORM_LOCAL);
    bc->SetInt32(ID_CA_CLUSTER_OBJECT_MATRIX,ID_CA_CLUSTER_OBJECT_MATRIX_OBJECT);
    bc->SetInt32(ID_CA_CLUSTER_OBJECT_ALIGN_AXIS,ID_CA_CLUSTER_OBJECT_ALIGN_AXIS_X);
    bc->SetInt32(ID_CA_CLUSTER_FALLOFF_MODE,ID_CA_CLUSTER_FALLOFF_MODE_NONE);
    bc->SetInt32(ID_CA_CLUSTER_FALLOFF,ID_CA_CLUSTER_FALLOFF_SIMPLE);
    bc->SetFloat(ID_CA_CLUSTER_FALLOFF_RADIUS,0.1);
    bc->SetFloat(ID_CA_CLUSTER_WIDTH,0.1);
    bc->SetFloat(ID_CA_CLUSTER_HARDNESS,0.1);
    bc->SetBool(ID_CA_CLUSTER_OBJECT_MAINTAIN_OFFSET,true);
    bc->SetVector(ID_CA_CLUSTER_OBJECT_MAINTAIN_P_OFFSET, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(ID_CA_CLUSTER_OBJECT_MAINTAIN_S_OFFSET, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(ID_CA_CLUSTER_OBJECT_MAINTAIN_R_OFFSET, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(ID_CA_CLUSTER_OBJECT_P_WEIGHT,0.1);
    bc->SetFloat(ID_CA_CLUSTER_OBJECT_S_WEIGHT,0.1);
    bc->SetFloat(ID_CA_CLUSTER_OBJECT_R_WEIGHT,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_CLUSTER_OBJECT_TARGET_ADD)

C++

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