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 Omturb

Omturb

Attributes

  • ENGLISH NAME : X-ParticlesTurbulenceModifier
  • NAME : Omturb
  • INCLUDE : Obase
  • PATH : res/description/omturb.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OMTURB

Elements

ID UI Name Type Parameters Cycle
XMTU_TURBULENCE_ENABLED Enabled BOOL  
XMTU_TURBULENCE_MODE Mode LONG  
TURB_MODE_INDEP Independent
TURB_MODE_ACTION Action-Controlled
XMTU_TURBULENCE_TYPE NoiseType LONG  
TURBMODE_TURB Turbulence
TURBMODE_WAVY WavyTurbulence
TURBMODE_CURL_NEW Curl
TURBMODE_STANDARD Standard
TURBMODE_FBM fBm
XMTU_TURBULENCE_X XAxis BOOL  
XMTU_TURBULENCE_Y YAxis BOOL  
XMTU_TURBULENCE_Z ZAxis BOOL  
XMTU_TURBULENCE_SCALE Scale REAL
UNIT PERCENT
MIN 0.0
MAX 10000.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_FREQUENCY Frequency REAL
MINSLIDER 0.0
STEP 0.01
MAXSLIDER 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_OCTAVES Octaves REAL
UNIT REAL
STEP 0.01
MIN 0.0
MAX 18.0
MINSLIDER 0.0
MAXSLIDER 18.0
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_STRENGTH Strength REAL
UNIT REAL
STEP 1.0
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_PERIODIC PeriodicVariation BOOL  
XMTU_TURBULENCE_REPEAT RepeatInterval LONG  
TURBREPEAT_1 2
TURBREPEAT_2 4
TURBREPEAT_3 8
TURBREPEAT_4 16
TURBREPEAT_5 32
TURBREPEAT_6 64
TURBREPEAT_7 128
TURBREPEAT_8 256
TURBREPEAT_9 512
TURBREPEAT_10 1024
XMTU_TURBULENCE_CURL_OFFSET Offset VECTOR  
XMTU_TURBULENCE_CURL_BLEND Blend REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_CURL_ADD Add REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_CURL_SOURCE_DIST SourcesDistance REAL
UNIT METER
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_CURL_SOURCES Sources IN_EXCLUDE
NUM_FLAGS 2
INIT_STATE 3
SEND_SELCHNGMSG 1
IMAGE_01_ON 1009316
IMAGE_01_OFF 1009320
IMAGE_02_ON 300000231
IMAGE_02_OFF 300000230
XMTU_TURBULENCE_CURL_BOUNDARY_DIST BoundariesDistance REAL
UNIT METER
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_CURL_BOUNDARY_DRAG Drag REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
XMTU_TURBULENCE_CURL_OBJECTS Boundaries IN_EXCLUDE
NUM_FLAGS 2
INIT_STATE 3
SEND_SELCHNGMSG 1
IMAGE_01_ON 1009316
IMAGE_01_OFF 1009320
IMAGE_02_ON 300000231
IMAGE_02_OFF 300000230
XMTU_TURBULENCE_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.Omturb)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XMTU_TURBULENCE_ENABLED] = True
    obj[c4d.XMTU_TURBULENCE_MODE] = c4d.TURB_MODE_INDEP
    obj[c4d.XMTU_TURBULENCE_TYPE] = c4d.TURBMODE_TURB
    obj[c4d.XMTU_TURBULENCE_X] = True
    obj[c4d.XMTU_TURBULENCE_Y] = True
    obj[c4d.XMTU_TURBULENCE_Z] = True
    obj[c4d.XMTU_TURBULENCE_SCALE] = 0.1
    obj[c4d.XMTU_TURBULENCE_FREQUENCY] = 0.1
    obj[c4d.XMTU_TURBULENCE_OCTAVES] = 0.1
    obj[c4d.XMTU_TURBULENCE_STRENGTH] = 0.1
    obj[c4d.XMTU_TURBULENCE_PERIODIC] = True
    obj[c4d.XMTU_TURBULENCE_REPEAT] = c4d.TURBREPEAT_1
    obj[c4d.XMTU_TURBULENCE_CURL_OFFSET] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XMTU_TURBULENCE_CURL_BLEND] = 0.1
    obj[c4d.XMTU_TURBULENCE_CURL_ADD] = 0.1
    obj[c4d.XMTU_TURBULENCE_CURL_SOURCE_DIST] = 0.1
    obj[c4d.XMTU_TURBULENCE_CURL_BOUNDARY_DIST] = 0.1
    obj[c4d.XMTU_TURBULENCE_CURL_BOUNDARY_DRAG] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XMTU_TURBULENCE_ENABLED,True)
    bc.SetInt32(c4d.XMTU_TURBULENCE_MODE,c4d.TURB_MODE_INDEP)
    bc.SetInt32(c4d.XMTU_TURBULENCE_TYPE,c4d.TURBMODE_TURB)
    bc.SetBool(c4d.XMTU_TURBULENCE_X,True)
    bc.SetBool(c4d.XMTU_TURBULENCE_Y,True)
    bc.SetBool(c4d.XMTU_TURBULENCE_Z,True)
    bc.SetFloat(c4d.XMTU_TURBULENCE_SCALE,0.1)
    bc.SetFloat(c4d.XMTU_TURBULENCE_FREQUENCY,0.1)
    bc.SetFloat(c4d.XMTU_TURBULENCE_OCTAVES,0.1)
    bc.SetFloat(c4d.XMTU_TURBULENCE_STRENGTH,0.1)
    bc.SetBool(c4d.XMTU_TURBULENCE_PERIODIC,True)
    bc.SetInt32(c4d.XMTU_TURBULENCE_REPEAT,c4d.TURBREPEAT_1)
    bc.SetVector(c4d.XMTU_TURBULENCE_CURL_OFFSET, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.XMTU_TURBULENCE_CURL_BLEND,0.1)
    bc.SetFloat(c4d.XMTU_TURBULENCE_CURL_ADD,0.1)
    bc.SetFloat(c4d.XMTU_TURBULENCE_CURL_SOURCE_DIST,0.1)
    bc.SetFloat(c4d.XMTU_TURBULENCE_CURL_BOUNDARY_DIST,0.1)
    bc.SetFloat(c4d.XMTU_TURBULENCE_CURL_BOUNDARY_DRAG,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/omturb.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omturb);
    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(XMTU_TURBULENCE_ENABLED),GeData(true),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_MODE),GeData(TURB_MODE_INDEP),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_TYPE),GeData(TURBMODE_TURB),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_X),GeData(true),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_Y),GeData(true),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_Z),GeData(true),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_SCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_FREQUENCY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_OCTAVES),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_PERIODIC),GeData(true),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_REPEAT),GeData(TURBREPEAT_1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_CURL_OFFSET),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_CURL_BLEND),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_CURL_ADD),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_CURL_SOURCE_DIST),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_CURL_BOUNDARY_DIST),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMTU_TURBULENCE_CURL_BOUNDARY_DRAG),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XMTU_TURBULENCE_ENABLED,true);
    bc->SetInt32(XMTU_TURBULENCE_MODE,TURB_MODE_INDEP);
    bc->SetInt32(XMTU_TURBULENCE_TYPE,TURBMODE_TURB);
    bc->SetBool(XMTU_TURBULENCE_X,true);
    bc->SetBool(XMTU_TURBULENCE_Y,true);
    bc->SetBool(XMTU_TURBULENCE_Z,true);
    bc->SetFloat(XMTU_TURBULENCE_SCALE,0.1);
    bc->SetFloat(XMTU_TURBULENCE_FREQUENCY,0.1);
    bc->SetFloat(XMTU_TURBULENCE_OCTAVES,0.1);
    bc->SetFloat(XMTU_TURBULENCE_STRENGTH,0.1);
    bc->SetBool(XMTU_TURBULENCE_PERIODIC,true);
    bc->SetInt32(XMTU_TURBULENCE_REPEAT,TURBREPEAT_1);
    bc->SetVector(XMTU_TURBULENCE_CURL_OFFSET, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(XMTU_TURBULENCE_CURL_BLEND,0.1);
    bc->SetFloat(XMTU_TURBULENCE_CURL_ADD,0.1);
    bc->SetFloat(XMTU_TURBULENCE_CURL_SOURCE_DIST,0.1);
    bc->SetFloat(XMTU_TURBULENCE_CURL_BOUNDARY_DIST,0.1);
    bc->SetFloat(XMTU_TURBULENCE_CURL_BOUNDARY_DRAG,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}