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 ClothTag

ClothTag

Attributes

  • ENGLISH NAME : ClothTag
  • NAME : Tsbd
  • INCLUDE : Tbase
  • PATH : clothilde/description/clothtag.res
  • PLUGIN : clothilde
  • MAXON online help (may not exist): CLOTHTAG

Elements

ID UI Name Type Parameters Cycle
CLOTH_SIMULATION_PRIORITY Simulation PRIORITY
ANIM OFF
NOCAMERA
CLOTH_USE Enable BOOL ANIM
CLOTH_AUTOTIME Auto BOOL ANIM
CLOTH_START Start BASETIME ANIM
CLOTH_STOP Stop BASETIME ANIM
CLOTH_ITERATIONS Iterations LONG MIN
CLOTH_STRUCT_F Stiffness REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CLOTH_STRUCT_F_MAP StiffnessMap LINK  
CLOTH_FLEXION_F Flexion REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CLOTH_FLEXION_F_MAP FlexionMap LINK  
CLOTH_RUBBER_F Rubber REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CLOTH_RUBBER_F_MAP RubberMap LINK  
CLOTH_BOUNCE Bounce REAL
UNIT PERCENT
MIN 0.0
CLOTH_BOUNCE_MAP BounceMap LINK  
CLOTH_STICKI Friction REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CLOTH_STICKI_MAP FrictionMap LINK  
CLOTH_MASS Mass REAL
MIN 0.1
STEP 0.1
CLOTH_MASS_MAP MassMap LINK  
CLOTH_SHRINK_F Size REAL
UNIT PERCENT
MIN 1.0
CLOTH_SHRINK_F_MAP SizeMap LINK  
CLOTH_TEAR_F Tear REAL
UNIT PERCENT
MIN 1.0
CLOTH_TEAR_F_MAP TearMap LINK  
CLOTH_TEAR UseTear BOOL  
CLOTH_GRAVITY Gravity REAL STEP
CLOTH_DRAG Drag REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CLOTH_WIND_DIR WindDirection VECTOR
UNIT METER
CUSTOMGUI SUBDESCRIPTION
STEP 0.1
CLOTH_WIND_F WindStrength REAL
MIN 0.0
STEP 0.1
CLOTH_WIND_TURB_F WindTurbulenceStrength REAL MIN
CLOTH_WIND_TURB_S WindTurbulenceSpeed REAL MIN
CLOTH_WIND_DRAG WindDrag REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CLOTH_WIND_IMPACT WindImpact REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CLOTH_WIND_LIFT WindLift REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CLOTH_WIND_SPEED AirResistance REAL STEP
CLOTH_SREP SelfRepulsion BOOL  
CLOTH_SREP_D Distance REAL
UNIT METER
MIN 0.0
CLOTH_SREP_F Force REAL MIN
CLOTH_SREP_B Damping REAL  
CLOTH_DRESSMODE DressMode BOOL ANIM
CLOTH_DO_RELAXING Relax BUTTON  
CLOTH_RELAX_STEPS Steps LONG
MIN 1
ANIM OFF
CLOTH_DO_DRESSING Dress-O-matic BUTTON  
CLOTH_DRESS_STEPS Steps LONG
MIN 1
ANIM OFF
CLOTH_SEAMS_DIST Width REAL
MIN 0.0
UNIT METER
ANIM OFF
CLOTH_SETINIT Set BUTTON  
CLOTH_SHOWINIT Show BUTTON  
CLOTH_SETDINIT Set BUTTON  
CLOTH_SHOWDINIT Show BUTTON  
CLOTH_SETMASS Set BUTTON  
CLOTH_CLEARMASS Clear BUTTON  
CLOTH_SHOWMASS Show BUTTON  
CLOTH_DRAWMASS Draw BOOL  
CLOTH_SETSEAMS Set BUTTON  
CLOTH_CLEARSEAM Clear BUTTON  
CLOTH_SHOWSEAMS Show BUTTON  
CLOTH_BAKE CacheMode BOOL  
CLOTH_CACHE_START Start BASETIME ANIM
CLOTH_DO_CALCULATE CalculateCache BUTTON FIT_H
CLOTH_DELCACHE EmptyCache BUTTON FIT_H
CLOTH_CACHE_FRAME UpdateFrame BUTTON FIT_H
CLOTH_CACHE_LOAD Load... BUTTON FIT_H
CLOTH_CACHE_SAVE Save... BUTTON FIT_H
CLOTH_SUBDIV SubSampling LONG
MIN 1
MAX 100
CLOTH_SELF SelfCollision BOOL  
CLOTH_GIA GlobalIntersectionAnalysis BOOL  
CLOTH_POINTS PointCollision BOOL  
CLOTH_P_EPS PointEPS REAL
MIN 0.0
UNIT METER
CLOTH_EDGES EdgeCollision BOOL  
CLOTH_K_EPS EdgeEPS REAL
MIN 0.0
UNIT METER
CLOTH_POLYS PolygonCollision BOOL  
CLOTH_V_EPS PolyEPS REAL
MIN 0.0
UNIT METER
CLOTH_INCLUDE Limitto: IN_EXCLUDE 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.Osphere)
    tag = obj.MakeTag(c4d.ClothTag)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.CLOTH_USE] = True
    tag[c4d.CLOTH_AUTOTIME] = True
    tag[c4d.CLOTH_ITERATIONS] = 1
    tag[c4d.CLOTH_STRUCT_F] = 0.1
    tag[c4d.CLOTH_FLEXION_F] = 0.1
    tag[c4d.CLOTH_RUBBER_F] = 0.1
    tag[c4d.CLOTH_BOUNCE] = 0.1
    tag[c4d.CLOTH_STICKI] = 0.1
    tag[c4d.CLOTH_MASS] = 0.1
    tag[c4d.CLOTH_SHRINK_F] = 0.1
    tag[c4d.CLOTH_TEAR_F] = 0.1
    tag[c4d.CLOTH_TEAR] = True
    tag[c4d.CLOTH_GRAVITY] = 0.1
    tag[c4d.CLOTH_DRAG] = 0.1
    tag[c4d.CLOTH_WIND_DIR] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.CLOTH_WIND_F] = 0.1
    tag[c4d.CLOTH_WIND_TURB_F] = 0.1
    tag[c4d.CLOTH_WIND_TURB_S] = 0.1
    tag[c4d.CLOTH_WIND_DRAG] = 0.1
    tag[c4d.CLOTH_WIND_IMPACT] = 0.1
    tag[c4d.CLOTH_WIND_LIFT] = 0.1
    tag[c4d.CLOTH_WIND_SPEED] = 0.1
    tag[c4d.CLOTH_SREP] = True
    tag[c4d.CLOTH_SREP_D] = 0.1
    tag[c4d.CLOTH_SREP_F] = 0.1
    tag[c4d.CLOTH_SREP_B] = 0.1
    tag[c4d.CLOTH_DRESSMODE] = True
    tag[c4d.CLOTH_RELAX_STEPS] = 1
    tag[c4d.CLOTH_DRESS_STEPS] = 1
    tag[c4d.CLOTH_SEAMS_DIST] = 0.1
    tag[c4d.CLOTH_DRAWMASS] = True
    tag[c4d.CLOTH_BAKE] = True
    tag[c4d.CLOTH_SUBDIV] = 1
    tag[c4d.CLOTH_SELF] = True
    tag[c4d.CLOTH_GIA] = True
    tag[c4d.CLOTH_POINTS] = True
    tag[c4d.CLOTH_P_EPS] = 0.1
    tag[c4d.CLOTH_EDGES] = True
    tag[c4d.CLOTH_K_EPS] = 0.1
    tag[c4d.CLOTH_POLYS] = True
    tag[c4d.CLOTH_V_EPS] = 0.1
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetBool(c4d.CLOTH_USE,True)
    bc.SetBool(c4d.CLOTH_AUTOTIME,True)
    bc.SetInt32(c4d.CLOTH_ITERATIONS,1)
    bc.SetFloat(c4d.CLOTH_STRUCT_F,0.1)
    bc.SetFloat(c4d.CLOTH_FLEXION_F,0.1)
    bc.SetFloat(c4d.CLOTH_RUBBER_F,0.1)
    bc.SetFloat(c4d.CLOTH_BOUNCE,0.1)
    bc.SetFloat(c4d.CLOTH_STICKI,0.1)
    bc.SetFloat(c4d.CLOTH_MASS,0.1)
    bc.SetFloat(c4d.CLOTH_SHRINK_F,0.1)
    bc.SetFloat(c4d.CLOTH_TEAR_F,0.1)
    bc.SetBool(c4d.CLOTH_TEAR,True)
    bc.SetFloat(c4d.CLOTH_GRAVITY,0.1)
    bc.SetFloat(c4d.CLOTH_DRAG,0.1)
    bc.SetVector(c4d.CLOTH_WIND_DIR, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.CLOTH_WIND_F,0.1)
    bc.SetFloat(c4d.CLOTH_WIND_TURB_F,0.1)
    bc.SetFloat(c4d.CLOTH_WIND_TURB_S,0.1)
    bc.SetFloat(c4d.CLOTH_WIND_DRAG,0.1)
    bc.SetFloat(c4d.CLOTH_WIND_IMPACT,0.1)
    bc.SetFloat(c4d.CLOTH_WIND_LIFT,0.1)
    bc.SetFloat(c4d.CLOTH_WIND_SPEED,0.1)
    bc.SetBool(c4d.CLOTH_SREP,True)
    bc.SetFloat(c4d.CLOTH_SREP_D,0.1)
    bc.SetFloat(c4d.CLOTH_SREP_F,0.1)
    bc.SetFloat(c4d.CLOTH_SREP_B,0.1)
    bc.SetBool(c4d.CLOTH_DRESSMODE,True)
    bc.SetInt32(c4d.CLOTH_RELAX_STEPS,1)
    bc.SetInt32(c4d.CLOTH_DRESS_STEPS,1)
    bc.SetFloat(c4d.CLOTH_SEAMS_DIST,0.1)
    bc.SetBool(c4d.CLOTH_DRAWMASS,True)
    bc.SetBool(c4d.CLOTH_BAKE,True)
    bc.SetInt32(c4d.CLOTH_SUBDIV,1)
    bc.SetBool(c4d.CLOTH_SELF,True)
    bc.SetBool(c4d.CLOTH_GIA,True)
    bc.SetBool(c4d.CLOTH_POINTS,True)
    bc.SetFloat(c4d.CLOTH_P_EPS,0.1)
    bc.SetBool(c4d.CLOTH_EDGES,True)
    bc.SetFloat(c4d.CLOTH_K_EPS,0.1)
    bc.SetBool(c4d.CLOTH_POLYS,True)
    bc.SetFloat(c4d.CLOTH_V_EPS,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../clothilde/description/clothtag.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(ClothTag);
    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(CLOTH_USE),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_AUTOTIME),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_ITERATIONS),GeData(1),flags);
    pTag->SetParameter(DescID(CLOTH_STRUCT_F),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_FLEXION_F),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_RUBBER_F),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_BOUNCE),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_STICKI),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_MASS),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_SHRINK_F),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_TEAR_F),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_TEAR),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_GRAVITY),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_DRAG),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_WIND_DIR),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(CLOTH_WIND_F),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_WIND_TURB_F),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_WIND_TURB_S),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_WIND_DRAG),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_WIND_IMPACT),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_WIND_LIFT),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_WIND_SPEED),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_SREP),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_SREP_D),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_SREP_F),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_SREP_B),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_DRESSMODE),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_RELAX_STEPS),GeData(1),flags);
    pTag->SetParameter(DescID(CLOTH_DRESS_STEPS),GeData(1),flags);
    pTag->SetParameter(DescID(CLOTH_SEAMS_DIST),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_DRAWMASS),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_BAKE),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_SUBDIV),GeData(1),flags);
    pTag->SetParameter(DescID(CLOTH_SELF),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_GIA),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_POINTS),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_P_EPS),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_EDGES),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_K_EPS),GeData(0.1),flags);
    pTag->SetParameter(DescID(CLOTH_POLYS),GeData(true),flags);
    pTag->SetParameter(DescID(CLOTH_V_EPS),GeData(0.1),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetBool(CLOTH_USE,true);
    bc->SetBool(CLOTH_AUTOTIME,true);
    bc->SetInt32(CLOTH_ITERATIONS,1);
    bc->SetFloat(CLOTH_STRUCT_F,0.1);
    bc->SetFloat(CLOTH_FLEXION_F,0.1);
    bc->SetFloat(CLOTH_RUBBER_F,0.1);
    bc->SetFloat(CLOTH_BOUNCE,0.1);
    bc->SetFloat(CLOTH_STICKI,0.1);
    bc->SetFloat(CLOTH_MASS,0.1);
    bc->SetFloat(CLOTH_SHRINK_F,0.1);
    bc->SetFloat(CLOTH_TEAR_F,0.1);
    bc->SetBool(CLOTH_TEAR,true);
    bc->SetFloat(CLOTH_GRAVITY,0.1);
    bc->SetFloat(CLOTH_DRAG,0.1);
    bc->SetVector(CLOTH_WIND_DIR, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(CLOTH_WIND_F,0.1);
    bc->SetFloat(CLOTH_WIND_TURB_F,0.1);
    bc->SetFloat(CLOTH_WIND_TURB_S,0.1);
    bc->SetFloat(CLOTH_WIND_DRAG,0.1);
    bc->SetFloat(CLOTH_WIND_IMPACT,0.1);
    bc->SetFloat(CLOTH_WIND_LIFT,0.1);
    bc->SetFloat(CLOTH_WIND_SPEED,0.1);
    bc->SetBool(CLOTH_SREP,true);
    bc->SetFloat(CLOTH_SREP_D,0.1);
    bc->SetFloat(CLOTH_SREP_F,0.1);
    bc->SetFloat(CLOTH_SREP_B,0.1);
    bc->SetBool(CLOTH_DRESSMODE,true);
    bc->SetInt32(CLOTH_RELAX_STEPS,1);
    bc->SetInt32(CLOTH_DRESS_STEPS,1);
    bc->SetFloat(CLOTH_SEAMS_DIST,0.1);
    bc->SetBool(CLOTH_DRAWMASS,true);
    bc->SetBool(CLOTH_BAKE,true);
    bc->SetInt32(CLOTH_SUBDIV,1);
    bc->SetBool(CLOTH_SELF,true);
    bc->SetBool(CLOTH_GIA,true);
    bc->SetBool(CLOTH_POINTS,true);
    bc->SetFloat(CLOTH_P_EPS,0.1);
    bc->SetBool(CLOTH_EDGES,true);
    bc->SetFloat(CLOTH_K_EPS,0.1);
    bc->SetBool(CLOTH_POLYS,true);
    bc->SetFloat(CLOTH_V_EPS,0.1);
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(tag,c4d.CLOTH_DO_RELAXING)
c4d.CallButton(tag,c4d.CLOTH_DO_DRESSING)
c4d.CallButton(tag,c4d.CLOTH_SETINIT)
c4d.CallButton(tag,c4d.CLOTH_SHOWINIT)
c4d.CallButton(tag,c4d.CLOTH_SETDINIT)
c4d.CallButton(tag,c4d.CLOTH_SHOWDINIT)
c4d.CallButton(tag,c4d.CLOTH_SETMASS)
c4d.CallButton(tag,c4d.CLOTH_CLEARMASS)
c4d.CallButton(tag,c4d.CLOTH_SHOWMASS)
c4d.CallButton(tag,c4d.CLOTH_SETSEAMS)
c4d.CallButton(tag,c4d.CLOTH_CLEARSEAM)
c4d.CallButton(tag,c4d.CLOTH_SHOWSEAMS)
c4d.CallButton(tag,c4d.CLOTH_DO_CALCULATE)
c4d.CallButton(tag,c4d.CLOTH_DELCACHE)
c4d.CallButton(tag,c4d.CLOTH_CACHE_FRAME)
c4d.CallButton(tag,c4d.CLOTH_CACHE_LOAD)
c4d.CallButton(tag,c4d.CLOTH_CACHE_SAVE)

C++

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

DescriptionCommand dc; dc.id = DescID(CLOTH_DO_DRESSING); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_SETINIT); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_SHOWINIT); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_SETDINIT); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_SHOWDINIT); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_SETMASS); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_CLEARMASS); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_SHOWMASS); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_SETSEAMS); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_CLEARSEAM); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_SHOWSEAMS); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_DO_CALCULATE); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_DELCACHE); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_CACHE_FRAME); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_CACHE_LOAD); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(CLOTH_CACHE_SAVE); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);