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 Tcaikspline

Tcaikspline

Attributes

  • ENGLISH NAME : IK-Spline
  • NAME : Tcaikspline
  • INCLUDE : Texpression
  • PATH : ca/description/tcaikspline.res
  • PLUGIN : ca
  • MAXON online help (may not exist): TCAIKSPLINE

Elements

ID UI Name Type Parameters Cycle
ID_CA_IKSPLINE_TAG_STRENGTH Strength REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_IKSPLINE_TAG_TYPE Type LONG
FIT_H
SCALE_H
ID_CA_IKSPLINE_TAG_TYPE_NONE None
ID_CA_IKSPLINE_TAG_TYPE_FIT Fit
ID_CA_IKSPLINE_TAG_TYPE_EQUAL Equal
ID_CA_IKSPLINE_TAG_TYPE_REL Relative
ID_CA_IKSPLINE_TAG_AIM Aim LONG
FIT_H
SCALE_H
ID_CA_IKSPLINE_TAG_AIM_TANGENT Tangent
ID_CA_IKSPLINE_TAG_AIM_JOINT Joint
ID_CA_IKSPLINE_TAG_ALIGN_TANGENT Align LONG
FIT_H
SCALE_H
ID_CA_IKSPLINE_TAG_ALIGN_X X
ID_CA_IKSPLINE_TAG_ALIGN_Y Y
ID_CA_IKSPLINE_TAG_ALIGN_Z Z
ID_CA_IKSPLINE_TAG_ALIGN_AXIS Axis LONG
FIT_H
SCALE_H
ID_CA_IKSPLINE_TAG_ALIGN_X X
ID_CA_IKSPLINE_TAG_ALIGN_Y Y
ID_CA_IKSPLINE_TAG_ALIGN_Z Z
ID_CA_IKSPLINE_TAG_SPLINE Spline LINK  
ID_CA_IKSPLINE_TAG_END End LINK  
ID_CA_IKSPLINE_TAG_TWIST_TYPE Twist LONG  
ID_CA_IKSPLINE_TAG_TWIST_TYPE_NONE None
ID_CA_IKSPLINE_TAG_TWIST_TYPE_WORLD World
ID_CA_IKSPLINE_TAG_TWIST_TYPE_LOCAL Object
ID_CA_IKSPLINE_TAG_TWIST_AXIS Angle LONG  
ID_CA_IKSPLINE_TAG_TWIST_AXIS_H H
ID_CA_IKSPLINE_TAG_TWIST_AXIS_P P
ID_CA_IKSPLINE_TAG_TWIST_AXIS_B B
ID_CA_IKSPLINE_TAG_TWIST_CURVE Twist SPLINE  
ID_CA_IKSPLINE_HANDLE_ADD Add BUTTON
FIT_H
SCALE_H
ID_CA_IKSPLINE_HANDLE_CREATE Create BUTTON
FIT_H
SCALE_H
ID_CA_IKSPLINE_HANDLE_REMOVE Remove BUTTON
FIT_H
SCALE_H
ID_CA_IKSPLINE_HANDLE_INDEX Index LONG
HIDDEN
MIN 0
ID_CA_IKSPLINE_HANDLE_LINK Object LINK HIDDEN
ID_CA_IKSPLINE_HANDLE_TWIST Twist BOOL HIDDEN
ID_CA_IKSPLINE_HANDLE_LENGTH Depth REAL
HIDDEN
UNIT METER
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
ID_CA_IKSPLINE_HANDLE_OFFSET Offset BOOL HIDDEN
ID_CA_IKSPLINE_DISPLAY_MODE Display LONG HIDDEN
ID_CA_IKSPLINE_DISPLAY_MODE_OFF Off
ID_CA_IKSPLINE_DISPLAY_MODE_ACTIVE TagActive
ID_CA_IKSPLINE_DISPLAY_MODE_OBJECT ObjectActive
ID_CA_IKSPLINE_DISPLAY_MODE_ALWAYS Always
ID_CA_IKSPLINE_DISPLAY_TANGENT Tangent BOOL  
ID_CA_IKSPLINE_DISPLAY_TANGENT_COL Tangent COLOR  

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.Osphere)
    tag = obj.MakeTag(c4d.Tcaikspline)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.ID_CA_IKSPLINE_TAG_STRENGTH] = 0.1
    tag[c4d.ID_CA_IKSPLINE_TAG_TYPE] = c4d.ID_CA_IKSPLINE_TAG_TYPE_NONE
    tag[c4d.ID_CA_IKSPLINE_TAG_AIM] = c4d.ID_CA_IKSPLINE_TAG_AIM_TANGENT
    tag[c4d.ID_CA_IKSPLINE_TAG_ALIGN_TANGENT] = c4d.ID_CA_IKSPLINE_TAG_ALIGN_X
    tag[c4d.ID_CA_IKSPLINE_TAG_ALIGN_AXIS] = c4d.ID_CA_IKSPLINE_TAG_ALIGN_X
    tag[c4d.ID_CA_IKSPLINE_TAG_TWIST_TYPE] = c4d.ID_CA_IKSPLINE_TAG_TWIST_TYPE_NONE
    tag[c4d.ID_CA_IKSPLINE_TAG_TWIST_AXIS] = c4d.ID_CA_IKSPLINE_TAG_TWIST_AXIS_H
    tag[c4d.ID_CA_IKSPLINE_HANDLE_INDEX] = 1
    tag[c4d.ID_CA_IKSPLINE_HANDLE_TWIST] = True
    tag[c4d.ID_CA_IKSPLINE_HANDLE_LENGTH] = 0.1
    tag[c4d.ID_CA_IKSPLINE_HANDLE_OFFSET] = True
    tag[c4d.ID_CA_IKSPLINE_DISPLAY_MODE] = c4d.ID_CA_IKSPLINE_DISPLAY_MODE_OFF
    tag[c4d.ID_CA_IKSPLINE_DISPLAY_TANGENT] = True
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetFloat(c4d.ID_CA_IKSPLINE_TAG_STRENGTH,0.1)
    bc.SetInt32(c4d.ID_CA_IKSPLINE_TAG_TYPE,c4d.ID_CA_IKSPLINE_TAG_TYPE_NONE)
    bc.SetInt32(c4d.ID_CA_IKSPLINE_TAG_AIM,c4d.ID_CA_IKSPLINE_TAG_AIM_TANGENT)
    bc.SetInt32(c4d.ID_CA_IKSPLINE_TAG_ALIGN_TANGENT,c4d.ID_CA_IKSPLINE_TAG_ALIGN_X)
    bc.SetInt32(c4d.ID_CA_IKSPLINE_TAG_ALIGN_AXIS,c4d.ID_CA_IKSPLINE_TAG_ALIGN_X)
    bc.SetInt32(c4d.ID_CA_IKSPLINE_TAG_TWIST_TYPE,c4d.ID_CA_IKSPLINE_TAG_TWIST_TYPE_NONE)
    bc.SetInt32(c4d.ID_CA_IKSPLINE_TAG_TWIST_AXIS,c4d.ID_CA_IKSPLINE_TAG_TWIST_AXIS_H)
    bc.SetInt32(c4d.ID_CA_IKSPLINE_HANDLE_INDEX,1)
    bc.SetBool(c4d.ID_CA_IKSPLINE_HANDLE_TWIST,True)
    bc.SetFloat(c4d.ID_CA_IKSPLINE_HANDLE_LENGTH,0.1)
    bc.SetBool(c4d.ID_CA_IKSPLINE_HANDLE_OFFSET,True)
    bc.SetInt32(c4d.ID_CA_IKSPLINE_DISPLAY_MODE,c4d.ID_CA_IKSPLINE_DISPLAY_MODE_OFF)
    bc.SetBool(c4d.ID_CA_IKSPLINE_DISPLAY_TANGENT,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../ca/description/tcaikspline.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Osphere);
    pDoc->InsertObject(pObject);
    pDoc->StartUndo();
    pDoc->AddUndo(UNDOTYPE_NEW,pObject);
    pDoc->EndUndo();
    pDoc->StartUndo();
    BaseTag *pTag = pObject->MakeTag(Tcaikspline);
    pDoc->AddUndo(UNDOTYPE_NEW,pTag);
    pDoc->EndUndo();
    pObject->Message(MSG_UPDATE);
    
    //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;
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_TAG_STRENGTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_TAG_TYPE),GeData(ID_CA_IKSPLINE_TAG_TYPE_NONE),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_TAG_AIM),GeData(ID_CA_IKSPLINE_TAG_AIM_TANGENT),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_TAG_ALIGN_TANGENT),GeData(ID_CA_IKSPLINE_TAG_ALIGN_X),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_TAG_ALIGN_AXIS),GeData(ID_CA_IKSPLINE_TAG_ALIGN_X),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_TAG_TWIST_TYPE),GeData(ID_CA_IKSPLINE_TAG_TWIST_TYPE_NONE),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_TAG_TWIST_AXIS),GeData(ID_CA_IKSPLINE_TAG_TWIST_AXIS_H),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_HANDLE_INDEX),GeData(1),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_HANDLE_TWIST),GeData(true),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_HANDLE_LENGTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_HANDLE_OFFSET),GeData(true),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_DISPLAY_MODE),GeData(ID_CA_IKSPLINE_DISPLAY_MODE_OFF),flags);
    pTag->SetParameter(DescID(ID_CA_IKSPLINE_DISPLAY_TANGENT),GeData(true),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetFloat(ID_CA_IKSPLINE_TAG_STRENGTH,0.1);
    bc->SetInt32(ID_CA_IKSPLINE_TAG_TYPE,ID_CA_IKSPLINE_TAG_TYPE_NONE);
    bc->SetInt32(ID_CA_IKSPLINE_TAG_AIM,ID_CA_IKSPLINE_TAG_AIM_TANGENT);
    bc->SetInt32(ID_CA_IKSPLINE_TAG_ALIGN_TANGENT,ID_CA_IKSPLINE_TAG_ALIGN_X);
    bc->SetInt32(ID_CA_IKSPLINE_TAG_ALIGN_AXIS,ID_CA_IKSPLINE_TAG_ALIGN_X);
    bc->SetInt32(ID_CA_IKSPLINE_TAG_TWIST_TYPE,ID_CA_IKSPLINE_TAG_TWIST_TYPE_NONE);
    bc->SetInt32(ID_CA_IKSPLINE_TAG_TWIST_AXIS,ID_CA_IKSPLINE_TAG_TWIST_AXIS_H);
    bc->SetInt32(ID_CA_IKSPLINE_HANDLE_INDEX,1);
    bc->SetBool(ID_CA_IKSPLINE_HANDLE_TWIST,true);
    bc->SetFloat(ID_CA_IKSPLINE_HANDLE_LENGTH,0.1);
    bc->SetBool(ID_CA_IKSPLINE_HANDLE_OFFSET,true);
    bc->SetInt32(ID_CA_IKSPLINE_DISPLAY_MODE,ID_CA_IKSPLINE_DISPLAY_MODE_OFF);
    bc->SetBool(ID_CA_IKSPLINE_DISPLAY_TANGENT,true);
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(tag,c4d.ID_CA_IKSPLINE_HANDLE_ADD)
c4d.CallButton(tag,c4d.ID_CA_IKSPLINE_HANDLE_CREATE)
c4d.CallButton(tag,c4d.ID_CA_IKSPLINE_HANDLE_REMOVE)

C++

DescriptionCommand dc;
dc.id = DescID(ID_CA_IKSPLINE_HANDLE_ADD);             
pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);

DescriptionCommand dc; dc.id = DescID(ID_CA_IKSPLINE_HANDLE_CREATE); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(ID_CA_IKSPLINE_HANDLE_REMOVE); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);