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 Oparticle

Oparticle

Attributes

  • ENGLISH NAME : ParticleEmitterObject
  • NAME : Oparticle
  • INCLUDE : Obase
  • PATH : c4dplugin/description/oparticle.res
  • PLUGIN : c4dplugin
  • MAXON online help (may not exist): OPARTICLE

Elements

ID UI Name Type Parameters Cycle
PARTICLEOBJECT_BIRTHEDITOR BirthrateEditor LONG
MIN 0
MAX 1000000
PARTICLEOBJECT_BIRTHRAYTRACER BirthrateRenderer LONG
MIN 0
MAX 1000000
PARTICLEOBJECT_VISIBILITY Visibility REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
PARTICLEOBJECT_START StartEmission BASETIME ANIM
PARTICLEOBJECT_STOP StopEmission BASETIME ANIM
PARTICLEOBJECT_SEED Seed LONG
MIN 0
MAX 10000
PARTICLEOBJECT_RELATIVE_SPEED RelativeSpeed BOOL  
PARTICLEOBJECT_LIFETIME Lifetime BASETIME
MIN 0
MINEX
PARTICLEOBJECT_LIFETIMEVAR LifetimeVariation REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
PARTICLEOBJECT_SPEED Speed REAL UNIT
PARTICLEOBJECT_SPEEDVAR SpeedVariation REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
PARTICLEOBJECT_ROTATION Rotation REAL UNIT
PARTICLEOBJECT_ROTATIONVAR RotationalVariation REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
PARTICLEOBJECT_SIZE EndScale REAL
MIN 0.0
STEP 0.01
PARTICLEOBJECT_SIZEVAR ScaleVariation REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
PARTICLEOBJECT_TANGENTIAL Tangential BOOL  
PARTICLEOBJECT_SHOWOBJECTS ShowObjects BOOL  
PARTICLEOBJECT_RENDERINSTANCES RenderInstance BOOL  
PARTICLEOBJECT_TYPE EmitterType LONG  
PARTICLEOBJECT_TYPE_PYRAMID Pyramid
PARTICLEOBJECT_TYPE_CONE Cone
PARTICLEOBJECT_SIZEX X-Size REAL
UNIT METER
MIN 0.0
PARTICLEOBJECT_SIZEY Y-Size REAL
UNIT METER
MIN 0.0
PARTICLEOBJECT_ANGLEH AngleHorizontal REAL
UNIT DEGREE
MIN 0.0
MAX 360.0
PARTICLEOBJECT_ANGLEV AngleVertical REAL
UNIT DEGREE
MIN 0.0
MAX 180.0
PARTICLEOBJECT_MODE Mode LONG  
PARTICLEOBJECT_MODE_INCLUDE Include
PARTICLEOBJECT_MODE_EXCLUDE Exclude
PARTICLEOBJECT_INCLUDE Modifiers IN_EXCLUDE
NUM_FLAGS 0
INIT_STATE 0
SEND_SELCHNGMSG 1

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.Oparticle)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.PARTICLEOBJECT_BIRTHEDITOR] = 1
    obj[c4d.PARTICLEOBJECT_BIRTHRAYTRACER] = 1
    obj[c4d.PARTICLEOBJECT_VISIBILITY] = 0.1
    obj[c4d.PARTICLEOBJECT_SEED] = 1
    obj[c4d.PARTICLEOBJECT_RELATIVE_SPEED] = True
    obj[c4d.PARTICLEOBJECT_LIFETIMEVAR] = 0.1
    obj[c4d.PARTICLEOBJECT_SPEED] = 0.1
    obj[c4d.PARTICLEOBJECT_SPEEDVAR] = 0.1
    obj[c4d.PARTICLEOBJECT_ROTATION] = 0.1
    obj[c4d.PARTICLEOBJECT_ROTATIONVAR] = 0.1
    obj[c4d.PARTICLEOBJECT_SIZE] = 0.1
    obj[c4d.PARTICLEOBJECT_SIZEVAR] = 0.1
    obj[c4d.PARTICLEOBJECT_TANGENTIAL] = True
    obj[c4d.PARTICLEOBJECT_SHOWOBJECTS] = True
    obj[c4d.PARTICLEOBJECT_RENDERINSTANCES] = True
    obj[c4d.PARTICLEOBJECT_TYPE] = c4d.PARTICLEOBJECT_TYPE_PYRAMID
    obj[c4d.PARTICLEOBJECT_SIZEX] = 0.1
    obj[c4d.PARTICLEOBJECT_SIZEY] = 0.1
    obj[c4d.PARTICLEOBJECT_ANGLEH] = 0.1
    obj[c4d.PARTICLEOBJECT_ANGLEV] = 0.1
    obj[c4d.PARTICLEOBJECT_MODE] = c4d.PARTICLEOBJECT_MODE_INCLUDE
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.PARTICLEOBJECT_BIRTHEDITOR,1)
    bc.SetInt32(c4d.PARTICLEOBJECT_BIRTHRAYTRACER,1)
    bc.SetFloat(c4d.PARTICLEOBJECT_VISIBILITY,0.1)
    bc.SetInt32(c4d.PARTICLEOBJECT_SEED,1)
    bc.SetBool(c4d.PARTICLEOBJECT_RELATIVE_SPEED,True)
    bc.SetFloat(c4d.PARTICLEOBJECT_LIFETIMEVAR,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_SPEED,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_SPEEDVAR,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_ROTATION,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_ROTATIONVAR,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_SIZE,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_SIZEVAR,0.1)
    bc.SetBool(c4d.PARTICLEOBJECT_TANGENTIAL,True)
    bc.SetBool(c4d.PARTICLEOBJECT_SHOWOBJECTS,True)
    bc.SetBool(c4d.PARTICLEOBJECT_RENDERINSTANCES,True)
    bc.SetInt32(c4d.PARTICLEOBJECT_TYPE,c4d.PARTICLEOBJECT_TYPE_PYRAMID)
    bc.SetFloat(c4d.PARTICLEOBJECT_SIZEX,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_SIZEY,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_ANGLEH,0.1)
    bc.SetFloat(c4d.PARTICLEOBJECT_ANGLEV,0.1)
    bc.SetInt32(c4d.PARTICLEOBJECT_MODE,c4d.PARTICLEOBJECT_MODE_INCLUDE)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/oparticle.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oparticle);
    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(PARTICLEOBJECT_BIRTHEDITOR),GeData(1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_BIRTHRAYTRACER),GeData(1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_VISIBILITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_SEED),GeData(1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_RELATIVE_SPEED),GeData(true),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_LIFETIMEVAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_SPEED),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_SPEEDVAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_ROTATION),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_ROTATIONVAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_SIZE),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_SIZEVAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_TANGENTIAL),GeData(true),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_SHOWOBJECTS),GeData(true),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_RENDERINSTANCES),GeData(true),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_TYPE),GeData(PARTICLEOBJECT_TYPE_PYRAMID),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_SIZEX),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_SIZEY),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_ANGLEH),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_ANGLEV),GeData(0.1),flags);
    pObject->SetParameter(DescID(PARTICLEOBJECT_MODE),GeData(PARTICLEOBJECT_MODE_INCLUDE),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(PARTICLEOBJECT_BIRTHEDITOR,1);
    bc->SetInt32(PARTICLEOBJECT_BIRTHRAYTRACER,1);
    bc->SetFloat(PARTICLEOBJECT_VISIBILITY,0.1);
    bc->SetInt32(PARTICLEOBJECT_SEED,1);
    bc->SetBool(PARTICLEOBJECT_RELATIVE_SPEED,true);
    bc->SetFloat(PARTICLEOBJECT_LIFETIMEVAR,0.1);
    bc->SetFloat(PARTICLEOBJECT_SPEED,0.1);
    bc->SetFloat(PARTICLEOBJECT_SPEEDVAR,0.1);
    bc->SetFloat(PARTICLEOBJECT_ROTATION,0.1);
    bc->SetFloat(PARTICLEOBJECT_ROTATIONVAR,0.1);
    bc->SetFloat(PARTICLEOBJECT_SIZE,0.1);
    bc->SetFloat(PARTICLEOBJECT_SIZEVAR,0.1);
    bc->SetBool(PARTICLEOBJECT_TANGENTIAL,true);
    bc->SetBool(PARTICLEOBJECT_SHOWOBJECTS,true);
    bc->SetBool(PARTICLEOBJECT_RENDERINSTANCES,true);
    bc->SetInt32(PARTICLEOBJECT_TYPE,PARTICLEOBJECT_TYPE_PYRAMID);
    bc->SetFloat(PARTICLEOBJECT_SIZEX,0.1);
    bc->SetFloat(PARTICLEOBJECT_SIZEY,0.1);
    bc->SetFloat(PARTICLEOBJECT_ANGLEH,0.1);
    bc->SetFloat(PARTICLEOBJECT_ANGLEV,0.1);
    bc->SetInt32(PARTICLEOBJECT_MODE,PARTICLEOBJECT_MODE_INCLUDE);
    pObject->Message(MSG_UPDATE);                                                      
}