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 Tvibrate

Tvibrate

Attributes

  • ENGLISH NAME : VibrateExpression
  • NAME : Tvibrate
  • INCLUDE : Texpression
  • PATH : objects/description/tvibrate.res
  • PLUGIN : objects
  • MAXON online help (may not exist): TVIBRATE

Elements

ID UI Name Type Parameters Cycle
VIBRATEEXPRESSION_REGULAR RegularPulse BOOL  
VIBRATEEXPRESSION_RELATIVE Relative BOOL  
VIBRATEEXPRESSION_SEED Seed REAL  
VIBRATEEXPRESSION_POS_ENABLE EnablePosition BOOL  
VIBRATEEXPRESSION_POS_AMPLITUDE PositionAmplitude VECTOR
PARENTID VIBRATEEXPRESSION_POS_ENABLE
UNIT METER
VIBRATEEXPRESSION_POS_FREQUENCY PositionFrequency REAL
PARENTID VIBRATEEXPRESSION_POS_ENABLE
MIN 0.0
STEP 0.01
VIBRATEEXPRESSION_SCL_ENABLE EnableScale BOOL  
VIBRATEEXPRESSION_SCL_UNIFORM UniformScale BOOL PARENTID
VIBRATEEXPRESSION_SCL_AMPLITUDE ScaleAmplitude VECTOR
PARENTID VIBRATEEXPRESSION_SCL_ENABLE
MIN 0.01
STEP 0.01
VIBRATEEXPRESSION_SCL_FREQUENCY ScaleFrequency REAL
PARENTID VIBRATEEXPRESSION_SCL_ENABLE
MIN 0.0
STEP 0.01
VIBRATEEXPRESSION_ROT_ENABLE EnableRotation BOOL  
VIBRATEEXPRESSION_ROT_AMPLITUDE RotationAmplitude VECTOR
PARENTID VIBRATEEXPRESSION_ROT_ENABLE
UNIT DEGREE
VIBRATEEXPRESSION_ROT_FREQUENCY RotationFrequency REAL
PARENTID VIBRATEEXPRESSION_ROT_ENABLE
MIN 0.0
STEP 0.01

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.Tvibrate)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.VIBRATEEXPRESSION_REGULAR] = True
    tag[c4d.VIBRATEEXPRESSION_RELATIVE] = True
    tag[c4d.VIBRATEEXPRESSION_SEED] = 0.1
    tag[c4d.VIBRATEEXPRESSION_POS_ENABLE] = True
    tag[c4d.VIBRATEEXPRESSION_POS_AMPLITUDE] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.VIBRATEEXPRESSION_POS_FREQUENCY] = 0.1
    tag[c4d.VIBRATEEXPRESSION_SCL_ENABLE] = True
    tag[c4d.VIBRATEEXPRESSION_SCL_UNIFORM] = True
    tag[c4d.VIBRATEEXPRESSION_SCL_AMPLITUDE] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.VIBRATEEXPRESSION_SCL_FREQUENCY] = 0.1
    tag[c4d.VIBRATEEXPRESSION_ROT_ENABLE] = True
    tag[c4d.VIBRATEEXPRESSION_ROT_AMPLITUDE] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.VIBRATEEXPRESSION_ROT_FREQUENCY] = 0.1
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetBool(c4d.VIBRATEEXPRESSION_REGULAR,True)
    bc.SetBool(c4d.VIBRATEEXPRESSION_RELATIVE,True)
    bc.SetFloat(c4d.VIBRATEEXPRESSION_SEED,0.1)
    bc.SetBool(c4d.VIBRATEEXPRESSION_POS_ENABLE,True)
    bc.SetVector(c4d.VIBRATEEXPRESSION_POS_AMPLITUDE, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.VIBRATEEXPRESSION_POS_FREQUENCY,0.1)
    bc.SetBool(c4d.VIBRATEEXPRESSION_SCL_ENABLE,True)
    bc.SetBool(c4d.VIBRATEEXPRESSION_SCL_UNIFORM,True)
    bc.SetVector(c4d.VIBRATEEXPRESSION_SCL_AMPLITUDE, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.VIBRATEEXPRESSION_SCL_FREQUENCY,0.1)
    bc.SetBool(c4d.VIBRATEEXPRESSION_ROT_ENABLE,True)
    bc.SetVector(c4d.VIBRATEEXPRESSION_ROT_AMPLITUDE, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.VIBRATEEXPRESSION_ROT_FREQUENCY,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../objects/description/tvibrate.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(Tvibrate);
    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(VIBRATEEXPRESSION_REGULAR),GeData(true),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_RELATIVE),GeData(true),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_SEED),GeData(0.1),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_POS_ENABLE),GeData(true),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_POS_AMPLITUDE),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_POS_FREQUENCY),GeData(0.1),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_SCL_ENABLE),GeData(true),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_SCL_UNIFORM),GeData(true),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_SCL_AMPLITUDE),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_SCL_FREQUENCY),GeData(0.1),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_ROT_ENABLE),GeData(true),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_ROT_AMPLITUDE),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(VIBRATEEXPRESSION_ROT_FREQUENCY),GeData(0.1),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetBool(VIBRATEEXPRESSION_REGULAR,true);
    bc->SetBool(VIBRATEEXPRESSION_RELATIVE,true);
    bc->SetFloat(VIBRATEEXPRESSION_SEED,0.1);
    bc->SetBool(VIBRATEEXPRESSION_POS_ENABLE,true);
    bc->SetVector(VIBRATEEXPRESSION_POS_AMPLITUDE, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(VIBRATEEXPRESSION_POS_FREQUENCY,0.1);
    bc->SetBool(VIBRATEEXPRESSION_SCL_ENABLE,true);
    bc->SetBool(VIBRATEEXPRESSION_SCL_UNIFORM,true);
    bc->SetVector(VIBRATEEXPRESSION_SCL_AMPLITUDE, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(VIBRATEEXPRESSION_SCL_FREQUENCY,0.1);
    bc->SetBool(VIBRATEEXPRESSION_ROT_ENABLE,true);
    bc->SetVector(VIBRATEEXPRESSION_ROT_AMPLITUDE, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(VIBRATEEXPRESSION_ROT_FREQUENCY,0.1);
    pTag->Message(MSG_UPDATE);                                                      
}