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 Txspline

Txspline

Attributes

  • ENGLISH NAME : X-ParticlesMoveAlongSplineTag
  • NAME : Txspline
  • INCLUDE : Texpression
  • PATH : res/description/txspline.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): TXSPLINE

Elements

ID UI Name Type Parameters Cycle
TST_SPLINE_ENABLED MoveAlongSpline BOOL  
TST_SPLINE_LINK Spline LINK  
TST_SPLINE_GROUP GroupsAffected IN_EXCLUDE NUM_FLAGS
TST_SPLINE_START_PERCENT StartPosition REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
TST_SPLINE_MOVE_PERCENT TravelLength REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
TST_SPLINE_INITIDIR MoveDirection LONG ANIM
INITDIR_FORWARDS Forwards
INITDIR_BACKWARDS Backwards
TST_SPLINE_FRAMECOUNT CompleteMovein(Frames) LONG
MIN 1
MINSLIDER 1
MAXSLIDER 500
CUSTOMGUI LONGSLIDER
TST_SPLINE_FRAMECOUNT_MODE SpeedMode LONG  
FRAMECOUNT_MODE_RELATIVE Relative
FRAMECOUNT_MODE_ABSOLUTE Absolute
FRAMECOUNT_MODE_EMITTER UseEmitter
TST_SPLINE_LOOP Loop BOOL  
TST_SPLINE_OFFSET Offset LONG  
SPLINE_OFFSET_NONE None
SPLINE_OFFSET_EMITTER ToEmitter
TST_SPLINE_MULTISEG Multi-SegmentSplines LONG  
SPLINE_SEG_RANDOM UseallSegments
SPLINE_SEG_SPECIFIC UseSpecificSegment
TST_SPLINE_SEGMENT Segment LONG
MIN 1
MINSLIDER 1
MAXSLIDER 50
CUSTOMGUI LONGSLIDER
TST_SPLINE_ACTIONLIST Actions IN_EXCLUDE NUM_FLAGS
TST_SPLINE_ADDACTION AddAction BUTTON  
TST_SPLINE_RESET ResettoDefaults BUTTON  
TST_HELP_BUTTON BITMAPBUTTON  

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.Txspline)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.TST_SPLINE_ENABLED] = True
    tag[c4d.TST_SPLINE_START_PERCENT] = 0.1
    tag[c4d.TST_SPLINE_MOVE_PERCENT] = 0.1
    tag[c4d.TST_SPLINE_INITIDIR] = c4d.INITDIR_FORWARDS
    tag[c4d.TST_SPLINE_FRAMECOUNT] = 1
    tag[c4d.TST_SPLINE_FRAMECOUNT_MODE] = c4d.FRAMECOUNT_MODE_RELATIVE
    tag[c4d.TST_SPLINE_LOOP] = True
    tag[c4d.TST_SPLINE_OFFSET] = c4d.SPLINE_OFFSET_NONE
    tag[c4d.TST_SPLINE_MULTISEG] = c4d.SPLINE_SEG_RANDOM
    tag[c4d.TST_SPLINE_SEGMENT] = 1
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetBool(c4d.TST_SPLINE_ENABLED,True)
    bc.SetFloat(c4d.TST_SPLINE_START_PERCENT,0.1)
    bc.SetFloat(c4d.TST_SPLINE_MOVE_PERCENT,0.1)
    bc.SetInt32(c4d.TST_SPLINE_INITIDIR,c4d.INITDIR_FORWARDS)
    bc.SetInt32(c4d.TST_SPLINE_FRAMECOUNT,1)
    bc.SetInt32(c4d.TST_SPLINE_FRAMECOUNT_MODE,c4d.FRAMECOUNT_MODE_RELATIVE)
    bc.SetBool(c4d.TST_SPLINE_LOOP,True)
    bc.SetInt32(c4d.TST_SPLINE_OFFSET,c4d.SPLINE_OFFSET_NONE)
    bc.SetInt32(c4d.TST_SPLINE_MULTISEG,c4d.SPLINE_SEG_RANDOM)
    bc.SetInt32(c4d.TST_SPLINE_SEGMENT,1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/txspline.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(Txspline);
    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(TST_SPLINE_ENABLED),GeData(true),flags);
    pTag->SetParameter(DescID(TST_SPLINE_START_PERCENT),GeData(0.1),flags);
    pTag->SetParameter(DescID(TST_SPLINE_MOVE_PERCENT),GeData(0.1),flags);
    pTag->SetParameter(DescID(TST_SPLINE_INITIDIR),GeData(INITDIR_FORWARDS),flags);
    pTag->SetParameter(DescID(TST_SPLINE_FRAMECOUNT),GeData(1),flags);
    pTag->SetParameter(DescID(TST_SPLINE_FRAMECOUNT_MODE),GeData(FRAMECOUNT_MODE_RELATIVE),flags);
    pTag->SetParameter(DescID(TST_SPLINE_LOOP),GeData(true),flags);
    pTag->SetParameter(DescID(TST_SPLINE_OFFSET),GeData(SPLINE_OFFSET_NONE),flags);
    pTag->SetParameter(DescID(TST_SPLINE_MULTISEG),GeData(SPLINE_SEG_RANDOM),flags);
    pTag->SetParameter(DescID(TST_SPLINE_SEGMENT),GeData(1),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetBool(TST_SPLINE_ENABLED,true);
    bc->SetFloat(TST_SPLINE_START_PERCENT,0.1);
    bc->SetFloat(TST_SPLINE_MOVE_PERCENT,0.1);
    bc->SetInt32(TST_SPLINE_INITIDIR,INITDIR_FORWARDS);
    bc->SetInt32(TST_SPLINE_FRAMECOUNT,1);
    bc->SetInt32(TST_SPLINE_FRAMECOUNT_MODE,FRAMECOUNT_MODE_RELATIVE);
    bc->SetBool(TST_SPLINE_LOOP,true);
    bc->SetInt32(TST_SPLINE_OFFSET,SPLINE_OFFSET_NONE);
    bc->SetInt32(TST_SPLINE_MULTISEG,SPLINE_SEG_RANDOM);
    bc->SetInt32(TST_SPLINE_SEGMENT,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.TST_SPLINE_ADDACTION)
c4d.CallButton(tag,c4d.TST_SPLINE_RESET)
c4d.CallButton(tag,c4d.TST_HELP_BUTTON)

C++

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

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