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 Obodycapture

Obodycapture

Attributes

  • ENGLISH NAME : BodyCapture
  • NAME : Obodycapture
  • INCLUDE : Obase
  • PATH : interop/description/obodycapture.res
  • PLUGIN : interop
  • MAXON online help (may not exist): OBODYCAPTURE

Elements

ID UI Name Type Parameters Cycle
BODYCAPTURE_FILENAME Capture FILENAME ANIM
BODYCAPTURE_BODY_LINK Body LINK ANIM
BODYCAPTURE_BODY_ADD AddBody BUTTON  
BODYCAPTURE_POSE Pose LONG ANIM
BODYCAPTURE_POSE_CAPTURE CapturePose
BODYCAPTURE_POSE_T TPose
BODYCAPTURE_LOCKED Locked BOOL ANIM
BODYCAPTURE_SETTIMELINE SetTimelinetoFrameCount BUTTON  
BODYCAPTURE_SETNEUTRALFRAME SetNeutralFrame BUTTON  
BODYCAPTURE_CLEARNEUTRALFRAME ClearNeutralFrame BUTTON  
BODYCAPTURE_STARTFRAME StartFrame LONG
ANIM OFF
MIN 0
BODYCAPTURE_RANGELENGTH Length LONG
ANIM OFF
MIN 0
BODYCAPTURE_ROTATION RootRotation BOOL ANIM
BODYCAPTURE_OFFSET RootOffset BOOL ANIM
BODYCAPTURE_CAMERA Camera LINK ANIM
BODYCAPTURE_ADDCAMERA AddCamera BUTTON  
BODYCAPTURE_ORIENTATION Orientation LONG ANIM
BODYCAPTURE_ORIENTATION_Z_POS +Z
BODYCAPTURE_ORIENTATION_Z_NEG -Z
BODYCAPTURE_BAKE Bake BUTTON  
BODYCAPTURE_MATRIX_BODY_POSITION Position VECTOR
UNIT METER
CUSTOMGUI SUBDESCRIPTION
ANIM OFF
BODYCAPTURE_MATRIX_BODY_ROTATION Rotation VECTOR
UNIT DEGREE
CUSTOMGUI SUBDESCRIPTION
ANIM OFF
BODYCAPTURE_MATRIX_CAMERA_POSITION Position VECTOR
UNIT METER
CUSTOMGUI SUBDESCRIPTION
ANIM OFF
BODYCAPTURE_MATRIX_CAMERA_ROTATION Rotation VECTOR
UNIT DEGREE
CUSTOMGUI SUBDESCRIPTION
ANIM OFF
BODYCAPTURE_MATRIX_NEUTRALFRAME_POSITION Position VECTOR
UNIT METER
CUSTOMGUI SUBDESCRIPTION
ANIM OFF
BODYCAPTURE_MATRIX_NEUTRALFRAME_ROTATION Rotation VECTOR
UNIT DEGREE
CUSTOMGUI SUBDESCRIPTION
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.Obodycapture)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.BODYCAPTURE_FILENAME] = "c:\\SomeFile.txt"
    obj[c4d.BODYCAPTURE_POSE] = c4d.BODYCAPTURE_POSE_CAPTURE
    obj[c4d.BODYCAPTURE_LOCKED] = True
    obj[c4d.BODYCAPTURE_STARTFRAME] = 1
    obj[c4d.BODYCAPTURE_RANGELENGTH] = 1
    obj[c4d.BODYCAPTURE_ROTATION] = True
    obj[c4d.BODYCAPTURE_OFFSET] = True
    obj[c4d.BODYCAPTURE_ORIENTATION] = c4d.BODYCAPTURE_ORIENTATION_Z_POS
    obj[c4d.BODYCAPTURE_MATRIX_BODY_POSITION] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.BODYCAPTURE_MATRIX_BODY_ROTATION] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.BODYCAPTURE_MATRIX_CAMERA_POSITION] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.BODYCAPTURE_MATRIX_CAMERA_ROTATION] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.BODYCAPTURE_MATRIX_NEUTRALFRAME_POSITION] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.BODYCAPTURE_MATRIX_NEUTRALFRAME_ROTATION] = c4d.Vector(1.0,1.0,1.0)
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetFileName(c4d.BODYCAPTURE_FILENAME,"c:\\SomeFile.txt")
    bc.SetInt32(c4d.BODYCAPTURE_POSE,c4d.BODYCAPTURE_POSE_CAPTURE)
    bc.SetBool(c4d.BODYCAPTURE_LOCKED,True)
    bc.SetInt32(c4d.BODYCAPTURE_STARTFRAME,1)
    bc.SetInt32(c4d.BODYCAPTURE_RANGELENGTH,1)
    bc.SetBool(c4d.BODYCAPTURE_ROTATION,True)
    bc.SetBool(c4d.BODYCAPTURE_OFFSET,True)
    bc.SetInt32(c4d.BODYCAPTURE_ORIENTATION,c4d.BODYCAPTURE_ORIENTATION_Z_POS)
    bc.SetVector(c4d.BODYCAPTURE_MATRIX_BODY_POSITION, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.BODYCAPTURE_MATRIX_BODY_ROTATION, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.BODYCAPTURE_MATRIX_CAMERA_POSITION, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.BODYCAPTURE_MATRIX_CAMERA_ROTATION, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.BODYCAPTURE_MATRIX_NEUTRALFRAME_POSITION, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.BODYCAPTURE_MATRIX_NEUTRALFRAME_ROTATION, c4d.Vector(1.0,1.0,1.0)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../interop/description/obodycapture.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Obodycapture);
    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(BODYCAPTURE_FILENAME),GeData(Filename("c:\\SomeFile.txt"),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_POSE),GeData(BODYCAPTURE_POSE_CAPTURE),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_LOCKED),GeData(true),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_STARTFRAME),GeData(1),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_RANGELENGTH),GeData(1),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_ROTATION),GeData(true),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_OFFSET),GeData(true),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_ORIENTATION),GeData(BODYCAPTURE_ORIENTATION_Z_POS),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_MATRIX_BODY_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_MATRIX_BODY_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_MATRIX_CAMERA_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_MATRIX_CAMERA_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_MATRIX_NEUTRALFRAME_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(BODYCAPTURE_MATRIX_NEUTRALFRAME_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetFileName(BODYCAPTURE_FILENAME,"c:\\SomeFile.txt");
    bc->SetInt32(BODYCAPTURE_POSE,BODYCAPTURE_POSE_CAPTURE);
    bc->SetBool(BODYCAPTURE_LOCKED,true);
    bc->SetInt32(BODYCAPTURE_STARTFRAME,1);
    bc->SetInt32(BODYCAPTURE_RANGELENGTH,1);
    bc->SetBool(BODYCAPTURE_ROTATION,true);
    bc->SetBool(BODYCAPTURE_OFFSET,true);
    bc->SetInt32(BODYCAPTURE_ORIENTATION,BODYCAPTURE_ORIENTATION_Z_POS);
    bc->SetVector(BODYCAPTURE_MATRIX_BODY_POSITION, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(BODYCAPTURE_MATRIX_BODY_ROTATION, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(BODYCAPTURE_MATRIX_CAMERA_POSITION, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(BODYCAPTURE_MATRIX_CAMERA_ROTATION, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(BODYCAPTURE_MATRIX_NEUTRALFRAME_POSITION, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(BODYCAPTURE_MATRIX_NEUTRALFRAME_ROTATION, c4d.Vector(1.0,1.0,1.0);
    pObject->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(obj,c4d.BODYCAPTURE_BODY_ADD)
c4d.CallButton(obj,c4d.BODYCAPTURE_SETTIMELINE)
c4d.CallButton(obj,c4d.BODYCAPTURE_SETNEUTRALFRAME)
c4d.CallButton(obj,c4d.BODYCAPTURE_CLEARNEUTRALFRAME)
c4d.CallButton(obj,c4d.BODYCAPTURE_ADDCAMERA)
c4d.CallButton(obj,c4d.BODYCAPTURE_BAKE)

C++

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

DescriptionCommand dc; dc.id = DescID(BODYCAPTURE_SETTIMELINE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(BODYCAPTURE_SETNEUTRALFRAME); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(BODYCAPTURE_CLEARNEUTRALFRAME); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(BODYCAPTURE_ADDCAMERA); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(BODYCAPTURE_BAKE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);