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 Omograph_splinewrap

Omograph_splinewrap

Attributes

  • ENGLISH NAME : SplineWrap
  • NAME : Omograph_splinewrap
  • INCLUDE : Obase
  • PATH : mograph/description/omograph_splinewrap.res
  • PLUGIN : mograph
  • MAXON online help (may not exist): OMOGRAPH_SPLINEWRAP

Elements

ID UI Name Type Parameters Cycle
MGSPLINEWRAPDEFORMER_SPLINE Spline LINK  
MGSPLINEWRAPDEFORMER_RAIL_SPLINE Rail LINK  
MGSPLINEWRAPDEFORMER_AXIS Axis LONG  
MGSPLINEWRAPDEFORMER_AXIS_XP +X
MGSPLINEWRAPDEFORMER_AXIS_XN -X
MGSPLINEWRAPDEFORMER_AXIS_YP +Y
MGSPLINEWRAPDEFORMER_AXIS_YN -Y
MGSPLINEWRAPDEFORMER_AXIS_ZP +Z
MGSPLINEWRAPDEFORMER_AXIS_ZN -Z
MGSPLINEWRAPDEFORMER_STRENGTH Strength REAL
MIN 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEWRAPDEFORMER_OFFSET Offset REAL
MINSLIDER 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEWRAPDEFORMER_FROM From REAL
MINSLIDER 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEWRAPDEFORMER_TO To REAL
MINSLIDER 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEWRAPDEFORMER_LENMODE Mode LONG  
MGSPLINEWRAPDEFORMER_LENMODE_FIT FitSpline
MGSPLINEWRAPDEFORMER_LENMODE_KEEP KeepLength
MGSPLINEWRAPDEFORMER_MODE EndMode LONG  
MGSPLINEWRAPDEFORMER_MODE_CLAMP Clamp
MGSPLINEWRAPDEFORMER_MODE_EXTEND Extend
MGSPLINEWRAPDEFORMER_RAIL_SCALE ScalefromRail BOOL  
MGSPLINEWRAPDEFORMER_SIZE Size SPLINE  
MGSPLINEWRAPDEFORMER_SIZESTRN SizeStrength REAL
MINSLIDER 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEWRAPDEFORMER_SPLINESIZE SplineSize SPLINE  
MGSPLINEWRAPDEFORMER_SPLINESIZESTRN SplineSizeStrength REAL
MINSLIDER 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEWRAPDEFORMER_RAIL_TARGET RotationfromRail BOOL  
MGSPLINEWRAPDEFORMER_UPVECTOR UpVector VECTOR  
MGSPLINEWRAPDEFORMER_BANK Banking REAL UNIT
MGSPLINEWRAPDEFORMER_ROTATE Rotation SPLINE  
MGSPLINEWRAPDEFORMER_ROTSTRN RotationStrength REAL
MINSLIDER 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEWRAPDEFORMER_SLINEROTATE SplineRotation SPLINE  
MGSPLINEWRAPDEFORMER_SPLINEROTSTRN SplineRotationStrength REAL
MINSLIDER 0.0
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MGSPLINEWRAPDEFORMER_FIXBB FixBoundingBox BOOL  
MGSPLINEWRAPDEFORMER_BB_CENTER BoundingBoxCenter VECTOR  
MGSPLINEWRAPDEFORMER_BB_RADIUS BoundingBoxSize VECTOR  

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.Omograph_splinewrap)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.MGSPLINEWRAPDEFORMER_AXIS] = c4d.MGSPLINEWRAPDEFORMER_AXIS_XP
    obj[c4d.MGSPLINEWRAPDEFORMER_STRENGTH] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_OFFSET] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_FROM] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_TO] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_LENMODE] = c4d.MGSPLINEWRAPDEFORMER_LENMODE_FIT
    obj[c4d.MGSPLINEWRAPDEFORMER_MODE] = c4d.MGSPLINEWRAPDEFORMER_MODE_CLAMP
    obj[c4d.MGSPLINEWRAPDEFORMER_RAIL_SCALE] = True
    obj[c4d.MGSPLINEWRAPDEFORMER_SIZESTRN] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_SPLINESIZESTRN] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_RAIL_TARGET] = True
    obj[c4d.MGSPLINEWRAPDEFORMER_UPVECTOR] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.MGSPLINEWRAPDEFORMER_BANK] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_ROTSTRN] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_SPLINEROTSTRN] = 0.1
    obj[c4d.MGSPLINEWRAPDEFORMER_FIXBB] = True
    obj[c4d.MGSPLINEWRAPDEFORMER_BB_CENTER] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.MGSPLINEWRAPDEFORMER_BB_RADIUS] = c4d.Vector(1.0,1.0,1.0)
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.MGSPLINEWRAPDEFORMER_AXIS,c4d.MGSPLINEWRAPDEFORMER_AXIS_XP)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_STRENGTH,0.1)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_OFFSET,0.1)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_FROM,0.1)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_TO,0.1)
    bc.SetInt32(c4d.MGSPLINEWRAPDEFORMER_LENMODE,c4d.MGSPLINEWRAPDEFORMER_LENMODE_FIT)
    bc.SetInt32(c4d.MGSPLINEWRAPDEFORMER_MODE,c4d.MGSPLINEWRAPDEFORMER_MODE_CLAMP)
    bc.SetBool(c4d.MGSPLINEWRAPDEFORMER_RAIL_SCALE,True)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_SIZESTRN,0.1)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_SPLINESIZESTRN,0.1)
    bc.SetBool(c4d.MGSPLINEWRAPDEFORMER_RAIL_TARGET,True)
    bc.SetVector(c4d.MGSPLINEWRAPDEFORMER_UPVECTOR, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_BANK,0.1)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_ROTSTRN,0.1)
    bc.SetFloat(c4d.MGSPLINEWRAPDEFORMER_SPLINEROTSTRN,0.1)
    bc.SetBool(c4d.MGSPLINEWRAPDEFORMER_FIXBB,True)
    bc.SetVector(c4d.MGSPLINEWRAPDEFORMER_BB_CENTER, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.MGSPLINEWRAPDEFORMER_BB_RADIUS, c4d.Vector(1.0,1.0,1.0)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../mograph/description/omograph_splinewrap.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omograph_splinewrap);
    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(MGSPLINEWRAPDEFORMER_AXIS),GeData(MGSPLINEWRAPDEFORMER_AXIS_XP),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_OFFSET),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_FROM),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_TO),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_LENMODE),GeData(MGSPLINEWRAPDEFORMER_LENMODE_FIT),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_MODE),GeData(MGSPLINEWRAPDEFORMER_MODE_CLAMP),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_RAIL_SCALE),GeData(true),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_SIZESTRN),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_SPLINESIZESTRN),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_RAIL_TARGET),GeData(true),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_UPVECTOR),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_BANK),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_ROTSTRN),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_SPLINEROTSTRN),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_FIXBB),GeData(true),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_BB_CENTER),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(MGSPLINEWRAPDEFORMER_BB_RADIUS),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(MGSPLINEWRAPDEFORMER_AXIS,MGSPLINEWRAPDEFORMER_AXIS_XP);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_STRENGTH,0.1);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_OFFSET,0.1);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_FROM,0.1);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_TO,0.1);
    bc->SetInt32(MGSPLINEWRAPDEFORMER_LENMODE,MGSPLINEWRAPDEFORMER_LENMODE_FIT);
    bc->SetInt32(MGSPLINEWRAPDEFORMER_MODE,MGSPLINEWRAPDEFORMER_MODE_CLAMP);
    bc->SetBool(MGSPLINEWRAPDEFORMER_RAIL_SCALE,true);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_SIZESTRN,0.1);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_SPLINESIZESTRN,0.1);
    bc->SetBool(MGSPLINEWRAPDEFORMER_RAIL_TARGET,true);
    bc->SetVector(MGSPLINEWRAPDEFORMER_UPVECTOR, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_BANK,0.1);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_ROTSTRN,0.1);
    bc->SetFloat(MGSPLINEWRAPDEFORMER_SPLINEROTSTRN,0.1);
    bc->SetBool(MGSPLINEWRAPDEFORMER_FIXBB,true);
    bc->SetVector(MGSPLINEWRAPDEFORMER_BB_CENTER, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(MGSPLINEWRAPDEFORMER_BB_RADIUS, c4d.Vector(1.0,1.0,1.0);
    pObject->Message(MSG_UPDATE);                                                      
}