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 Omspline

Omspline

Attributes

  • ENGLISH NAME : X-ParticlesFollowSplineModifier
  • NAME : Omspline
  • INCLUDE : Obase
  • PATH : res/description/omspline.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OMSPLINE

Elements

ID UI Name Type Parameters Cycle
XMSN_SPLINE_ENABLED Enabled BOOL  
XMSN_SPLINE_MODE Mode LONG  
MSPLINE_MODE_INDEP Independent
MSPLINE_MODE_ACTION Action-Controlled
XMSN_SPLINE_LINK Spline LINK  
XMSN_SPLINE_MULTISEG Multi-SegmentSplines LONG  
MSPLINE_SEG_RANDOM UseAnySegment
MSPLINE_SEG_SPECIFIC UseSpecificSegment
MSPLINE_SEG_SEQUENCE UseSegmentsinSequence
MSPLINE_SEG_NEAREST UseNearestSegment
XMSN_SPLINE_SEGMENT Segment LONG MIN
XMSN_SPLINE_SEGSAMPLES Samples LONG MIN
XMSN_SPLINE_STARTMODE StartingMode LONG  
SPLINE_START_NEARPOINT NearestPoint
SPLINE_START_NEARVERTEX NearestVertex
SPLINE_START_SPECIFICVERTEX SpecificVertex
SPLINE_START_POS PositionAlongSpline
XMSN_SPLINE_SAMPLES Samples LONG
MIN 1
MINSLIDER 1
MAXSLIDER 500
CUSTOMGUI LONGSLIDER
XMSN_SPLINE_VERTEX Vertex LONG
MIN 0
MINSLIDER 0
MAXSLIDER 10000
CUSTOMGUI LONGSLIDER
XMSN_SPLINE_POS Position REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMSN_SPLINE_POS_VAR Variation REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMSN_SPLINE_POS_POSITIVEONLY PositiveVariationOnly BOOL  
XMSN_OFFSET_SPLINE OffsetAlongLength SPLINE
Y_MIN 0.0
Y_MAX 1.0
X_MIN 0.0
X_MAX 1.0
X_STEPS 0.01
Y_STEPS 0.01
XMSN_SPLINE_SPLINEOFFSET OffsetValue REAL
UNIT METER
MIN 0.0
XMSN_SPLINE_STRENGTH AcutenessofTurn REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMSN_SPLINE_ACTIVATE_DIST ActivateRange REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XMSN_SPLINE_INITIDIR MoveDirection LONG  
MINITDIR_FORWARDS Forwards
MINITDIR_BACKWARDS Backwards
XMSN_SPLINE_ATEND AtEndofSpline LONG  
SPLINE_ATEND_DONOTHING DoNothing
SPLINE_ATEND_LOOP Loop
SPLINE_ATEND_REPEAT Repeat
SPLINE_ATEND_REVERSE Reverse
XMSN_SPLINE_SPEED SpeedMode LONG  
SPLINE_SPEED_INITIAL UseParticleSpeed
SPLINE_SPEED_FRAMES CompleteLengthinTime
SPLINE_SPEED_SET SetSpeed
XMSN_SPLINE_SPEED_FRAMES Time BASETIME  
XMSN_SPLINE_SPEED_SET Speed REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XMSN_SPLINE_SPEED_PARALLEL ParalleltoSpline BOOL  
XMSN_SPLINE_TURBULENCE_MODE Mode LONG  
TURBULENCE_MODE_NONE NoTurbulence
TURBULENCE_MODE_OFFSET AffectOffset
TURBULENCE_MODE_VELOCITY AffectVelocity
TURBULENCE_MODE_BOTH AffectBoth
XMSN_SPLINE_TURBULENCE_SCALE Scale REAL
UNIT PERCENT
MIN 0.0
MAX 10000.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XMSN_SPLINE_TURBULENCE_FREQUENCY Frequency REAL
MINSLIDER 0.0
STEP 0.01
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
XMSN_SPLINE_TURBULENCE_STRENGTH Strength REAL
UNIT REAL
STEP 1.0
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XMSN_SPLINE_ACTIONLIST Actions IN_EXCLUDE NUM_FLAGS
XMSN_SPLINE_ADDACTION AddAction BUTTON  
XMSN_SPLINE_GROUP 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.Omspline)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XMSN_SPLINE_ENABLED] = True
    obj[c4d.XMSN_SPLINE_MODE] = c4d.MSPLINE_MODE_INDEP
    obj[c4d.XMSN_SPLINE_MULTISEG] = c4d.MSPLINE_SEG_RANDOM
    obj[c4d.XMSN_SPLINE_SEGMENT] = 1
    obj[c4d.XMSN_SPLINE_SEGSAMPLES] = 1
    obj[c4d.XMSN_SPLINE_STARTMODE] = c4d.SPLINE_START_NEARPOINT
    obj[c4d.XMSN_SPLINE_SAMPLES] = 1
    obj[c4d.XMSN_SPLINE_VERTEX] = 1
    obj[c4d.XMSN_SPLINE_POS] = 0.1
    obj[c4d.XMSN_SPLINE_POS_VAR] = 0.1
    obj[c4d.XMSN_SPLINE_POS_POSITIVEONLY] = True
    obj[c4d.XMSN_SPLINE_SPLINEOFFSET] = 0.1
    obj[c4d.XMSN_SPLINE_STRENGTH] = 0.1
    obj[c4d.XMSN_SPLINE_ACTIVATE_DIST] = 0.1
    obj[c4d.XMSN_SPLINE_INITIDIR] = c4d.MINITDIR_FORWARDS
    obj[c4d.XMSN_SPLINE_ATEND] = c4d.SPLINE_ATEND_DONOTHING
    obj[c4d.XMSN_SPLINE_SPEED] = c4d.SPLINE_SPEED_INITIAL
    obj[c4d.XMSN_SPLINE_SPEED_SET] = 0.1
    obj[c4d.XMSN_SPLINE_SPEED_PARALLEL] = True
    obj[c4d.XMSN_SPLINE_TURBULENCE_MODE] = c4d.TURBULENCE_MODE_NONE
    obj[c4d.XMSN_SPLINE_TURBULENCE_SCALE] = 0.1
    obj[c4d.XMSN_SPLINE_TURBULENCE_FREQUENCY] = 0.1
    obj[c4d.XMSN_SPLINE_TURBULENCE_STRENGTH] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XMSN_SPLINE_ENABLED,True)
    bc.SetInt32(c4d.XMSN_SPLINE_MODE,c4d.MSPLINE_MODE_INDEP)
    bc.SetInt32(c4d.XMSN_SPLINE_MULTISEG,c4d.MSPLINE_SEG_RANDOM)
    bc.SetInt32(c4d.XMSN_SPLINE_SEGMENT,1)
    bc.SetInt32(c4d.XMSN_SPLINE_SEGSAMPLES,1)
    bc.SetInt32(c4d.XMSN_SPLINE_STARTMODE,c4d.SPLINE_START_NEARPOINT)
    bc.SetInt32(c4d.XMSN_SPLINE_SAMPLES,1)
    bc.SetInt32(c4d.XMSN_SPLINE_VERTEX,1)
    bc.SetFloat(c4d.XMSN_SPLINE_POS,0.1)
    bc.SetFloat(c4d.XMSN_SPLINE_POS_VAR,0.1)
    bc.SetBool(c4d.XMSN_SPLINE_POS_POSITIVEONLY,True)
    bc.SetFloat(c4d.XMSN_SPLINE_SPLINEOFFSET,0.1)
    bc.SetFloat(c4d.XMSN_SPLINE_STRENGTH,0.1)
    bc.SetFloat(c4d.XMSN_SPLINE_ACTIVATE_DIST,0.1)
    bc.SetInt32(c4d.XMSN_SPLINE_INITIDIR,c4d.MINITDIR_FORWARDS)
    bc.SetInt32(c4d.XMSN_SPLINE_ATEND,c4d.SPLINE_ATEND_DONOTHING)
    bc.SetInt32(c4d.XMSN_SPLINE_SPEED,c4d.SPLINE_SPEED_INITIAL)
    bc.SetFloat(c4d.XMSN_SPLINE_SPEED_SET,0.1)
    bc.SetBool(c4d.XMSN_SPLINE_SPEED_PARALLEL,True)
    bc.SetInt32(c4d.XMSN_SPLINE_TURBULENCE_MODE,c4d.TURBULENCE_MODE_NONE)
    bc.SetFloat(c4d.XMSN_SPLINE_TURBULENCE_SCALE,0.1)
    bc.SetFloat(c4d.XMSN_SPLINE_TURBULENCE_FREQUENCY,0.1)
    bc.SetFloat(c4d.XMSN_SPLINE_TURBULENCE_STRENGTH,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/omspline.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omspline);
    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(XMSN_SPLINE_ENABLED),GeData(true),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_MODE),GeData(MSPLINE_MODE_INDEP),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_MULTISEG),GeData(MSPLINE_SEG_RANDOM),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_SEGMENT),GeData(1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_SEGSAMPLES),GeData(1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_STARTMODE),GeData(SPLINE_START_NEARPOINT),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_SAMPLES),GeData(1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_VERTEX),GeData(1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_POS),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_POS_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_POS_POSITIVEONLY),GeData(true),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_SPLINEOFFSET),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_ACTIVATE_DIST),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_INITIDIR),GeData(MINITDIR_FORWARDS),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_ATEND),GeData(SPLINE_ATEND_DONOTHING),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_SPEED),GeData(SPLINE_SPEED_INITIAL),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_SPEED_SET),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_SPEED_PARALLEL),GeData(true),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_TURBULENCE_MODE),GeData(TURBULENCE_MODE_NONE),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_TURBULENCE_SCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_TURBULENCE_FREQUENCY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSN_SPLINE_TURBULENCE_STRENGTH),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XMSN_SPLINE_ENABLED,true);
    bc->SetInt32(XMSN_SPLINE_MODE,MSPLINE_MODE_INDEP);
    bc->SetInt32(XMSN_SPLINE_MULTISEG,MSPLINE_SEG_RANDOM);
    bc->SetInt32(XMSN_SPLINE_SEGMENT,1);
    bc->SetInt32(XMSN_SPLINE_SEGSAMPLES,1);
    bc->SetInt32(XMSN_SPLINE_STARTMODE,SPLINE_START_NEARPOINT);
    bc->SetInt32(XMSN_SPLINE_SAMPLES,1);
    bc->SetInt32(XMSN_SPLINE_VERTEX,1);
    bc->SetFloat(XMSN_SPLINE_POS,0.1);
    bc->SetFloat(XMSN_SPLINE_POS_VAR,0.1);
    bc->SetBool(XMSN_SPLINE_POS_POSITIVEONLY,true);
    bc->SetFloat(XMSN_SPLINE_SPLINEOFFSET,0.1);
    bc->SetFloat(XMSN_SPLINE_STRENGTH,0.1);
    bc->SetFloat(XMSN_SPLINE_ACTIVATE_DIST,0.1);
    bc->SetInt32(XMSN_SPLINE_INITIDIR,MINITDIR_FORWARDS);
    bc->SetInt32(XMSN_SPLINE_ATEND,SPLINE_ATEND_DONOTHING);
    bc->SetInt32(XMSN_SPLINE_SPEED,SPLINE_SPEED_INITIAL);
    bc->SetFloat(XMSN_SPLINE_SPEED_SET,0.1);
    bc->SetBool(XMSN_SPLINE_SPEED_PARALLEL,true);
    bc->SetInt32(XMSN_SPLINE_TURBULENCE_MODE,TURBULENCE_MODE_NONE);
    bc->SetFloat(XMSN_SPLINE_TURBULENCE_SCALE,0.1);
    bc->SetFloat(XMSN_SPLINE_TURBULENCE_FREQUENCY,0.1);
    bc->SetFloat(XMSN_SPLINE_TURBULENCE_STRENGTH,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.XMSN_SPLINE_ADDACTION)

C++

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