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 Osweep

Osweep

Attributes

Elements

ID UI Name Type Parameters Cycle
SWEEPOBJECT_ISOPARM IsoparmSubdivision LONG
MIN 3
MAX 10000
SWEEPOBJECT_SCALE EndScale REAL
UNIT PERCENT
MIN 0.0
SWEEPOBJECT_ROTATE EndRotation REAL UNIT
SWEEPOBJECT_STARTGROWTH StartGrowth REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
SWEEPOBJECT_GROWTH EndGrowth REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
SWEEPOBJECT_PARALLEL ParallelMovement BOOL  
SWEEPOBJECT_CONSTANT ConstantCrossSection BOOL  
SWEEPOBJECT_BANKING Banking BOOL  
SWEEPOBJECT_KEEPSEGMENTS KeepSegments BOOL  
SWEEPOBJECT_RAILDIRECTION UseRailDirection BOOL  
SWEEPOBJECT_BIRAIL 2-Rail BOOL  
SWEEPOBJECT_RAILSCALE UseRailScale BOOL  
SWEEPOBJECT_FLIPNORMALS FlipNormals BOOL  
SWEEPOBJECT_GROWUV StickUVs BOOL  
SWEEPOBJECT_SPLINESCALE Scale SPLINE  
SWEEPOBJECT_SPLINEROTATION Rotation SPLINE  
SWEEPOBJECT_ROTATIONFROM Rotationfrom REAL UNIT
SWEEPOBJECT_ROTATIONTO Rotationto REAL UNIT

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.Osweep)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.SWEEPOBJECT_ISOPARM] = 1
    obj[c4d.SWEEPOBJECT_SCALE] = 0.1
    obj[c4d.SWEEPOBJECT_ROTATE] = 0.1
    obj[c4d.SWEEPOBJECT_STARTGROWTH] = 0.1
    obj[c4d.SWEEPOBJECT_GROWTH] = 0.1
    obj[c4d.SWEEPOBJECT_PARALLEL] = True
    obj[c4d.SWEEPOBJECT_CONSTANT] = True
    obj[c4d.SWEEPOBJECT_BANKING] = True
    obj[c4d.SWEEPOBJECT_KEEPSEGMENTS] = True
    obj[c4d.SWEEPOBJECT_RAILDIRECTION] = True
    obj[c4d.SWEEPOBJECT_BIRAIL] = True
    obj[c4d.SWEEPOBJECT_RAILSCALE] = True
    obj[c4d.SWEEPOBJECT_FLIPNORMALS] = True
    obj[c4d.SWEEPOBJECT_GROWUV] = True
    obj[c4d.SWEEPOBJECT_ROTATIONFROM] = 0.1
    obj[c4d.SWEEPOBJECT_ROTATIONTO] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.SWEEPOBJECT_ISOPARM,1)
    bc.SetFloat(c4d.SWEEPOBJECT_SCALE,0.1)
    bc.SetFloat(c4d.SWEEPOBJECT_ROTATE,0.1)
    bc.SetFloat(c4d.SWEEPOBJECT_STARTGROWTH,0.1)
    bc.SetFloat(c4d.SWEEPOBJECT_GROWTH,0.1)
    bc.SetBool(c4d.SWEEPOBJECT_PARALLEL,True)
    bc.SetBool(c4d.SWEEPOBJECT_CONSTANT,True)
    bc.SetBool(c4d.SWEEPOBJECT_BANKING,True)
    bc.SetBool(c4d.SWEEPOBJECT_KEEPSEGMENTS,True)
    bc.SetBool(c4d.SWEEPOBJECT_RAILDIRECTION,True)
    bc.SetBool(c4d.SWEEPOBJECT_BIRAIL,True)
    bc.SetBool(c4d.SWEEPOBJECT_RAILSCALE,True)
    bc.SetBool(c4d.SWEEPOBJECT_FLIPNORMALS,True)
    bc.SetBool(c4d.SWEEPOBJECT_GROWUV,True)
    bc.SetFloat(c4d.SWEEPOBJECT_ROTATIONFROM,0.1)
    bc.SetFloat(c4d.SWEEPOBJECT_ROTATIONTO,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/osweep.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Osweep);
    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(SWEEPOBJECT_ISOPARM),GeData(1),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_SCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_ROTATE),GeData(0.1),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_STARTGROWTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_GROWTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_PARALLEL),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_CONSTANT),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_BANKING),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_KEEPSEGMENTS),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_RAILDIRECTION),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_BIRAIL),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_RAILSCALE),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_FLIPNORMALS),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_GROWUV),GeData(true),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_ROTATIONFROM),GeData(0.1),flags);
    pObject->SetParameter(DescID(SWEEPOBJECT_ROTATIONTO),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(SWEEPOBJECT_ISOPARM,1);
    bc->SetFloat(SWEEPOBJECT_SCALE,0.1);
    bc->SetFloat(SWEEPOBJECT_ROTATE,0.1);
    bc->SetFloat(SWEEPOBJECT_STARTGROWTH,0.1);
    bc->SetFloat(SWEEPOBJECT_GROWTH,0.1);
    bc->SetBool(SWEEPOBJECT_PARALLEL,true);
    bc->SetBool(SWEEPOBJECT_CONSTANT,true);
    bc->SetBool(SWEEPOBJECT_BANKING,true);
    bc->SetBool(SWEEPOBJECT_KEEPSEGMENTS,true);
    bc->SetBool(SWEEPOBJECT_RAILDIRECTION,true);
    bc->SetBool(SWEEPOBJECT_BIRAIL,true);
    bc->SetBool(SWEEPOBJECT_RAILSCALE,true);
    bc->SetBool(SWEEPOBJECT_FLIPNORMALS,true);
    bc->SetBool(SWEEPOBJECT_GROWUV,true);
    bc->SetFloat(SWEEPOBJECT_ROTATIONFROM,0.1);
    bc->SetFloat(SWEEPOBJECT_ROTATIONTO,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}