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 Oxptrail

Oxptrail

Attributes

  • ENGLISH NAME : X-ParticlesTrailObject
  • NAME : Oxptrail
  • INCLUDE : Obase
  • PATH : res/description/oxptrail.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OXPTRAIL

Elements

ID UI Name Type Parameters Cycle
XTR_EMITTER_LINK Emitter LINK  
XTR_TRAIL_FROMBIRTH TrailsfromParticleBirth BOOL  
XTR_TRAIL_STREAMEDPARTS TrailsonStreamedParticles BOOL  
XTR_TRAIL_DRAWSPLINES DrawSplines BOOL  
XTR_TRAIL_CONNECT_ALGORITHM Algorithm LONG  
TRAIL_ALGO_NONE NoConnections
TRAIL_ALGO_SINGLE StraightSequence
TRAIL_ALGO_SEGMENTED SegmentedSequence
TRAIL_ALGO_ALL AllPointstoallPoints
TRAIL_ALGO_NEARESTINDICES NearestbyIndex
TRAIL_ALGO_NEARESTDISTANCE NearestbyDistance
TRAIL_ALGO_CLUSTER Cluster
TRAIL_ALGO_TENDRIL Tendrils
TRAIL_ALGO_CONSTRAINTS Constraints
XTR_TRAIL_LENGTH_MODE LengthMode LONG ANIM
TRAIL_LENGTH_MODE_TIME Time
TRAIL_LENGTH_MODE_DISTANCE Length
XTR_TRAIL_LENGTH_SCENE FullSceneTrail BOOL ANIM
XTR_TRAIL_SAMPLES FrameSampling LONG
MIN 1
STEP 1
MINSLIDER 1
MAXSLIDER 30
CUSTOMGUI LONGSLIDER
XTR_TRAIL_LENGTH TrailLength BASETIME  
XTR_TRAIL_LENGTH_VAR Variation BASETIME  
XTR_TRAIL_LENGTH_DIST Length REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XTR_TRAIL_LENGTH_DIST_VAR Variation REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XTR_TRAIL_FREEZE FreezeWhenComplete LONG  
XTR_TRAIL_FREEZE_NONE DoNotFreeze
XTR_TRAIL_FREEZE_PARTICLE FreezeParticle
XTR_TRAIL_FREEZE_TRAIL FreezeTrail
XTR_TRAIL_FREEZE_MOVE FreezeMovement BOOL  
XTR_TRAIL_FREEZE_SPIN FreezeSpin BOOL  
XTR_TRAIL_FREEZE_SCALE FreezeScale BOOL  
XTR_TRAIL_CONNECT_USE_GROUPS DestinationGroup LONG  
XTR_USE_GROUPS_ALL UseallGroups
XTR_USE_GROUPS_ONLYSAME OnlySameGroup
XTR_USE_GROUPS_ONLYDIFF OnlyDifferentGroups
XTR_USE_GROUPS_SPECIFIC SpecificGroup
XTR_USE_GROUPS_NOTSPECIFIC AllExceptSpecificGroup
XTR_TRAIL_CONNECT_GROUP Group LINK  
XTR_TRAIL_CONNECT_MAX MaximumConnections LONG
MIN 1
MINSLIDER 1
MAXSLIDER 100
CUSTOMGUI LONGSLIDER
XTR_TRAIL_CONNECT_SKIP SkipParticles LONG
MIN 0
MINSLIDER 0
MAXSLIDER 100
CUSTOMGUI LONGSLIDER
XTR_TRAIL_CONNECT_DISTMODE DistanceMode LONG  
DISTMODE_NEAREST NearestOnly
DISTMODE_ALLWITHIN AllWithinDistance
DISTMODE_MAXWITHIN Max.NumberWithinDistance
XTR_TRAIL_CONNECT_DISTANCE Distance REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 200.0
CUSTOMGUI REALSLIDER
XTR_TRAIL_CONNECT_MAXINDIST Max.Number LONG
MIN 1
MINSLIDER 0
MAXSLIDER 100
CUSTOMGUI LONGSLIDER
XTR_TRAIL_CONNECT_CLUSTERSIZE ClusterDistance REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 200.0
CUSTOMGUI REALSLIDER
XTR_TRAIL_CONNECT_CLUSTERCOUNT Min.ParticlesinCluster LONG
MIN 2
MINSLIDER 2
MAXSLIDER 50
CUSTOMGUI LONGSLIDER
XTR_TRAIL_CONNECT_SEGMENTED_SEGLEN SegmentLength LONG
MIN 1
MINSLIDER 1
MAXSLIDER 100
CUSTOMGUI LONGSLIDER
XTR_TRAIL_CONNECT_SEGMENTED_GAPLEN GapLength LONG
MIN 1
MINSLIDER 1
MAXSLIDER 100
CUSTOMGUI LONGSLIDER
XTR_CONSTRAINTS_BIRTH Birth BOOL  
XTR_CONSTRAINTS_DISTANCE Distance BOOL  
XTR_CONSTRAINTS_VISCOSITY Viscosity BOOL  
XTR_CONSTRAINTS_COLLIDER Collisions BOOL  
XTR_TRAIL_THICKNESS_MODE ThicknessMode LONG  
XTR_TRAIL_THICKNESS_VALUE ThicknessValue REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XTR_TRAIL_THICKNESS_VALUE_VAR Variation REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XTR_TRAIL_THICKNESS_SPLINE ThicknessSpline SPLINE
Y_MIN 0.0
Y_MAX 5.0
X_MIN 0.0
X_MAX 1.0
X_STEPS 0.01
Y_STEPS 1.0
XTR_TRAIL_THICKNESS_SPLINE_MAX SplineMaximum REAL
UNIT REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 200.0
CUSTOMGUI REALSLIDER
XTR_TRAIL_THICKNESS_SHADER Shader SHADERLINK  
XTR_CACHEINFO_CACHEDELEMENTS LONG
HIDDEN
MIN 0
XTR_TRAIL_REVERSE ReversePoints BOOL  
XTR_HELP_BUTTON BITMAPBUTTON  
XTR_VIDMAN_BUTTON BITMAPBUTTON  
XTR_BUTTON_RESET ResettoDefaults BUTTON  
XTR_BUTTON_SAVE_PRESET SavePreset... BUTTON  
XTR_BUTTON_LOAD_PRESET LoadPreset... BUTTON  
XTR_TRAIL_GROUPS Groups IN_EXCLUDE
NUM_FLAGS 2
INIT_STATE 3
SEND_SELCHNGMSG 1
SCALE_V
IMAGE_01_ON 1009316
IMAGE_01_OFF 1009320
IMAGE_02_ON 300000231
IMAGE_02_OFF 300000230

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.Oxptrail)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XTR_TRAIL_FROMBIRTH] = True
    obj[c4d.XTR_TRAIL_STREAMEDPARTS] = True
    obj[c4d.XTR_TRAIL_DRAWSPLINES] = True
    obj[c4d.XTR_TRAIL_CONNECT_ALGORITHM] = c4d.TRAIL_ALGO_NONE
    obj[c4d.XTR_TRAIL_LENGTH_MODE] = c4d.TRAIL_LENGTH_MODE_TIME
    obj[c4d.XTR_TRAIL_LENGTH_SCENE] = True
    obj[c4d.XTR_TRAIL_SAMPLES] = 1
    obj[c4d.XTR_TRAIL_LENGTH_DIST] = 0.1
    obj[c4d.XTR_TRAIL_LENGTH_DIST_VAR] = 0.1
    obj[c4d.XTR_TRAIL_FREEZE] = c4d.XTR_TRAIL_FREEZE_NONE
    obj[c4d.XTR_TRAIL_FREEZE_MOVE] = True
    obj[c4d.XTR_TRAIL_FREEZE_SPIN] = True
    obj[c4d.XTR_TRAIL_FREEZE_SCALE] = True
    obj[c4d.XTR_TRAIL_CONNECT_USE_GROUPS] = c4d.XTR_USE_GROUPS_ALL
    obj[c4d.XTR_TRAIL_CONNECT_MAX] = 1
    obj[c4d.XTR_TRAIL_CONNECT_SKIP] = 1
    obj[c4d.XTR_TRAIL_CONNECT_DISTMODE] = c4d.DISTMODE_NEAREST
    obj[c4d.XTR_TRAIL_CONNECT_DISTANCE] = 0.1
    obj[c4d.XTR_TRAIL_CONNECT_MAXINDIST] = 1
    obj[c4d.XTR_TRAIL_CONNECT_CLUSTERSIZE] = 0.1
    obj[c4d.XTR_TRAIL_CONNECT_CLUSTERCOUNT] = 1
    obj[c4d.XTR_TRAIL_CONNECT_SEGMENTED_SEGLEN] = 1
    obj[c4d.XTR_TRAIL_CONNECT_SEGMENTED_GAPLEN] = 1
    obj[c4d.XTR_CONSTRAINTS_BIRTH] = True
    obj[c4d.XTR_CONSTRAINTS_DISTANCE] = True
    obj[c4d.XTR_CONSTRAINTS_VISCOSITY] = True
    obj[c4d.XTR_CONSTRAINTS_COLLIDER] = True
    obj[c4d.XTR_TRAIL_THICKNESS_MODE] = 1
    obj[c4d.XTR_TRAIL_THICKNESS_VALUE] = 0.1
    obj[c4d.XTR_TRAIL_THICKNESS_VALUE_VAR] = 0.1
    obj[c4d.XTR_TRAIL_THICKNESS_SPLINE_MAX] = 0.1
    obj[c4d.XTR_CACHEINFO_CACHEDELEMENTS] = 1
    obj[c4d.XTR_TRAIL_REVERSE] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XTR_TRAIL_FROMBIRTH,True)
    bc.SetBool(c4d.XTR_TRAIL_STREAMEDPARTS,True)
    bc.SetBool(c4d.XTR_TRAIL_DRAWSPLINES,True)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_ALGORITHM,c4d.TRAIL_ALGO_NONE)
    bc.SetInt32(c4d.XTR_TRAIL_LENGTH_MODE,c4d.TRAIL_LENGTH_MODE_TIME)
    bc.SetBool(c4d.XTR_TRAIL_LENGTH_SCENE,True)
    bc.SetInt32(c4d.XTR_TRAIL_SAMPLES,1)
    bc.SetFloat(c4d.XTR_TRAIL_LENGTH_DIST,0.1)
    bc.SetFloat(c4d.XTR_TRAIL_LENGTH_DIST_VAR,0.1)
    bc.SetInt32(c4d.XTR_TRAIL_FREEZE,c4d.XTR_TRAIL_FREEZE_NONE)
    bc.SetBool(c4d.XTR_TRAIL_FREEZE_MOVE,True)
    bc.SetBool(c4d.XTR_TRAIL_FREEZE_SPIN,True)
    bc.SetBool(c4d.XTR_TRAIL_FREEZE_SCALE,True)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_USE_GROUPS,c4d.XTR_USE_GROUPS_ALL)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_MAX,1)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_SKIP,1)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_DISTMODE,c4d.DISTMODE_NEAREST)
    bc.SetFloat(c4d.XTR_TRAIL_CONNECT_DISTANCE,0.1)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_MAXINDIST,1)
    bc.SetFloat(c4d.XTR_TRAIL_CONNECT_CLUSTERSIZE,0.1)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_CLUSTERCOUNT,1)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_SEGMENTED_SEGLEN,1)
    bc.SetInt32(c4d.XTR_TRAIL_CONNECT_SEGMENTED_GAPLEN,1)
    bc.SetBool(c4d.XTR_CONSTRAINTS_BIRTH,True)
    bc.SetBool(c4d.XTR_CONSTRAINTS_DISTANCE,True)
    bc.SetBool(c4d.XTR_CONSTRAINTS_VISCOSITY,True)
    bc.SetBool(c4d.XTR_CONSTRAINTS_COLLIDER,True)
    bc.SetInt32(c4d.XTR_TRAIL_THICKNESS_MODE,1)
    bc.SetFloat(c4d.XTR_TRAIL_THICKNESS_VALUE,0.1)
    bc.SetFloat(c4d.XTR_TRAIL_THICKNESS_VALUE_VAR,0.1)
    bc.SetFloat(c4d.XTR_TRAIL_THICKNESS_SPLINE_MAX,0.1)
    bc.SetInt32(c4d.XTR_CACHEINFO_CACHEDELEMENTS,1)
    bc.SetBool(c4d.XTR_TRAIL_REVERSE,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/oxptrail.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oxptrail);
    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(XTR_TRAIL_FROMBIRTH),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_STREAMEDPARTS),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_DRAWSPLINES),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_ALGORITHM),GeData(TRAIL_ALGO_NONE),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_LENGTH_MODE),GeData(TRAIL_LENGTH_MODE_TIME),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_LENGTH_SCENE),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_SAMPLES),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_LENGTH_DIST),GeData(0.1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_LENGTH_DIST_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_FREEZE),GeData(XTR_TRAIL_FREEZE_NONE),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_FREEZE_MOVE),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_FREEZE_SPIN),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_FREEZE_SCALE),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_USE_GROUPS),GeData(XTR_USE_GROUPS_ALL),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_MAX),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_SKIP),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_DISTMODE),GeData(DISTMODE_NEAREST),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_DISTANCE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_MAXINDIST),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_CLUSTERSIZE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_CLUSTERCOUNT),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_SEGMENTED_SEGLEN),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_CONNECT_SEGMENTED_GAPLEN),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_CONSTRAINTS_BIRTH),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_CONSTRAINTS_DISTANCE),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_CONSTRAINTS_VISCOSITY),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_CONSTRAINTS_COLLIDER),GeData(true),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_THICKNESS_MODE),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_THICKNESS_VALUE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_THICKNESS_VALUE_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_THICKNESS_SPLINE_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XTR_CACHEINFO_CACHEDELEMENTS),GeData(1),flags);
    pObject->SetParameter(DescID(XTR_TRAIL_REVERSE),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XTR_TRAIL_FROMBIRTH,true);
    bc->SetBool(XTR_TRAIL_STREAMEDPARTS,true);
    bc->SetBool(XTR_TRAIL_DRAWSPLINES,true);
    bc->SetInt32(XTR_TRAIL_CONNECT_ALGORITHM,TRAIL_ALGO_NONE);
    bc->SetInt32(XTR_TRAIL_LENGTH_MODE,TRAIL_LENGTH_MODE_TIME);
    bc->SetBool(XTR_TRAIL_LENGTH_SCENE,true);
    bc->SetInt32(XTR_TRAIL_SAMPLES,1);
    bc->SetFloat(XTR_TRAIL_LENGTH_DIST,0.1);
    bc->SetFloat(XTR_TRAIL_LENGTH_DIST_VAR,0.1);
    bc->SetInt32(XTR_TRAIL_FREEZE,XTR_TRAIL_FREEZE_NONE);
    bc->SetBool(XTR_TRAIL_FREEZE_MOVE,true);
    bc->SetBool(XTR_TRAIL_FREEZE_SPIN,true);
    bc->SetBool(XTR_TRAIL_FREEZE_SCALE,true);
    bc->SetInt32(XTR_TRAIL_CONNECT_USE_GROUPS,XTR_USE_GROUPS_ALL);
    bc->SetInt32(XTR_TRAIL_CONNECT_MAX,1);
    bc->SetInt32(XTR_TRAIL_CONNECT_SKIP,1);
    bc->SetInt32(XTR_TRAIL_CONNECT_DISTMODE,DISTMODE_NEAREST);
    bc->SetFloat(XTR_TRAIL_CONNECT_DISTANCE,0.1);
    bc->SetInt32(XTR_TRAIL_CONNECT_MAXINDIST,1);
    bc->SetFloat(XTR_TRAIL_CONNECT_CLUSTERSIZE,0.1);
    bc->SetInt32(XTR_TRAIL_CONNECT_CLUSTERCOUNT,1);
    bc->SetInt32(XTR_TRAIL_CONNECT_SEGMENTED_SEGLEN,1);
    bc->SetInt32(XTR_TRAIL_CONNECT_SEGMENTED_GAPLEN,1);
    bc->SetBool(XTR_CONSTRAINTS_BIRTH,true);
    bc->SetBool(XTR_CONSTRAINTS_DISTANCE,true);
    bc->SetBool(XTR_CONSTRAINTS_VISCOSITY,true);
    bc->SetBool(XTR_CONSTRAINTS_COLLIDER,true);
    bc->SetInt32(XTR_TRAIL_THICKNESS_MODE,1);
    bc->SetFloat(XTR_TRAIL_THICKNESS_VALUE,0.1);
    bc->SetFloat(XTR_TRAIL_THICKNESS_VALUE_VAR,0.1);
    bc->SetFloat(XTR_TRAIL_THICKNESS_SPLINE_MAX,0.1);
    bc->SetInt32(XTR_CACHEINFO_CACHEDELEMENTS,1);
    bc->SetBool(XTR_TRAIL_REVERSE,true);
    pObject->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(obj,c4d.XTR_HELP_BUTTON)
c4d.CallButton(obj,c4d.XTR_VIDMAN_BUTTON)
c4d.CallButton(obj,c4d.XTR_BUTTON_RESET)
c4d.CallButton(obj,c4d.XTR_BUTTON_SAVE_PRESET)
c4d.CallButton(obj,c4d.XTR_BUTTON_LOAD_PRESET)

C++

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

DescriptionCommand dc; dc.id = DescID(XTR_VIDMAN_BUTTON); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XTR_BUTTON_RESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XTR_BUTTON_SAVE_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XTR_BUTTON_LOAD_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);