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 tcrane

tcrane

Attributes

  • ENGLISH NAME :
  • NAME : tcrane
  • INCLUDE : Texpression
  • PATH : motioncam/description/tcrane.res
  • PLUGIN : motioncam
  • MAXON online help (may not exist): TCRANE

Elements

ID UI Name Type Parameters Cycle
TCRANE_VISUALIZATION_ENABLED Enabled BOOL  
TCRANE_VISUALIZATION_COLOR Color COLOR  
TCRANE_VISUALIZATION_COLOR_T TargetColor COLOR  
TCRANE_BASE_LINK Link LINK  
TCRANE_BASE_LINK_RAIL RailSpline LINK  
TCRANE_BASE_LINK_POS BasePos REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
STEP 0.1
CUSTOMGUI REALSLIDER
TCRANE_BASE_LINK_TANGENTIAL Tangential BOOL  
TCRANE_BASE_HEADING BaseHeading REAL
UNIT DEGREE
STEP 0.1
TCRANE_BASE_HEIGHT BaseHeight REAL
UNIT METER
MIN 0.0
TCRANE_ARM_LENGTH ArmLength REAL
UNIT METER
MIN 0.0
TCRANE_ARM_PITCH ArmPitch REAL
UNIT DEGREE
STEP 0.1
TCRANE_ARM_TARGETLINK ArmTarget LINK  
TCRANE_HEAD_A_HEIGHT HeadHeight REAL UNIT
TCRANE_HEAD_A_HEADING HeadHeading REAL
UNIT DEGREE
STEP 0.1
TCRANE_HEAD_B_LENGTH HeadWidth REAL UNIT
TCRANE_HEAD_TARGETLINK HeadTarget LINK  
TCRANE_CAM_PITCH CameraPitch REAL
UNIT DEGREE
STEP 0.1
TCRANE_CAM_BANKING CameraBanking REAL
UNIT DEGREE
STEP 0.1
TCRANE_CAM_PARALLAX CameraOffset REAL UNIT
TCRANE_CAM_COMPENSATE_PITCH CompensatePitch BOOL  
TCRANE_CAM_COMPENSATE_HEADING CompensateHeading BOOL  

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.tcrane)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.TCRANE_VISUALIZATION_ENABLED] = True
    tag[c4d.TCRANE_BASE_LINK_POS] = 0.1
    tag[c4d.TCRANE_BASE_LINK_TANGENTIAL] = True
    tag[c4d.TCRANE_BASE_HEADING] = 0.1
    tag[c4d.TCRANE_BASE_HEIGHT] = 0.1
    tag[c4d.TCRANE_ARM_LENGTH] = 0.1
    tag[c4d.TCRANE_ARM_PITCH] = 0.1
    tag[c4d.TCRANE_HEAD_A_HEIGHT] = 0.1
    tag[c4d.TCRANE_HEAD_A_HEADING] = 0.1
    tag[c4d.TCRANE_HEAD_B_LENGTH] = 0.1
    tag[c4d.TCRANE_CAM_PITCH] = 0.1
    tag[c4d.TCRANE_CAM_BANKING] = 0.1
    tag[c4d.TCRANE_CAM_PARALLAX] = 0.1
    tag[c4d.TCRANE_CAM_COMPENSATE_PITCH] = True
    tag[c4d.TCRANE_CAM_COMPENSATE_HEADING] = True
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetBool(c4d.TCRANE_VISUALIZATION_ENABLED,True)
    bc.SetFloat(c4d.TCRANE_BASE_LINK_POS,0.1)
    bc.SetBool(c4d.TCRANE_BASE_LINK_TANGENTIAL,True)
    bc.SetFloat(c4d.TCRANE_BASE_HEADING,0.1)
    bc.SetFloat(c4d.TCRANE_BASE_HEIGHT,0.1)
    bc.SetFloat(c4d.TCRANE_ARM_LENGTH,0.1)
    bc.SetFloat(c4d.TCRANE_ARM_PITCH,0.1)
    bc.SetFloat(c4d.TCRANE_HEAD_A_HEIGHT,0.1)
    bc.SetFloat(c4d.TCRANE_HEAD_A_HEADING,0.1)
    bc.SetFloat(c4d.TCRANE_HEAD_B_LENGTH,0.1)
    bc.SetFloat(c4d.TCRANE_CAM_PITCH,0.1)
    bc.SetFloat(c4d.TCRANE_CAM_BANKING,0.1)
    bc.SetFloat(c4d.TCRANE_CAM_PARALLAX,0.1)
    bc.SetBool(c4d.TCRANE_CAM_COMPENSATE_PITCH,True)
    bc.SetBool(c4d.TCRANE_CAM_COMPENSATE_HEADING,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../motioncam/description/tcrane.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(tcrane);
    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(TCRANE_VISUALIZATION_ENABLED),GeData(true),flags);
    pTag->SetParameter(DescID(TCRANE_BASE_LINK_POS),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_BASE_LINK_TANGENTIAL),GeData(true),flags);
    pTag->SetParameter(DescID(TCRANE_BASE_HEADING),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_BASE_HEIGHT),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_ARM_LENGTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_ARM_PITCH),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_HEAD_A_HEIGHT),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_HEAD_A_HEADING),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_HEAD_B_LENGTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_CAM_PITCH),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_CAM_BANKING),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_CAM_PARALLAX),GeData(0.1),flags);
    pTag->SetParameter(DescID(TCRANE_CAM_COMPENSATE_PITCH),GeData(true),flags);
    pTag->SetParameter(DescID(TCRANE_CAM_COMPENSATE_HEADING),GeData(true),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetBool(TCRANE_VISUALIZATION_ENABLED,true);
    bc->SetFloat(TCRANE_BASE_LINK_POS,0.1);
    bc->SetBool(TCRANE_BASE_LINK_TANGENTIAL,true);
    bc->SetFloat(TCRANE_BASE_HEADING,0.1);
    bc->SetFloat(TCRANE_BASE_HEIGHT,0.1);
    bc->SetFloat(TCRANE_ARM_LENGTH,0.1);
    bc->SetFloat(TCRANE_ARM_PITCH,0.1);
    bc->SetFloat(TCRANE_HEAD_A_HEIGHT,0.1);
    bc->SetFloat(TCRANE_HEAD_A_HEADING,0.1);
    bc->SetFloat(TCRANE_HEAD_B_LENGTH,0.1);
    bc->SetFloat(TCRANE_CAM_PITCH,0.1);
    bc->SetFloat(TCRANE_CAM_BANKING,0.1);
    bc->SetFloat(TCRANE_CAM_PARALLAX,0.1);
    bc->SetBool(TCRANE_CAM_COMPENSATE_PITCH,true);
    bc->SetBool(TCRANE_CAM_COMPENSATE_HEADING,true);
    pTag->Message(MSG_UPDATE);                                                      
}