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 Oespline

Oespline

Attributes

  • ENGLISH NAME : Spline
  • NAME : Oespline
  • INCLUDE : Obase
  • INCLUDE : Oedeformer_panel
  • PATH : mograph/description/oespline.res
  • PLUGIN : mograph
  • MAXON online help (may not exist): OESPLINE

Elements

ID UI Name Type Parameters Cycle
MGSPLINEEFFECTOR_STRENGTH Strength REAL
MINSLIDER 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEEFFECTOR_OFFSETMODE Mode LONG  
MGSPLINEEFFECTOR_OFFSETMODE_STEP Step
MGSPLINEEFFECTOR_OFFSETMODE_FALLOFF Falloff
MGSPLINEEFFECTOR_OFFSETMODE_RELATIVE Relative
MGSPLINEEFFECTOR_RELATIVEAXIS RelativeOffsetAxis LONG  
MGSPLINEEFFECTOR_RELATIVEAXIS_X +X
MGSPLINEEFFECTOR_RELATIVEAXIS_XNEG -X
MGSPLINEEFFECTOR_RELATIVEAXIS_Y +Y
MGSPLINEEFFECTOR_RELATIVEAXIS_YNEG -Y
MGSPLINEEFFECTOR_RELATIVEAXIS_Z +Z
MGSPLINEEFFECTOR_RELATIVEAXIS_ZNEG -Z
MGSPLINEEFFECTOR_FALLOFFSTRENGTH FalloffModifier REAL
UNIT PERCENT
MIN 1.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
MGSPLINEEFFECTOR_SPLINE Spline LINK  
MGSPLINEEFFECTOR_UP_VECTOR UpVector VECTOR  
MGSPLINEEFFECTOR_RAIL_SPLINE Rail LINK  
MGSPLINEEFFECTOR_TARGET_RAIL TargetRail BOOL  
MGSPLINEEFFECTOR_OFFSET Offset REAL
UNIT PERCENT
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
MGSPLINEEFFECTOR_START Start REAL
UNIT PERCENT
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
MGSPLINEEFFECTOR_END End REAL
UNIT PERCENT
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
MGSPLINEEFFECTOR_CLAMP Clamp BOOL  
MGSPLINEEFFECTOR_SEGMENTMODE SegmentMode LONG  
MGSPLINEEFFECTOR_SEGMENTMODE_INDEX UseIndex
MGSPLINEEFFECTOR_SEGMENTMODE_OFFSET EvenSpacing
MGSPLINEEFFECTOR_SEGMENTMODE_RANDOM Random
MGSPLINEEFFECTOR_SEGMENTMODE_SPACED FullSpacing
MGSPLINEEFFECTOR_SEGMENTINDEX Segment LONG MIN
MGSPLINEEFFECTOR_SEGMENTSEED Seed LONG MIN
MGSPLINEEFFECTOR_TRANSFORMMODE TransformMode LONG  
MGSPLINEEFFECTOR_TRANSFORMMODE_ABSOLUTE Absolute
MGSPLINEEFFECTOR_TRANSFORMMODE_RELATIVE RelativetoNode
MGSPLINEEFFECTOR_TRANSFORMMODE_RELSPLINE RelativetoSpline
MGSPLINEEFFECTOR_POSITION_ACTIVE Position BOOL  
MGSPLINEEFFECTOR_ROTATION_ACTIVE Rotation BOOL  
MGSPLINEEFFECTOR_ROTATION R VECTOR
UNIT DEGREE
CUSTOMGUI SUBDESCRIPTION

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.Oespline)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.MGSPLINEEFFECTOR_STRENGTH] = 0.1
    obj[c4d.MGSPLINEEFFECTOR_OFFSETMODE] = c4d.MGSPLINEEFFECTOR_OFFSETMODE_STEP
    obj[c4d.MGSPLINEEFFECTOR_RELATIVEAXIS] = c4d.MGSPLINEEFFECTOR_RELATIVEAXIS_X
    obj[c4d.MGSPLINEEFFECTOR_FALLOFFSTRENGTH] = 0.1
    obj[c4d.MGSPLINEEFFECTOR_UP_VECTOR] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.MGSPLINEEFFECTOR_TARGET_RAIL] = True
    obj[c4d.MGSPLINEEFFECTOR_OFFSET] = 0.1
    obj[c4d.MGSPLINEEFFECTOR_START] = 0.1
    obj[c4d.MGSPLINEEFFECTOR_END] = 0.1
    obj[c4d.MGSPLINEEFFECTOR_CLAMP] = True
    obj[c4d.MGSPLINEEFFECTOR_SEGMENTMODE] = c4d.MGSPLINEEFFECTOR_SEGMENTMODE_INDEX
    obj[c4d.MGSPLINEEFFECTOR_SEGMENTINDEX] = 1
    obj[c4d.MGSPLINEEFFECTOR_SEGMENTSEED] = 1
    obj[c4d.MGSPLINEEFFECTOR_TRANSFORMMODE] = c4d.MGSPLINEEFFECTOR_TRANSFORMMODE_ABSOLUTE
    obj[c4d.MGSPLINEEFFECTOR_POSITION_ACTIVE] = True
    obj[c4d.MGSPLINEEFFECTOR_ROTATION_ACTIVE] = True
    obj[c4d.MGSPLINEEFFECTOR_ROTATION] = c4d.Vector(1.0,1.0,1.0)
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetFloat(c4d.MGSPLINEEFFECTOR_STRENGTH,0.1)
    bc.SetInt32(c4d.MGSPLINEEFFECTOR_OFFSETMODE,c4d.MGSPLINEEFFECTOR_OFFSETMODE_STEP)
    bc.SetInt32(c4d.MGSPLINEEFFECTOR_RELATIVEAXIS,c4d.MGSPLINEEFFECTOR_RELATIVEAXIS_X)
    bc.SetFloat(c4d.MGSPLINEEFFECTOR_FALLOFFSTRENGTH,0.1)
    bc.SetVector(c4d.MGSPLINEEFFECTOR_UP_VECTOR, c4d.Vector(1.0,1.0,1.0)
    bc.SetBool(c4d.MGSPLINEEFFECTOR_TARGET_RAIL,True)
    bc.SetFloat(c4d.MGSPLINEEFFECTOR_OFFSET,0.1)
    bc.SetFloat(c4d.MGSPLINEEFFECTOR_START,0.1)
    bc.SetFloat(c4d.MGSPLINEEFFECTOR_END,0.1)
    bc.SetBool(c4d.MGSPLINEEFFECTOR_CLAMP,True)
    bc.SetInt32(c4d.MGSPLINEEFFECTOR_SEGMENTMODE,c4d.MGSPLINEEFFECTOR_SEGMENTMODE_INDEX)
    bc.SetInt32(c4d.MGSPLINEEFFECTOR_SEGMENTINDEX,1)
    bc.SetInt32(c4d.MGSPLINEEFFECTOR_SEGMENTSEED,1)
    bc.SetInt32(c4d.MGSPLINEEFFECTOR_TRANSFORMMODE,c4d.MGSPLINEEFFECTOR_TRANSFORMMODE_ABSOLUTE)
    bc.SetBool(c4d.MGSPLINEEFFECTOR_POSITION_ACTIVE,True)
    bc.SetBool(c4d.MGSPLINEEFFECTOR_ROTATION_ACTIVE,True)
    bc.SetVector(c4d.MGSPLINEEFFECTOR_ROTATION, c4d.Vector(1.0,1.0,1.0)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../mograph/description/oespline.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oespline);
    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(MGSPLINEEFFECTOR_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_OFFSETMODE),GeData(MGSPLINEEFFECTOR_OFFSETMODE_STEP),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_RELATIVEAXIS),GeData(MGSPLINEEFFECTOR_RELATIVEAXIS_X),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_FALLOFFSTRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_UP_VECTOR),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_TARGET_RAIL),GeData(true),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_OFFSET),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_START),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_END),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_CLAMP),GeData(true),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_SEGMENTMODE),GeData(MGSPLINEEFFECTOR_SEGMENTMODE_INDEX),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_SEGMENTINDEX),GeData(1),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_SEGMENTSEED),GeData(1),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_TRANSFORMMODE),GeData(MGSPLINEEFFECTOR_TRANSFORMMODE_ABSOLUTE),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_POSITION_ACTIVE),GeData(true),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_ROTATION_ACTIVE),GeData(true),flags);
    pObject->SetParameter(DescID(MGSPLINEEFFECTOR_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetFloat(MGSPLINEEFFECTOR_STRENGTH,0.1);
    bc->SetInt32(MGSPLINEEFFECTOR_OFFSETMODE,MGSPLINEEFFECTOR_OFFSETMODE_STEP);
    bc->SetInt32(MGSPLINEEFFECTOR_RELATIVEAXIS,MGSPLINEEFFECTOR_RELATIVEAXIS_X);
    bc->SetFloat(MGSPLINEEFFECTOR_FALLOFFSTRENGTH,0.1);
    bc->SetVector(MGSPLINEEFFECTOR_UP_VECTOR, c4d.Vector(1.0,1.0,1.0);
    bc->SetBool(MGSPLINEEFFECTOR_TARGET_RAIL,true);
    bc->SetFloat(MGSPLINEEFFECTOR_OFFSET,0.1);
    bc->SetFloat(MGSPLINEEFFECTOR_START,0.1);
    bc->SetFloat(MGSPLINEEFFECTOR_END,0.1);
    bc->SetBool(MGSPLINEEFFECTOR_CLAMP,true);
    bc->SetInt32(MGSPLINEEFFECTOR_SEGMENTMODE,MGSPLINEEFFECTOR_SEGMENTMODE_INDEX);
    bc->SetInt32(MGSPLINEEFFECTOR_SEGMENTINDEX,1);
    bc->SetInt32(MGSPLINEEFFECTOR_SEGMENTSEED,1);
    bc->SetInt32(MGSPLINEEFFECTOR_TRANSFORMMODE,MGSPLINEEFFECTOR_TRANSFORMMODE_ABSOLUTE);
    bc->SetBool(MGSPLINEEFFECTOR_POSITION_ACTIVE,true);
    bc->SetBool(MGSPLINEEFFECTOR_ROTATION_ACTIVE,true);
    bc->SetVector(MGSPLINEEFFECTOR_ROTATION, c4d.Vector(1.0,1.0,1.0);
    pObject->Message(MSG_UPDATE);                                                      
}