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 Oxpsph

Oxpsph

Attributes

  • ENGLISH NAME : X-ParticlesSPHFluids
  • NAME : Oxpsph
  • INCLUDE : Obase
  • PATH : res/description/oxpsph.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OXPSPH

Elements

ID UI Name Type Parameters Cycle
XPSPH_COLLIDERS ColliderReactions BOOL  
XPSPH_DENSITY_TYPE Density LONG SCALE_H
XPSPH_DENSITY_TYPE_CUSTOM Custom
XPSPH_DENSITY_TYPE_PARTICLE FromParticle
XPSPH_DENSITY Density REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_VISCOSITY Viscosity REAL
UNIT PERCENT
MIN 0.0
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_VORTICITY Vorticity REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_TENSION Tension REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_REPULSION Repulsion REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_RADIUS SmoothRadius REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_STIFFNESS Stiffness REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DAMPING Damping REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_SCALE Scale REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_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
XPSPH_DIFFUSE DiffuseParticles BOOL  
XPSPH_SPAWN Spawn LINK  
XPSPH_DIFFUSE_CREST_RATE CrestRate REAL MIN
XPSPH_DIFFUSE_AIR_RATE AirRate REAL MIN
XPSPH_DIFFUSE_AFTERAGE AfterAge BASETIME  
XPSPH_DIFFUSE_LIFE Life BASETIME  
XPSPH_DIFFUSE_KE_MIN MinSpeed REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_KE_MAX MaxSpeed REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_WC_MIN MinCrest REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_WC_MAX MaxCrest REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_TA_MIN MinImpact REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_TA_MAX MaxImpact REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_BUOYANCY Buoyancy REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_DRAG Drag REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_GRAVITY Gravity LINK  
XPSPH_DIFFUSE_SPRAY Spray REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_ROT Rotation REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_FOAM_DENSITY FoamDensity REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H
XPSPH_DIFFUSE_SPRAY_DENSITY SprayDensity REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
SCALE_H

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.Oxpsph)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XPSPH_COLLIDERS] = True
    obj[c4d.XPSPH_DENSITY_TYPE] = c4d.XPSPH_DENSITY_TYPE_CUSTOM
    obj[c4d.XPSPH_DENSITY] = 0.1
    obj[c4d.XPSPH_VISCOSITY] = 0.1
    obj[c4d.XPSPH_VORTICITY] = 0.1
    obj[c4d.XPSPH_TENSION] = 0.1
    obj[c4d.XPSPH_REPULSION] = 0.1
    obj[c4d.XPSPH_RADIUS] = 0.1
    obj[c4d.XPSPH_STIFFNESS] = 0.1
    obj[c4d.XPSPH_DAMPING] = 0.1
    obj[c4d.XPSPH_SCALE] = 0.1
    obj[c4d.XPSPH_DIFFUSE] = True
    obj[c4d.XPSPH_DIFFUSE_CREST_RATE] = 0.1
    obj[c4d.XPSPH_DIFFUSE_AIR_RATE] = 0.1
    obj[c4d.XPSPH_DIFFUSE_KE_MIN] = 0.1
    obj[c4d.XPSPH_DIFFUSE_KE_MAX] = 0.1
    obj[c4d.XPSPH_DIFFUSE_WC_MIN] = 0.1
    obj[c4d.XPSPH_DIFFUSE_WC_MAX] = 0.1
    obj[c4d.XPSPH_DIFFUSE_TA_MIN] = 0.1
    obj[c4d.XPSPH_DIFFUSE_TA_MAX] = 0.1
    obj[c4d.XPSPH_DIFFUSE_BUOYANCY] = 0.1
    obj[c4d.XPSPH_DIFFUSE_DRAG] = 0.1
    obj[c4d.XPSPH_DIFFUSE_SPRAY] = 0.1
    obj[c4d.XPSPH_DIFFUSE_ROT] = 0.1
    obj[c4d.XPSPH_DIFFUSE_FOAM_DENSITY] = 0.1
    obj[c4d.XPSPH_DIFFUSE_SPRAY_DENSITY] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XPSPH_COLLIDERS,True)
    bc.SetInt32(c4d.XPSPH_DENSITY_TYPE,c4d.XPSPH_DENSITY_TYPE_CUSTOM)
    bc.SetFloat(c4d.XPSPH_DENSITY,0.1)
    bc.SetFloat(c4d.XPSPH_VISCOSITY,0.1)
    bc.SetFloat(c4d.XPSPH_VORTICITY,0.1)
    bc.SetFloat(c4d.XPSPH_TENSION,0.1)
    bc.SetFloat(c4d.XPSPH_REPULSION,0.1)
    bc.SetFloat(c4d.XPSPH_RADIUS,0.1)
    bc.SetFloat(c4d.XPSPH_STIFFNESS,0.1)
    bc.SetFloat(c4d.XPSPH_DAMPING,0.1)
    bc.SetFloat(c4d.XPSPH_SCALE,0.1)
    bc.SetBool(c4d.XPSPH_DIFFUSE,True)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_CREST_RATE,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_AIR_RATE,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_KE_MIN,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_KE_MAX,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_WC_MIN,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_WC_MAX,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_TA_MIN,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_TA_MAX,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_BUOYANCY,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_DRAG,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_SPRAY,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_ROT,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_FOAM_DENSITY,0.1)
    bc.SetFloat(c4d.XPSPH_DIFFUSE_SPRAY_DENSITY,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/oxpsph.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oxpsph);
    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(XPSPH_COLLIDERS),GeData(true),flags);
    pObject->SetParameter(DescID(XPSPH_DENSITY_TYPE),GeData(XPSPH_DENSITY_TYPE_CUSTOM),flags);
    pObject->SetParameter(DescID(XPSPH_DENSITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_VISCOSITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_VORTICITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_TENSION),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_REPULSION),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_RADIUS),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_STIFFNESS),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DAMPING),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_SCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE),GeData(true),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_CREST_RATE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_AIR_RATE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_KE_MIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_KE_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_WC_MIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_WC_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_TA_MIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_TA_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_BUOYANCY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_DRAG),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_SPRAY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_ROT),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_FOAM_DENSITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XPSPH_DIFFUSE_SPRAY_DENSITY),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XPSPH_COLLIDERS,true);
    bc->SetInt32(XPSPH_DENSITY_TYPE,XPSPH_DENSITY_TYPE_CUSTOM);
    bc->SetFloat(XPSPH_DENSITY,0.1);
    bc->SetFloat(XPSPH_VISCOSITY,0.1);
    bc->SetFloat(XPSPH_VORTICITY,0.1);
    bc->SetFloat(XPSPH_TENSION,0.1);
    bc->SetFloat(XPSPH_REPULSION,0.1);
    bc->SetFloat(XPSPH_RADIUS,0.1);
    bc->SetFloat(XPSPH_STIFFNESS,0.1);
    bc->SetFloat(XPSPH_DAMPING,0.1);
    bc->SetFloat(XPSPH_SCALE,0.1);
    bc->SetBool(XPSPH_DIFFUSE,true);
    bc->SetFloat(XPSPH_DIFFUSE_CREST_RATE,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_AIR_RATE,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_KE_MIN,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_KE_MAX,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_WC_MIN,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_WC_MAX,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_TA_MIN,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_TA_MAX,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_BUOYANCY,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_DRAG,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_SPRAY,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_ROT,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_FOAM_DENSITY,0.1);
    bc->SetFloat(XPSPH_DIFFUSE_SPRAY_DENSITY,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}