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 Omspawn

Omspawn

Attributes

  • ENGLISH NAME : X-ParticlesSpawnModifier
  • NAME : Omspawn
  • INCLUDE : Obase
  • PATH : res/description/omspawn.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OMSPAWN

Elements

ID UI Name Type Parameters Cycle
XMSW_SPAWN_ENABLED Enabled BOOL  
XMSW_SPAWN_MODE Mode LONG  
SPAWN_MODE_INDEP Independent
SPAWN_MODE_ACTION Action-Controlled
XMSW_SPAWN_EMITTER SpawningEmitter LINK  
XMSW_SPAWN_POS SpawnedParticlePosition LONG  
MSPAWN_POS_PARTICLE SourceParticle
MSPAWN_POS_EMITTER DeterminedbyEmitter
XMSW_SPAWN_OFFSET_TYPE OffsetPosition LONG  
MSPAWN_OFFSET_TYPE_SET UseOffsetValue
MSPAWN_OFFSET_TYPE_RADIUS UseParticleRadius
XMSW_SPAWN_OFFSET_VALUE OffsetValue REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMSW_SPAWN_DIR Direction LONG  
MSPAWN_DIR_RANDOM Random(Spherical)
MSPAWN_DIR_PARTICLE RelativetoSourceParticleDirection
MSPAWN_DIR_PROT RelativetoSourceParticleRotation
MSPAWN_DIR_CUSTOM Custom(Absolute)
XMSW_SPAWN_DIRECT_X Heading REAL
UNIT DEGREE
STEP 1.0
MINSLIDER -360.0
MAXSLIDER 360.0
CUSTOMGUI REALSLIDER
XMSW_SPAWN_DIRECT_Y Pitch REAL
UNIT DEGREE
STEP 1.0
MINSLIDER -360.0
MAXSLIDER 360.0
CUSTOMGUI REALSLIDER
XMSW_SPAWN_SPREAD Spread REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMSW_SPAWN_DIR_REVERSE Reverse BOOL  
XMSW_SPAWN_SPEED SpawnedParticleSpeed LONG  
MSPAWN_SPEED_ABS Absolute
MSPAWN_SPEED_REL RelativetoSourceParticle
MSPAWN_SPEED_INH Inherit
XMSW_SPAWN_SPEED_MULT SpeedMultiplier REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 10.0
CUSTOMGUI REALSLIDER
XMSW_SPAWN_NUMBER SpawnNumber LONG
MIN 0
STEP 1
MINSLIDER 0
MAXSLIDER 1000
CUSTOMGUI LONGSLIDER
XMSW_SPAWN_NUMBER_VAR NumberVariation(+/-) LONG
MIN 0
STEP 1
MINSLIDER 0
MAXSLIDER 1000
CUSTOMGUI LONGSLIDER
XMSW_SPAWN_RATE SpawnNumberTiming LONG  
MSPAWN_RATE_SECOND PerSecond
MSPAWN_RATE_FRAME PerFrame
XMSW_SPAWN_LIFE SpawnedParticleLife LONG  
MSPAWN_LIFE_ABS Absolute
MSPAWN_LIFE_REL RelativetoSourceParticle
MSPAWN_LIFE_INH Inherit
XMSW_SPAWN_LIFE_VAR LifeVariation(+/-) BASETIME  
XMSW_SPAWN_SETGROUPNUM Group LINK  
XMSW_SPAWN_INTERVAL_MIN Min.IntervalBetweenSpawns BASETIME  
XMSW_SPAWN_INTERVAL_MAX Max.IntervalBetweenSpawns BASETIME  
XMSW_SPAWN_ONCEONLY SpawnOnceOnly BOOL  
XMSW_SPAWN_FREEZECHECK Don'tSpawnfromFrozenParticles BOOL  
XMSW_SPAWN_INHERIT_ROT InheritRotation BOOL  
XMSW_SPAWN_INHERIT_ROT_INVERT Invert BOOL  
XMSW_SPAWN_INHERIT_COLOR InheritColor BOOL  
XMSW_SPAWN_KILLPART KillOriginalParticleAfterSpawning BOOL  
XMSW_SPAWN_GROUP 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.Omspawn)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XMSW_SPAWN_ENABLED] = True
    obj[c4d.XMSW_SPAWN_MODE] = c4d.SPAWN_MODE_INDEP
    obj[c4d.XMSW_SPAWN_POS] = c4d.MSPAWN_POS_PARTICLE
    obj[c4d.XMSW_SPAWN_OFFSET_TYPE] = c4d.MSPAWN_OFFSET_TYPE_SET
    obj[c4d.XMSW_SPAWN_OFFSET_VALUE] = 0.1
    obj[c4d.XMSW_SPAWN_DIR] = c4d.MSPAWN_DIR_RANDOM
    obj[c4d.XMSW_SPAWN_DIRECT_X] = 0.1
    obj[c4d.XMSW_SPAWN_DIRECT_Y] = 0.1
    obj[c4d.XMSW_SPAWN_SPREAD] = 0.1
    obj[c4d.XMSW_SPAWN_DIR_REVERSE] = True
    obj[c4d.XMSW_SPAWN_SPEED] = c4d.MSPAWN_SPEED_ABS
    obj[c4d.XMSW_SPAWN_SPEED_MULT] = 0.1
    obj[c4d.XMSW_SPAWN_NUMBER] = 1
    obj[c4d.XMSW_SPAWN_NUMBER_VAR] = 1
    obj[c4d.XMSW_SPAWN_RATE] = c4d.MSPAWN_RATE_SECOND
    obj[c4d.XMSW_SPAWN_LIFE] = c4d.MSPAWN_LIFE_ABS
    obj[c4d.XMSW_SPAWN_ONCEONLY] = True
    obj[c4d.XMSW_SPAWN_FREEZECHECK] = True
    obj[c4d.XMSW_SPAWN_INHERIT_ROT] = True
    obj[c4d.XMSW_SPAWN_INHERIT_ROT_INVERT] = True
    obj[c4d.XMSW_SPAWN_INHERIT_COLOR] = True
    obj[c4d.XMSW_SPAWN_KILLPART] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XMSW_SPAWN_ENABLED,True)
    bc.SetInt32(c4d.XMSW_SPAWN_MODE,c4d.SPAWN_MODE_INDEP)
    bc.SetInt32(c4d.XMSW_SPAWN_POS,c4d.MSPAWN_POS_PARTICLE)
    bc.SetInt32(c4d.XMSW_SPAWN_OFFSET_TYPE,c4d.MSPAWN_OFFSET_TYPE_SET)
    bc.SetFloat(c4d.XMSW_SPAWN_OFFSET_VALUE,0.1)
    bc.SetInt32(c4d.XMSW_SPAWN_DIR,c4d.MSPAWN_DIR_RANDOM)
    bc.SetFloat(c4d.XMSW_SPAWN_DIRECT_X,0.1)
    bc.SetFloat(c4d.XMSW_SPAWN_DIRECT_Y,0.1)
    bc.SetFloat(c4d.XMSW_SPAWN_SPREAD,0.1)
    bc.SetBool(c4d.XMSW_SPAWN_DIR_REVERSE,True)
    bc.SetInt32(c4d.XMSW_SPAWN_SPEED,c4d.MSPAWN_SPEED_ABS)
    bc.SetFloat(c4d.XMSW_SPAWN_SPEED_MULT,0.1)
    bc.SetInt32(c4d.XMSW_SPAWN_NUMBER,1)
    bc.SetInt32(c4d.XMSW_SPAWN_NUMBER_VAR,1)
    bc.SetInt32(c4d.XMSW_SPAWN_RATE,c4d.MSPAWN_RATE_SECOND)
    bc.SetInt32(c4d.XMSW_SPAWN_LIFE,c4d.MSPAWN_LIFE_ABS)
    bc.SetBool(c4d.XMSW_SPAWN_ONCEONLY,True)
    bc.SetBool(c4d.XMSW_SPAWN_FREEZECHECK,True)
    bc.SetBool(c4d.XMSW_SPAWN_INHERIT_ROT,True)
    bc.SetBool(c4d.XMSW_SPAWN_INHERIT_ROT_INVERT,True)
    bc.SetBool(c4d.XMSW_SPAWN_INHERIT_COLOR,True)
    bc.SetBool(c4d.XMSW_SPAWN_KILLPART,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/omspawn.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omspawn);
    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(XMSW_SPAWN_ENABLED),GeData(true),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_MODE),GeData(SPAWN_MODE_INDEP),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_POS),GeData(MSPAWN_POS_PARTICLE),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_OFFSET_TYPE),GeData(MSPAWN_OFFSET_TYPE_SET),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_OFFSET_VALUE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_DIR),GeData(MSPAWN_DIR_RANDOM),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_DIRECT_X),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_DIRECT_Y),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_SPREAD),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_DIR_REVERSE),GeData(true),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_SPEED),GeData(MSPAWN_SPEED_ABS),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_SPEED_MULT),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_NUMBER),GeData(1),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_NUMBER_VAR),GeData(1),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_RATE),GeData(MSPAWN_RATE_SECOND),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_LIFE),GeData(MSPAWN_LIFE_ABS),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_ONCEONLY),GeData(true),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_FREEZECHECK),GeData(true),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_INHERIT_ROT),GeData(true),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_INHERIT_ROT_INVERT),GeData(true),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_INHERIT_COLOR),GeData(true),flags);
    pObject->SetParameter(DescID(XMSW_SPAWN_KILLPART),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XMSW_SPAWN_ENABLED,true);
    bc->SetInt32(XMSW_SPAWN_MODE,SPAWN_MODE_INDEP);
    bc->SetInt32(XMSW_SPAWN_POS,MSPAWN_POS_PARTICLE);
    bc->SetInt32(XMSW_SPAWN_OFFSET_TYPE,MSPAWN_OFFSET_TYPE_SET);
    bc->SetFloat(XMSW_SPAWN_OFFSET_VALUE,0.1);
    bc->SetInt32(XMSW_SPAWN_DIR,MSPAWN_DIR_RANDOM);
    bc->SetFloat(XMSW_SPAWN_DIRECT_X,0.1);
    bc->SetFloat(XMSW_SPAWN_DIRECT_Y,0.1);
    bc->SetFloat(XMSW_SPAWN_SPREAD,0.1);
    bc->SetBool(XMSW_SPAWN_DIR_REVERSE,true);
    bc->SetInt32(XMSW_SPAWN_SPEED,MSPAWN_SPEED_ABS);
    bc->SetFloat(XMSW_SPAWN_SPEED_MULT,0.1);
    bc->SetInt32(XMSW_SPAWN_NUMBER,1);
    bc->SetInt32(XMSW_SPAWN_NUMBER_VAR,1);
    bc->SetInt32(XMSW_SPAWN_RATE,MSPAWN_RATE_SECOND);
    bc->SetInt32(XMSW_SPAWN_LIFE,MSPAWN_LIFE_ABS);
    bc->SetBool(XMSW_SPAWN_ONCEONLY,true);
    bc->SetBool(XMSW_SPAWN_FREEZECHECK,true);
    bc->SetBool(XMSW_SPAWN_INHERIT_ROT,true);
    bc->SetBool(XMSW_SPAWN_INHERIT_ROT_INVERT,true);
    bc->SetBool(XMSW_SPAWN_INHERIT_COLOR,true);
    bc->SetBool(XMSW_SPAWN_KILLPART,true);
    pObject->Message(MSG_UPDATE);                                                      
}