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 Omphysical

Omphysical

Attributes

  • ENGLISH NAME : X-ParticlesPhysicalModifier
  • NAME : Omphysical
  • INCLUDE : Obase
  • PATH : res/description/omphysical.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OMPHYSICAL

Elements

ID UI Name Type Parameters Cycle
XMPH_PHYSICAL_ENABLED Enabled BOOL  
XMPH_PHYSICAL_MODE Mode LONG  
PHYSICAL_MODE_INDEP Independent
PHYSICAL_MODE_ACTION Action-Controlled
XMPH_PHYSICAL_TIME ChangeEvery BASETIME  
XMPH_PHYSICAL_CHANGE_TEMP ChangeTemperature BOOL  
XMPH_PHYSICAL_TEMP_MODE Mode LONG  
PHYS_TEMP_MODE_RATE ChangeOverTime
PHYS_TEMP_MODE_SET SetValue
XMPH_PHYSICAL_DELTA_TEMP RateofTemp.Change REAL
MINSLIDER -500.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_DELTA_TEMP_VAR Variation REAL
MINSLIDER -100.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_TEMP_MAX Max.Temp. REAL
MINSLIDER -5000.0
MAXSLIDER 5000.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_TEMP_MIN Min.Temp. REAL
MINSLIDER -5000.0
MAXSLIDER 5000.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_TEMP_VALUE Temp.Value REAL
MINSLIDER -500.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_CHANGE_DENSITY ChangeSmoke BOOL  
XMPH_PHYSICAL_DENSITY_MODE Mode LONG  
PHYS_DENSITY_MODE_RATE ChangeOverTime
PHYS_DENSITY_MODE_SET SetValue
XMPH_PHYSICAL_DELTA_DENSITY RateofSmokeChange REAL
MINSLIDER -100.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_DELTA_DENSITY_VAR Variation REAL
MINSLIDER -100.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_DENSITY_MAX Max.Smoke REAL
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_DENSITY_MIN Min.Smoke REAL
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_DENSITY_VALUE SmokeValue REAL
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_CHANGE_FUEL ChangeFuel BOOL  
XMPH_PHYSICAL_FUEL_MODE Mode LONG  
PHYS_FUEL_MODE_RATE ChangeOverTime
PHYS_FUEL_MODE_SET SetValue
XMPH_PHYSICAL_DELTA_FUEL RateofFuelChange REAL
MINSLIDER -100.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_DELTA_FUEL_VAR Variation REAL
MINSLIDER -100.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_FUEL_MAX Max.Fuel REAL
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_FUEL_MIN Min.Fuel REAL
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_FUEL_VALUE FuelValue REAL
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_CHANGE_BURN ChangeFire BOOL  
XMPH_PHYSICAL_BURN_MODE Mode LONG  
PHYS_BURN_MODE_RATE ChangeOverTime
PHYS_BURN_MODE_SET SetValue
XMPH_PHYSICAL_DELTA_BURN RateofFireChange REAL
MINSLIDER -100.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_DELTA_BURN_VAR Variation REAL
MINSLIDER -100.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_BURN_MAX Max.Fire REAL
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_BURN_MIN Min.Fire REAL
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_BURN_VALUE FireValue REAL
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMPH_PHYSICAL_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.Omphysical)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XMPH_PHYSICAL_ENABLED] = True
    obj[c4d.XMPH_PHYSICAL_MODE] = c4d.PHYSICAL_MODE_INDEP
    obj[c4d.XMPH_PHYSICAL_CHANGE_TEMP] = True
    obj[c4d.XMPH_PHYSICAL_TEMP_MODE] = c4d.PHYS_TEMP_MODE_RATE
    obj[c4d.XMPH_PHYSICAL_DELTA_TEMP] = 0.1
    obj[c4d.XMPH_PHYSICAL_DELTA_TEMP_VAR] = 0.1
    obj[c4d.XMPH_PHYSICAL_TEMP_MAX] = 0.1
    obj[c4d.XMPH_PHYSICAL_TEMP_MIN] = 0.1
    obj[c4d.XMPH_PHYSICAL_TEMP_VALUE] = 0.1
    obj[c4d.XMPH_PHYSICAL_CHANGE_DENSITY] = True
    obj[c4d.XMPH_PHYSICAL_DENSITY_MODE] = c4d.PHYS_DENSITY_MODE_RATE
    obj[c4d.XMPH_PHYSICAL_DELTA_DENSITY] = 0.1
    obj[c4d.XMPH_PHYSICAL_DELTA_DENSITY_VAR] = 0.1
    obj[c4d.XMPH_PHYSICAL_DENSITY_MAX] = 0.1
    obj[c4d.XMPH_PHYSICAL_DENSITY_MIN] = 0.1
    obj[c4d.XMPH_PHYSICAL_DENSITY_VALUE] = 0.1
    obj[c4d.XMPH_PHYSICAL_CHANGE_FUEL] = True
    obj[c4d.XMPH_PHYSICAL_FUEL_MODE] = c4d.PHYS_FUEL_MODE_RATE
    obj[c4d.XMPH_PHYSICAL_DELTA_FUEL] = 0.1
    obj[c4d.XMPH_PHYSICAL_DELTA_FUEL_VAR] = 0.1
    obj[c4d.XMPH_PHYSICAL_FUEL_MAX] = 0.1
    obj[c4d.XMPH_PHYSICAL_FUEL_MIN] = 0.1
    obj[c4d.XMPH_PHYSICAL_FUEL_VALUE] = 0.1
    obj[c4d.XMPH_PHYSICAL_CHANGE_BURN] = True
    obj[c4d.XMPH_PHYSICAL_BURN_MODE] = c4d.PHYS_BURN_MODE_RATE
    obj[c4d.XMPH_PHYSICAL_DELTA_BURN] = 0.1
    obj[c4d.XMPH_PHYSICAL_DELTA_BURN_VAR] = 0.1
    obj[c4d.XMPH_PHYSICAL_BURN_MAX] = 0.1
    obj[c4d.XMPH_PHYSICAL_BURN_MIN] = 0.1
    obj[c4d.XMPH_PHYSICAL_BURN_VALUE] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XMPH_PHYSICAL_ENABLED,True)
    bc.SetInt32(c4d.XMPH_PHYSICAL_MODE,c4d.PHYSICAL_MODE_INDEP)
    bc.SetBool(c4d.XMPH_PHYSICAL_CHANGE_TEMP,True)
    bc.SetInt32(c4d.XMPH_PHYSICAL_TEMP_MODE,c4d.PHYS_TEMP_MODE_RATE)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DELTA_TEMP,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DELTA_TEMP_VAR,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_TEMP_MAX,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_TEMP_MIN,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_TEMP_VALUE,0.1)
    bc.SetBool(c4d.XMPH_PHYSICAL_CHANGE_DENSITY,True)
    bc.SetInt32(c4d.XMPH_PHYSICAL_DENSITY_MODE,c4d.PHYS_DENSITY_MODE_RATE)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DELTA_DENSITY,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DELTA_DENSITY_VAR,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DENSITY_MAX,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DENSITY_MIN,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DENSITY_VALUE,0.1)
    bc.SetBool(c4d.XMPH_PHYSICAL_CHANGE_FUEL,True)
    bc.SetInt32(c4d.XMPH_PHYSICAL_FUEL_MODE,c4d.PHYS_FUEL_MODE_RATE)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DELTA_FUEL,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DELTA_FUEL_VAR,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_FUEL_MAX,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_FUEL_MIN,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_FUEL_VALUE,0.1)
    bc.SetBool(c4d.XMPH_PHYSICAL_CHANGE_BURN,True)
    bc.SetInt32(c4d.XMPH_PHYSICAL_BURN_MODE,c4d.PHYS_BURN_MODE_RATE)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DELTA_BURN,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_DELTA_BURN_VAR,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_BURN_MAX,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_BURN_MIN,0.1)
    bc.SetFloat(c4d.XMPH_PHYSICAL_BURN_VALUE,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/omphysical.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omphysical);
    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(XMPH_PHYSICAL_ENABLED),GeData(true),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_MODE),GeData(PHYSICAL_MODE_INDEP),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_CHANGE_TEMP),GeData(true),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_TEMP_MODE),GeData(PHYS_TEMP_MODE_RATE),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DELTA_TEMP),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DELTA_TEMP_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_TEMP_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_TEMP_MIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_TEMP_VALUE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_CHANGE_DENSITY),GeData(true),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DENSITY_MODE),GeData(PHYS_DENSITY_MODE_RATE),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DELTA_DENSITY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DELTA_DENSITY_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DENSITY_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DENSITY_MIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DENSITY_VALUE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_CHANGE_FUEL),GeData(true),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_FUEL_MODE),GeData(PHYS_FUEL_MODE_RATE),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DELTA_FUEL),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DELTA_FUEL_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_FUEL_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_FUEL_MIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_FUEL_VALUE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_CHANGE_BURN),GeData(true),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_BURN_MODE),GeData(PHYS_BURN_MODE_RATE),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DELTA_BURN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_DELTA_BURN_VAR),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_BURN_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_BURN_MIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMPH_PHYSICAL_BURN_VALUE),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XMPH_PHYSICAL_ENABLED,true);
    bc->SetInt32(XMPH_PHYSICAL_MODE,PHYSICAL_MODE_INDEP);
    bc->SetBool(XMPH_PHYSICAL_CHANGE_TEMP,true);
    bc->SetInt32(XMPH_PHYSICAL_TEMP_MODE,PHYS_TEMP_MODE_RATE);
    bc->SetFloat(XMPH_PHYSICAL_DELTA_TEMP,0.1);
    bc->SetFloat(XMPH_PHYSICAL_DELTA_TEMP_VAR,0.1);
    bc->SetFloat(XMPH_PHYSICAL_TEMP_MAX,0.1);
    bc->SetFloat(XMPH_PHYSICAL_TEMP_MIN,0.1);
    bc->SetFloat(XMPH_PHYSICAL_TEMP_VALUE,0.1);
    bc->SetBool(XMPH_PHYSICAL_CHANGE_DENSITY,true);
    bc->SetInt32(XMPH_PHYSICAL_DENSITY_MODE,PHYS_DENSITY_MODE_RATE);
    bc->SetFloat(XMPH_PHYSICAL_DELTA_DENSITY,0.1);
    bc->SetFloat(XMPH_PHYSICAL_DELTA_DENSITY_VAR,0.1);
    bc->SetFloat(XMPH_PHYSICAL_DENSITY_MAX,0.1);
    bc->SetFloat(XMPH_PHYSICAL_DENSITY_MIN,0.1);
    bc->SetFloat(XMPH_PHYSICAL_DENSITY_VALUE,0.1);
    bc->SetBool(XMPH_PHYSICAL_CHANGE_FUEL,true);
    bc->SetInt32(XMPH_PHYSICAL_FUEL_MODE,PHYS_FUEL_MODE_RATE);
    bc->SetFloat(XMPH_PHYSICAL_DELTA_FUEL,0.1);
    bc->SetFloat(XMPH_PHYSICAL_DELTA_FUEL_VAR,0.1);
    bc->SetFloat(XMPH_PHYSICAL_FUEL_MAX,0.1);
    bc->SetFloat(XMPH_PHYSICAL_FUEL_MIN,0.1);
    bc->SetFloat(XMPH_PHYSICAL_FUEL_VALUE,0.1);
    bc->SetBool(XMPH_PHYSICAL_CHANGE_BURN,true);
    bc->SetInt32(XMPH_PHYSICAL_BURN_MODE,PHYS_BURN_MODE_RATE);
    bc->SetFloat(XMPH_PHYSICAL_DELTA_BURN,0.1);
    bc->SetFloat(XMPH_PHYSICAL_DELTA_BURN_VAR,0.1);
    bc->SetFloat(XMPH_PHYSICAL_BURN_MAX,0.1);
    bc->SetFloat(XMPH_PHYSICAL_BURN_MIN,0.1);
    bc->SetFloat(XMPH_PHYSICAL_BURN_VALUE,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}