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 Oxpppcollisions

Oxpppcollisions

Attributes

  • ENGLISH NAME : X-ParticlesParticle-ParticleCollisions
  • NAME : Oxpppcollisions
  • INCLUDE : Obase
  • PATH : res/description/oxpppcollisions.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OXPPPCOLLISIONS

Elements

ID UI Name Type Parameters Cycle
XPPPCOLLISIONS_SELF SelfCollisions BOOL  
XPPPCOLLISIONS_ELASTICITY Bounce REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPPPCOLLISIONS_ELASTICITY_VAR Variation REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPPPCOLLISIONS_FRICTION Friction REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPPPCOLLISIONS_FRICTION_VAR Variation REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPPPCOLLISIONS_SCATTER Scatter REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPPPCOLLISIONS_SPAWN SpawnonCollision BOOL  
XPPPCOLLISIONS_EMITTER SpawningEmitter LINK  
XPPPCOLLISIONS_SPAWNCOUNT NumbertoSpawn LONG
MIN 0
STEP 1
MINSLIDER 0
MAXSLIDER 1000
CUSTOMGUI LONGSLIDER
XPPPCOLLISIONS_SPAWN_SETGROUPNUM Group LINK  
XPPPCOLLISIONS_SPAWNONCEONLY SpawnOnceOnly BOOL  
XPPPCOLLISIONS_KILL KillParticlesonCollision BOOL  
XPPPCOLLISIONS_CONNECT ConnectonCollision BOOL SCALE_H
XPPPCOLLISIONS_CONNECT_GROUP_ONLY SameGroupOnly BOOL SCALE_H
XPPPCOLLISIONS_CONNECT_LIMIT ConnectionLimit LONG
MIN 1
MINSLIDER 1
MAXSLIDER 100
CUSTOMGUI LONGSLIDER
SCALE_H
XPPPCOLLISIONS_CONNECT_STIFFNESS Stiffness REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPPPCOLLISIONS_CONNECT_BREAK Break REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPPPCOLLISIONS_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.Oxpppcollisions)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XPPPCOLLISIONS_SELF] = True
    obj[c4d.XPPPCOLLISIONS_ELASTICITY] = 0.1
    obj[c4d.XPPPCOLLISIONS_ELASTICITY_VAR] = 0.1
    obj[c4d.XPPPCOLLISIONS_FRICTION] = 0.1
    obj[c4d.XPPPCOLLISIONS_FRICTION_VAR] = 0.1
    obj[c4d.XPPPCOLLISIONS_SCATTER] = 0.1
    obj[c4d.XPPPCOLLISIONS_SPAWN] = True
    obj[c4d.XPPPCOLLISIONS_SPAWNCOUNT] = 1
    obj[c4d.XPPPCOLLISIONS_SPAWNONCEONLY] = True
    obj[c4d.XPPPCOLLISIONS_KILL] = True
    obj[c4d.XPPPCOLLISIONS_CONNECT] = True
    obj[c4d.XPPPCOLLISIONS_CONNECT_GROUP_ONLY] = True
    obj[c4d.XPPPCOLLISIONS_CONNECT_LIMIT] = 1
    obj[c4d.XPPPCOLLISIONS_CONNECT_STIFFNESS] = 0.1
    obj[c4d.XPPPCOLLISIONS_CONNECT_BREAK] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XPPPCOLLISIONS_SELF,True)
    bc.SetFloat(c4d.XPPPCOLLISIONS_ELASTICITY,0.1)
    bc.SetFloat(c4d.XPPPCOLLISIONS_ELASTICITY_VAR,0.1)
    bc.SetFloat(c4d.XPPPCOLLISIONS_FRICTION,0.1)
    bc.SetFloat(c4d.XPPPCOLLISIONS_FRICTION_VAR,0.1)
    bc.SetFloat(c4d.XPPPCOLLISIONS_SCATTER,0.1)
    bc.SetBool(c4d.XPPPCOLLISIONS_SPAWN,True)
    bc.SetInt32(c4d.XPPPCOLLISIONS_SPAWNCOUNT,1)
    bc.SetBool(c4d.XPPPCOLLISIONS_SPAWNONCEONLY,True)
    bc.SetBool(c4d.XPPPCOLLISIONS_KILL,True)
    bc.SetBool(c4d.XPPPCOLLISIONS_CONNECT,True)
    bc.SetBool(c4d.XPPPCOLLISIONS_CONNECT_GROUP_ONLY,True)
    bc.SetInt32(c4d.XPPPCOLLISIONS_CONNECT_LIMIT,1)
    bc.SetFloat(c4d.XPPPCOLLISIONS_CONNECT_STIFFNESS,0.1)
    bc.SetFloat(c4d.XPPPCOLLISIONS_CONNECT_BREAK,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/oxpppcollisions.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oxpppcollisions);
    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(XPPPCOLLISIONS_SELF),GeData(true),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_ELASTICITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_ELASTICITY_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_FRICTION),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_FRICTION_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_SCATTER),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_SPAWN),GeData(true),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_SPAWNCOUNT),GeData(1),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_SPAWNONCEONLY),GeData(true),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_KILL),GeData(true),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_CONNECT),GeData(true),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_CONNECT_GROUP_ONLY),GeData(true),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_CONNECT_LIMIT),GeData(1),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_CONNECT_STIFFNESS),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPPPCOLLISIONS_CONNECT_BREAK),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XPPPCOLLISIONS_SELF,true);
    bc->SetFloat(XPPPCOLLISIONS_ELASTICITY,0.1);
    bc->SetFloat(XPPPCOLLISIONS_ELASTICITY_VAR,0.1);
    bc->SetFloat(XPPPCOLLISIONS_FRICTION,0.1);
    bc->SetFloat(XPPPCOLLISIONS_FRICTION_VAR,0.1);
    bc->SetFloat(XPPPCOLLISIONS_SCATTER,0.1);
    bc->SetBool(XPPPCOLLISIONS_SPAWN,true);
    bc->SetInt32(XPPPCOLLISIONS_SPAWNCOUNT,1);
    bc->SetBool(XPPPCOLLISIONS_SPAWNONCEONLY,true);
    bc->SetBool(XPPPCOLLISIONS_KILL,true);
    bc->SetBool(XPPPCOLLISIONS_CONNECT,true);
    bc->SetBool(XPPPCOLLISIONS_CONNECT_GROUP_ONLY,true);
    bc->SetInt32(XPPPCOLLISIONS_CONNECT_LIMIT,1);
    bc->SetFloat(XPPPCOLLISIONS_CONNECT_STIFFNESS,0.1);
    bc->SetFloat(XPPPCOLLISIONS_CONNECT_BREAK,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}