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 Ocamuscle

Ocamuscle

Attributes

  • ENGLISH NAME : Muscle
  • NAME : Ocamuscle
  • INCLUDE : Obase
  • PATH : ca/description/ocamuscle.res
  • PLUGIN : ca
  • MAXON online help (may not exist): OCAMUSCLE

Elements

ID UI Name Type Parameters Cycle
ID_CA_MUSCLE_OBJECT_MODE Mode LONG
SCALE_H
ANIM OFF
CUSTOMGUI RADIOBUTTONS
COLUMNS 2
ID_CA_MUSCLE_OBJECT_MODE_EDIT Edit
ID_CA_MUSCLE_OBJECT_MODE_ANIMATE Animate
ID_CA_MUSCLE_OBJECT_STATE State LONG
SCALE_H
ANIM OFF
PARENTCOLLAPSE
CUSTOMGUI QUICKTABRADIO
ID_CA_MUSCLE_OBJECT_STATE_RELAX Relaxed
ID_CA_MUSCLE_OBJECT_STATE_COMPRESSED Compressed
ID_CA_MUSCLE_OBJECT_STATE_EXTENDED Extended
ID_CA_MUSCLE_OBJECT_AUTO_COMPRESS AutoVolume BOOL HIDDEN
ID_CA_MUSCLE_OBJECT_AUTO_EXTEND AutoVolume BOOL HIDDEN
ID_CA_MUSCLE_OBJECT_RELAX_LENGTH Length REAL
UNIT METER
MIN 0.0
MAXSLIDER 1000
CUSTOMGUI REALSLIDER
SCALE_H
ID_CA_MUSCLE_OBJECT_COMPRESS_LENGTH Length REAL
UNIT METER
MIN 0.0
MAXSLIDER 1000
CUSTOMGUI REALSLIDER
SCALE_H
HIDDEN
ID_CA_MUSCLE_OBJECT_EXTEND_LENGTH Length REAL
UNIT METER
MIN 0.0
MAXSLIDER 1000
CUSTOMGUI REALSLIDER
SCALE_H
HIDDEN
ID_CA_MUSCLE_OBJECT_STATE_SET Set BUTTON  
ID_CA_MUSCLE_OBJECT_SHAPE_RELAX Shape SPLINE PARENTCOLLAPSE
ID_CA_MUSCLE_OBJECT_SHAPE_COMPRESS Shape SPLINE
HIDDEN
PARENTCOLLAPSE ID_CA_MUSCLE_OBJECT_STATE
ID_CA_MUSCLE_OBJECT_SHAPE_EXTEND Shape SPLINE
HIDDEN
PARENTCOLLAPSE ID_CA_MUSCLE_OBJECT_STATE
ID_CA_MUSCLE_OBJECT_ANCHORS_ADD Add BUTTON SCALE_H
ID_CA_MUSCLE_OBJECT_ANCHORS_REMOVE Remove BUTTON SCALE_H
ID_CA_MUSCLE_OBJECT_AUTO_ALIGN AutoAlign BOOL ANIM
ID_CA_MUSCLE_OBJECT_TYPE Type LONG HIDDEN
ID_CA_MUSCLE_OBJECT_TYPE_LINEAR Linear
ID_CA_MUSCLE_OBJECT_TYPE_CUBIC Cubic
ID_CA_MUSCLE_OBJECT_TYPE_AKIMA Akima
ID_CA_MUSCLE_OBJECT_TYPE_BSPLINE B-Spline
ID_CA_MUSCLE_OBJECT_SEGMENTS_COUNT SegmentCount LONG
MIN 1
ANIM OFF
ID_CA_MUSCLE_OBJECT_RADIAL_COUNT RadialCount LONG
MIN 3
ANIM OFF
ID_CA_MUSCLE_OBJECT_SUBD Subdivision LONG
MIN 0
MAX 6
ANIM OFF
ID_CA_MUSCLE_OBJECT_SEGMENTS_RES SegmentResolution LONG
MIN 1
HIDDEN
ID_CA_MUSCLE_OBJECT_RADIAL_RES RadialResolution LONG
MIN 3
HIDDEN
ID_CA_MUSCLE_OBJECT_SHAPE_TRANSITION Transition SPLINE  
ID_CA_MUSCLE_OBJECT_SUBD_CALC Subdivision LONG
MIN 0
MAX 6
ANIM OFF
ID_CA_MUSCLE_OBJECT_DEFORM Direction LONG  
ID_CA_MUSCLE_OBJECT_DEFORM_RADIAL Radial
ID_CA_MUSCLE_OBJECT_DEFORM_NORMAL Normal
ID_CA_MUSCLE_OBJECT_DEFORM_DIRECTION Up-Vector
ID_CA_MUSCLE_OBJECT_FATOFFSET FatOffset REAL
UNIT METER
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
ID_CA_MUSCLE_OBJECT_DEFORM_DIRECTION_LINK Object LINK  
ID_CA_MUSCLE_OBJECT_DYNAMICS Dynamics BOOL  
ID_CA_MUSCLE_OBJECT_DYNAMICS_FRAME OnFrame BOOL  
ID_CA_MUSCLE_OBJECT_STRENGTH Strength REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
ID_CA_MUSCLE_OBJECT_STIFFNESS Stiffness REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_MUSCLE_OBJECT_STRUCTUAL_STIFFNESS Structure REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_MUSCLE_OBJECT_VOLUME_STIFFNESS VolumeStiffness REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_MUSCLE_OBJECT_DRAG Drag REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ID_CA_MUSCLE_OBJECT_STIFFNESS_CURVE Stiffness SPLINE  
ID_CA_MUSCLE_OBJECT_GRAVITY Gravity REAL UNIT
ID_CA_MUSCLE_OBJECT_FORCES Forces IN_EXCLUDE
NUM_FLAGS 0
INIT_STATE 1
SEND_SELCHNGMSG 1
SCALE_V
ID_CA_MUSCLE_OBJECT_SPRINGS Springs LONG
MIN 0
MAX 100
ID_CA_MUSCLE_OBJECT_ITERATIONS Iterations LONG
MIN 1
MAX 1000

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.Ocamuscle)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.ID_CA_MUSCLE_OBJECT_MODE] = c4d.ID_CA_MUSCLE_OBJECT_MODE_EDIT
    obj[c4d.ID_CA_MUSCLE_OBJECT_STATE] = c4d.ID_CA_MUSCLE_OBJECT_STATE_RELAX
    obj[c4d.ID_CA_MUSCLE_OBJECT_AUTO_COMPRESS] = True
    obj[c4d.ID_CA_MUSCLE_OBJECT_AUTO_EXTEND] = True
    obj[c4d.ID_CA_MUSCLE_OBJECT_RELAX_LENGTH] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_COMPRESS_LENGTH] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_EXTEND_LENGTH] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_AUTO_ALIGN] = True
    obj[c4d.ID_CA_MUSCLE_OBJECT_TYPE] = c4d.ID_CA_MUSCLE_OBJECT_TYPE_LINEAR
    obj[c4d.ID_CA_MUSCLE_OBJECT_SEGMENTS_COUNT] = 1
    obj[c4d.ID_CA_MUSCLE_OBJECT_RADIAL_COUNT] = 1
    obj[c4d.ID_CA_MUSCLE_OBJECT_SUBD] = 1
    obj[c4d.ID_CA_MUSCLE_OBJECT_SEGMENTS_RES] = 1
    obj[c4d.ID_CA_MUSCLE_OBJECT_RADIAL_RES] = 1
    obj[c4d.ID_CA_MUSCLE_OBJECT_SUBD_CALC] = 1
    obj[c4d.ID_CA_MUSCLE_OBJECT_DEFORM] = c4d.ID_CA_MUSCLE_OBJECT_DEFORM_RADIAL
    obj[c4d.ID_CA_MUSCLE_OBJECT_FATOFFSET] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_DYNAMICS] = True
    obj[c4d.ID_CA_MUSCLE_OBJECT_DYNAMICS_FRAME] = True
    obj[c4d.ID_CA_MUSCLE_OBJECT_STRENGTH] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_STIFFNESS] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_STRUCTUAL_STIFFNESS] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_VOLUME_STIFFNESS] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_DRAG] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_GRAVITY] = 0.1
    obj[c4d.ID_CA_MUSCLE_OBJECT_SPRINGS] = 1
    obj[c4d.ID_CA_MUSCLE_OBJECT_ITERATIONS] = 1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_MODE,c4d.ID_CA_MUSCLE_OBJECT_MODE_EDIT)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_STATE,c4d.ID_CA_MUSCLE_OBJECT_STATE_RELAX)
    bc.SetBool(c4d.ID_CA_MUSCLE_OBJECT_AUTO_COMPRESS,True)
    bc.SetBool(c4d.ID_CA_MUSCLE_OBJECT_AUTO_EXTEND,True)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_RELAX_LENGTH,0.1)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_COMPRESS_LENGTH,0.1)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_EXTEND_LENGTH,0.1)
    bc.SetBool(c4d.ID_CA_MUSCLE_OBJECT_AUTO_ALIGN,True)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_TYPE,c4d.ID_CA_MUSCLE_OBJECT_TYPE_LINEAR)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_SEGMENTS_COUNT,1)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_RADIAL_COUNT,1)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_SUBD,1)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_SEGMENTS_RES,1)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_RADIAL_RES,1)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_SUBD_CALC,1)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_DEFORM,c4d.ID_CA_MUSCLE_OBJECT_DEFORM_RADIAL)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_FATOFFSET,0.1)
    bc.SetBool(c4d.ID_CA_MUSCLE_OBJECT_DYNAMICS,True)
    bc.SetBool(c4d.ID_CA_MUSCLE_OBJECT_DYNAMICS_FRAME,True)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_STRENGTH,0.1)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_STIFFNESS,0.1)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_STRUCTUAL_STIFFNESS,0.1)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_VOLUME_STIFFNESS,0.1)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_DRAG,0.1)
    bc.SetFloat(c4d.ID_CA_MUSCLE_OBJECT_GRAVITY,0.1)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_SPRINGS,1)
    bc.SetInt32(c4d.ID_CA_MUSCLE_OBJECT_ITERATIONS,1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../ca/description/ocamuscle.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Ocamuscle);
    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_MUSCLE_OBJECT_MODE),GeData(ID_CA_MUSCLE_OBJECT_MODE_EDIT),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_STATE),GeData(ID_CA_MUSCLE_OBJECT_STATE_RELAX),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_AUTO_COMPRESS),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_AUTO_EXTEND),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_RELAX_LENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_COMPRESS_LENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_EXTEND_LENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_AUTO_ALIGN),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_TYPE),GeData(ID_CA_MUSCLE_OBJECT_TYPE_LINEAR),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_SEGMENTS_COUNT),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_RADIAL_COUNT),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_SUBD),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_SEGMENTS_RES),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_RADIAL_RES),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_SUBD_CALC),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_DEFORM),GeData(ID_CA_MUSCLE_OBJECT_DEFORM_RADIAL),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_FATOFFSET),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_DYNAMICS),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_DYNAMICS_FRAME),GeData(true),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_STIFFNESS),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_STRUCTUAL_STIFFNESS),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_VOLUME_STIFFNESS),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_DRAG),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_GRAVITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_SPRINGS),GeData(1),flags);
    pObject->SetParameter(DescID(ID_CA_MUSCLE_OBJECT_ITERATIONS),GeData(1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_MODE,ID_CA_MUSCLE_OBJECT_MODE_EDIT);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_STATE,ID_CA_MUSCLE_OBJECT_STATE_RELAX);
    bc->SetBool(ID_CA_MUSCLE_OBJECT_AUTO_COMPRESS,true);
    bc->SetBool(ID_CA_MUSCLE_OBJECT_AUTO_EXTEND,true);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_RELAX_LENGTH,0.1);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_COMPRESS_LENGTH,0.1);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_EXTEND_LENGTH,0.1);
    bc->SetBool(ID_CA_MUSCLE_OBJECT_AUTO_ALIGN,true);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_TYPE,ID_CA_MUSCLE_OBJECT_TYPE_LINEAR);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_SEGMENTS_COUNT,1);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_RADIAL_COUNT,1);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_SUBD,1);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_SEGMENTS_RES,1);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_RADIAL_RES,1);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_SUBD_CALC,1);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_DEFORM,ID_CA_MUSCLE_OBJECT_DEFORM_RADIAL);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_FATOFFSET,0.1);
    bc->SetBool(ID_CA_MUSCLE_OBJECT_DYNAMICS,true);
    bc->SetBool(ID_CA_MUSCLE_OBJECT_DYNAMICS_FRAME,true);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_STRENGTH,0.1);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_STIFFNESS,0.1);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_STRUCTUAL_STIFFNESS,0.1);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_VOLUME_STIFFNESS,0.1);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_DRAG,0.1);
    bc->SetFloat(ID_CA_MUSCLE_OBJECT_GRAVITY,0.1);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_SPRINGS,1);
    bc->SetInt32(ID_CA_MUSCLE_OBJECT_ITERATIONS,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_MUSCLE_OBJECT_STATE_SET)
c4d.CallButton(obj,c4d.ID_CA_MUSCLE_OBJECT_ANCHORS_ADD)
c4d.CallButton(obj,c4d.ID_CA_MUSCLE_OBJECT_ANCHORS_REMOVE)

C++

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

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