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 Oxpgenerator

Oxpgenerator

Attributes

  • ENGLISH NAME : X-ParticlesGeneratorObject
  • NAME : Oxpgenerator
  • INCLUDE : Obase
  • PATH : res/description/oxpgenerator.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OXPGENERATOR

Elements

ID UI Name Type Parameters Cycle
XGEN_EMITTER_LINK Emitter LINK  
XGEN_GENERATE_OBJECTS ObjectsfromParticleBirth BOOL  
XGEN_MULTI_OBJ UseMultipleChildObjects LONG  
XGEN_MULTI_SEQ Sequentially
XGEN_MULTI_RAND Randomly
XGEN_MULTI_FIRST FirstChildOnly
XGEN_MULTI_CHOOSE ChoosebyIndex
XGEN_MULTI_GROUP AssignbyGroup
XGEN_MULTI_SELECT IndexofChildObjecttoGenerate LONG
MIN 1
MINSLIDER 1
MAXSLIDER 20
CUSTOMGUI LONGSLIDER
XGEN_MULTI_RANSEED RandomSeed LONG MIN
XGEN_INSTANCES CloneType LONG ANIM
XGEN_INSTANCES_CLONE StraightClone
XGEN_INSTANCES_INST CreateInstances
XGEN_INSTANCES_RENINST CreateRenderInstances
XGEN_DRAWMODE DrawMode LONG  
XGEN_DRAWMODE_GEOM GeometryOnly
XGEN_DRAWMODE_PARTICLE ParticlesOnly
XGEN_DRAWMODE_BOTH GeometryandParticles
XGEN_DRAWMODE_RENDERONLY GeometryonRenderOnly
XGEN_ANIMATE Animate BOOL  
XGEN_ANIMATE_SCALE Scale REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XGEN_ANIMATE_SCALE_VAR Variation REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XGEN_ANIMATE_OFFSET_RANDOM RandomOffset BOOL  
XGEN_ANIMATE_OFFSET Offset BASETIME  
XGEN_OBJECT_OFFSET Offset VECTOR UNIT
XGEN_OBJECT_OFFSET_VAR Variation VECTOR UNIT
XGEN_SCALEMODE ScaleUsing LONG  
XGEN_SCALEMODE_PSCALE ParticleScale
XGEN_SCALEMODE_PRADIUS ParticleRadius
XGEN_SCALEMODE_SOURCE SourceObjectScale
XGEN_SCALEMODE_SET SetScale
XGEN_OBJECT_SCALE ObjectScale VECTOR
UNIT REAL
MIN 0.0
XGEN_OBJECT_SCALE_VAR Variation VECTOR
UNIT REAL
MIN 0.0
XGEN_ROTMODE RotateUsing LONG  
XGEN_ROTMODE_PARTICLE ParticleRotation
XGEN_ROTMODE_SET SetRotation
XGEN_ROTMODE_SOURCE SourceObjectRotation
XGEN_ROTMODE_OFFSET OffsetParticleRotation
XGEN_OBJECT_ROT Rotation VECTOR
UNIT DEGREE
MIN -360.0
MAX 360.0
XGEN_OBJECT_ROT_VAR Variation VECTOR
UNIT DEGREE
MIN 0.0
MAX 360.0
XGEN_MORPH_ENABLE EnableMorphing BOOL  
XGEN_MORPH_TARGET MorphTargets IN_EXCLUDE NUM_FLAGS
XGEN_MORPH_INDEX MorphTargetIndex LONG
MIN 1
MINSLIDER 1
MAXSLIDER 20
CUSTOMGUI LONGSLIDER
XGEN_MORPH_MAX MorphMaximum REAL
UNIT PERCENT
STEP 1.0
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XGEN_MORPH_MAX_VAR Variation REAL
UNIT PERCENT
STEP 1.0
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XGEN_CACHEINFO_CACHEDELEMENTS LONG
HIDDEN
MIN 0
XGEN_HELP_BUTTON BITMAPBUTTON  
XGEN_VIDMAN_BUTTON BITMAPBUTTON  
XGEN_BUTTON_RESET ResettoDefaults BUTTON  
XGEN_BUTTON_SAVE_PRESET SavePreset... BUTTON  
XGEN_BUTTON_LOAD_PRESET LoadPreset... BUTTON  
XGEN_GEOMETRY_GROUPS 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.Oxpgenerator)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XGEN_GENERATE_OBJECTS] = True
    obj[c4d.XGEN_MULTI_OBJ] = c4d.XGEN_MULTI_SEQ
    obj[c4d.XGEN_MULTI_SELECT] = 1
    obj[c4d.XGEN_MULTI_RANSEED] = 1
    obj[c4d.XGEN_INSTANCES] = c4d.XGEN_INSTANCES_CLONE
    obj[c4d.XGEN_DRAWMODE] = c4d.XGEN_DRAWMODE_GEOM
    obj[c4d.XGEN_ANIMATE] = True
    obj[c4d.XGEN_ANIMATE_SCALE] = 0.1
    obj[c4d.XGEN_ANIMATE_SCALE_VAR] = 0.1
    obj[c4d.XGEN_ANIMATE_OFFSET_RANDOM] = True
    obj[c4d.XGEN_OBJECT_OFFSET] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XGEN_OBJECT_OFFSET_VAR] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XGEN_SCALEMODE] = c4d.XGEN_SCALEMODE_PSCALE
    obj[c4d.XGEN_OBJECT_SCALE] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XGEN_OBJECT_SCALE_VAR] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XGEN_ROTMODE] = c4d.XGEN_ROTMODE_PARTICLE
    obj[c4d.XGEN_OBJECT_ROT] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XGEN_OBJECT_ROT_VAR] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XGEN_MORPH_ENABLE] = True
    obj[c4d.XGEN_MORPH_INDEX] = 1
    obj[c4d.XGEN_MORPH_MAX] = 0.1
    obj[c4d.XGEN_MORPH_MAX_VAR] = 0.1
    obj[c4d.XGEN_CACHEINFO_CACHEDELEMENTS] = 1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XGEN_GENERATE_OBJECTS,True)
    bc.SetInt32(c4d.XGEN_MULTI_OBJ,c4d.XGEN_MULTI_SEQ)
    bc.SetInt32(c4d.XGEN_MULTI_SELECT,1)
    bc.SetInt32(c4d.XGEN_MULTI_RANSEED,1)
    bc.SetInt32(c4d.XGEN_INSTANCES,c4d.XGEN_INSTANCES_CLONE)
    bc.SetInt32(c4d.XGEN_DRAWMODE,c4d.XGEN_DRAWMODE_GEOM)
    bc.SetBool(c4d.XGEN_ANIMATE,True)
    bc.SetFloat(c4d.XGEN_ANIMATE_SCALE,0.1)
    bc.SetFloat(c4d.XGEN_ANIMATE_SCALE_VAR,0.1)
    bc.SetBool(c4d.XGEN_ANIMATE_OFFSET_RANDOM,True)
    bc.SetVector(c4d.XGEN_OBJECT_OFFSET, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.XGEN_OBJECT_OFFSET_VAR, c4d.Vector(1.0,1.0,1.0)
    bc.SetInt32(c4d.XGEN_SCALEMODE,c4d.XGEN_SCALEMODE_PSCALE)
    bc.SetVector(c4d.XGEN_OBJECT_SCALE, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.XGEN_OBJECT_SCALE_VAR, c4d.Vector(1.0,1.0,1.0)
    bc.SetInt32(c4d.XGEN_ROTMODE,c4d.XGEN_ROTMODE_PARTICLE)
    bc.SetVector(c4d.XGEN_OBJECT_ROT, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.XGEN_OBJECT_ROT_VAR, c4d.Vector(1.0,1.0,1.0)
    bc.SetBool(c4d.XGEN_MORPH_ENABLE,True)
    bc.SetInt32(c4d.XGEN_MORPH_INDEX,1)
    bc.SetFloat(c4d.XGEN_MORPH_MAX,0.1)
    bc.SetFloat(c4d.XGEN_MORPH_MAX_VAR,0.1)
    bc.SetInt32(c4d.XGEN_CACHEINFO_CACHEDELEMENTS,1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/oxpgenerator.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oxpgenerator);
    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(XGEN_GENERATE_OBJECTS),GeData(true),flags);
    pObject->SetParameter(DescID(XGEN_MULTI_OBJ),GeData(XGEN_MULTI_SEQ),flags);
    pObject->SetParameter(DescID(XGEN_MULTI_SELECT),GeData(1),flags);
    pObject->SetParameter(DescID(XGEN_MULTI_RANSEED),GeData(1),flags);
    pObject->SetParameter(DescID(XGEN_INSTANCES),GeData(XGEN_INSTANCES_CLONE),flags);
    pObject->SetParameter(DescID(XGEN_DRAWMODE),GeData(XGEN_DRAWMODE_GEOM),flags);
    pObject->SetParameter(DescID(XGEN_ANIMATE),GeData(true),flags);
    pObject->SetParameter(DescID(XGEN_ANIMATE_SCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XGEN_ANIMATE_SCALE_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XGEN_ANIMATE_OFFSET_RANDOM),GeData(true),flags);
    pObject->SetParameter(DescID(XGEN_OBJECT_OFFSET),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XGEN_OBJECT_OFFSET_VAR),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XGEN_SCALEMODE),GeData(XGEN_SCALEMODE_PSCALE),flags);
    pObject->SetParameter(DescID(XGEN_OBJECT_SCALE),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XGEN_OBJECT_SCALE_VAR),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XGEN_ROTMODE),GeData(XGEN_ROTMODE_PARTICLE),flags);
    pObject->SetParameter(DescID(XGEN_OBJECT_ROT),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XGEN_OBJECT_ROT_VAR),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XGEN_MORPH_ENABLE),GeData(true),flags);
    pObject->SetParameter(DescID(XGEN_MORPH_INDEX),GeData(1),flags);
    pObject->SetParameter(DescID(XGEN_MORPH_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XGEN_MORPH_MAX_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XGEN_CACHEINFO_CACHEDELEMENTS),GeData(1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XGEN_GENERATE_OBJECTS,true);
    bc->SetInt32(XGEN_MULTI_OBJ,XGEN_MULTI_SEQ);
    bc->SetInt32(XGEN_MULTI_SELECT,1);
    bc->SetInt32(XGEN_MULTI_RANSEED,1);
    bc->SetInt32(XGEN_INSTANCES,XGEN_INSTANCES_CLONE);
    bc->SetInt32(XGEN_DRAWMODE,XGEN_DRAWMODE_GEOM);
    bc->SetBool(XGEN_ANIMATE,true);
    bc->SetFloat(XGEN_ANIMATE_SCALE,0.1);
    bc->SetFloat(XGEN_ANIMATE_SCALE_VAR,0.1);
    bc->SetBool(XGEN_ANIMATE_OFFSET_RANDOM,true);
    bc->SetVector(XGEN_OBJECT_OFFSET, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(XGEN_OBJECT_OFFSET_VAR, c4d.Vector(1.0,1.0,1.0);
    bc->SetInt32(XGEN_SCALEMODE,XGEN_SCALEMODE_PSCALE);
    bc->SetVector(XGEN_OBJECT_SCALE, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(XGEN_OBJECT_SCALE_VAR, c4d.Vector(1.0,1.0,1.0);
    bc->SetInt32(XGEN_ROTMODE,XGEN_ROTMODE_PARTICLE);
    bc->SetVector(XGEN_OBJECT_ROT, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(XGEN_OBJECT_ROT_VAR, c4d.Vector(1.0,1.0,1.0);
    bc->SetBool(XGEN_MORPH_ENABLE,true);
    bc->SetInt32(XGEN_MORPH_INDEX,1);
    bc->SetFloat(XGEN_MORPH_MAX,0.1);
    bc->SetFloat(XGEN_MORPH_MAX_VAR,0.1);
    bc->SetInt32(XGEN_CACHEINFO_CACHEDELEMENTS,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.XGEN_HELP_BUTTON)
c4d.CallButton(obj,c4d.XGEN_VIDMAN_BUTTON)
c4d.CallButton(obj,c4d.XGEN_BUTTON_RESET)
c4d.CallButton(obj,c4d.XGEN_BUTTON_SAVE_PRESET)
c4d.CallButton(obj,c4d.XGEN_BUTTON_LOAD_PRESET)

C++

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

DescriptionCommand dc; dc.id = DescID(XGEN_VIDMAN_BUTTON); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XGEN_BUTTON_RESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XGEN_BUTTON_SAVE_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XGEN_BUTTON_LOAD_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);