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 Odxptraildef

Odxptraildef

Attributes

  • ENGLISH NAME : X-ParticlesTrailDeformer
  • NAME : Odxptraildef
  • INCLUDE : Obase
  • PATH : res/description/odxptraildef.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): ODXPTRAILDEF

Elements

ID UI Name Type Parameters Cycle
XPTRAILDEF_FORMULA_X X-AxisFormula STRING  
XPTRAILDEF_FORMULA_Y Y-AxisFormula STRING  
XPTRAILDEF_WAVELENGTH Wavelength REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XPTRAILDEF_AMPLITUDE Amplitude REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XPTRAILDEF_SHADER_X ShaderX SHADERLINK  
XPTRAILDEF_SHADER_Y ShaderY SHADERLINK  
XPTRAILDEF_SHADER_DISP Displacement REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XPTRAILDEF_SHADER_PSKIP SkipPoints LONG
MIN 0
MINSLIDER 0
MAXSLIDER 20
CUSTOMGUI LONGSLIDER
XPTRAILDEF_MIX Mix REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XPTRAILDEF_SPLINEMODE SplineMode LONG  
TDSPLINEMODE_SPLINELEN SplineLength
TDSPLINEMODE_FIXEDLEN FixedLength
XPTRAILDEF_SPLINELENGTH Length REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 5000.0
CUSTOMGUI REALSLIDER
XPTRAILDEF_LENGTH_SPLINE OverLength SPLINE
Y_MIN 0.0
Y_MAX 100.0
X_MIN 0.0
X_MAX 1.0
X_STEPS 0.01
Y_STEPS 0.01
XPTRAILDEF_HELP_BUTTON BITMAPBUTTON  
XPTRAILDEF_VIDMAN_BUTTON BITMAPBUTTON  
XPTRAILDEF_BUTTON_RESET ResettoDefaults BUTTON  
XPTRAILDEF_BUTTON_SAVE_PRESET SavePreset... BUTTON  
XPTRAILDEF_BUTTON_LOAD_PRESET LoadPreset... BUTTON  

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.Odxptraildef)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XPTRAILDEF_FORMULA_X] = "Hello World"
    obj[c4d.XPTRAILDEF_FORMULA_Y] = "Hello World"
    obj[c4d.XPTRAILDEF_WAVELENGTH] = 0.1
    obj[c4d.XPTRAILDEF_AMPLITUDE] = 0.1
    obj[c4d.XPTRAILDEF_SHADER_DISP] = 0.1
    obj[c4d.XPTRAILDEF_SHADER_PSKIP] = 1
    obj[c4d.XPTRAILDEF_MIX] = 0.1
    obj[c4d.XPTRAILDEF_SPLINEMODE] = c4d.TDSPLINEMODE_SPLINELEN
    obj[c4d.XPTRAILDEF_SPLINELENGTH] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetString(c4d.XPTRAILDEF_FORMULA_X,"Hello World")
    bc.SetString(c4d.XPTRAILDEF_FORMULA_Y,"Hello World")
    bc.SetFloat(c4d.XPTRAILDEF_WAVELENGTH,0.1)
    bc.SetFloat(c4d.XPTRAILDEF_AMPLITUDE,0.1)
    bc.SetFloat(c4d.XPTRAILDEF_SHADER_DISP,0.1)
    bc.SetInt32(c4d.XPTRAILDEF_SHADER_PSKIP,1)
    bc.SetFloat(c4d.XPTRAILDEF_MIX,0.1)
    bc.SetInt32(c4d.XPTRAILDEF_SPLINEMODE,c4d.TDSPLINEMODE_SPLINELEN)
    bc.SetFloat(c4d.XPTRAILDEF_SPLINELENGTH,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/odxptraildef.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Odxptraildef);
    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(XPTRAILDEF_FORMULA_X),GeData("Hello World"),flags);
    pObject->SetParameter(DescID(XPTRAILDEF_FORMULA_Y),GeData("Hello World"),flags);
    pObject->SetParameter(DescID(XPTRAILDEF_WAVELENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPTRAILDEF_AMPLITUDE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPTRAILDEF_SHADER_DISP),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPTRAILDEF_SHADER_PSKIP),GeData(1),flags);
    pObject->SetParameter(DescID(XPTRAILDEF_MIX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPTRAILDEF_SPLINEMODE),GeData(TDSPLINEMODE_SPLINELEN),flags);
    pObject->SetParameter(DescID(XPTRAILDEF_SPLINELENGTH),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetString(XPTRAILDEF_FORMULA_X,"Hello World");
    bc->SetString(XPTRAILDEF_FORMULA_Y,"Hello World");
    bc->SetFloat(XPTRAILDEF_WAVELENGTH,0.1);
    bc->SetFloat(XPTRAILDEF_AMPLITUDE,0.1);
    bc->SetFloat(XPTRAILDEF_SHADER_DISP,0.1);
    bc->SetInt32(XPTRAILDEF_SHADER_PSKIP,1);
    bc->SetFloat(XPTRAILDEF_MIX,0.1);
    bc->SetInt32(XPTRAILDEF_SPLINEMODE,TDSPLINEMODE_SPLINELEN);
    bc->SetFloat(XPTRAILDEF_SPLINELENGTH,0.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.XPTRAILDEF_HELP_BUTTON)
c4d.CallButton(obj,c4d.XPTRAILDEF_VIDMAN_BUTTON)
c4d.CallButton(obj,c4d.XPTRAILDEF_BUTTON_RESET)
c4d.CallButton(obj,c4d.XPTRAILDEF_BUTTON_SAVE_PRESET)
c4d.CallButton(obj,c4d.XPTRAILDEF_BUTTON_LOAD_PRESET)

C++

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

DescriptionCommand dc; dc.id = DescID(XPTRAILDEF_VIDMAN_BUTTON); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XPTRAILDEF_BUTTON_RESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XPTRAILDEF_BUTTON_SAVE_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XPTRAILDEF_BUTTON_LOAD_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);