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 Omflock

Omflock

Attributes

  • ENGLISH NAME : X-ParticlesFlockingModifier
  • NAME : Omflock
  • INCLUDE : Obase
  • PATH : res/description/omflock.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OMFLOCK

Elements

ID UI Name Type Parameters Cycle
XMFL_FLOCK_ENABLED Enabled BOOL  
XMFL_FLOCK_MODE Mode LONG  
FLOCK_MODE_INDEP Independent
FLOCK_MODE_ACTION Action-Controlled
XMFL_FLOCK_GENERAL_STRENGTH ModifierStrength REAL
UNIT PERCENT
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_GENERAL_SPEEDLIMIT LimitSpeed BOOL  
XMFL_FLOCK_GENERAL_SPEEDMAX Max.Speed REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_RNDSEED RandomSeed LONG
MIN 0
MINSLIDER 0
MAXSLIDER 10000
CUSTOMGUI LONGSLIDER
XMFL_FLOCK_COHESION_STRENGTH CohesionStrength REAL
UNIT PERCENT
MIN 0.0
MAX 1000.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_SEPARATION_STRENGTH SeparationStrength REAL
UNIT PERCENT
MIN 0.0
MAX 1000.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_SEPARATION_DISTANCE SeparationDistance REAL
UNIT METER
MIN 0.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_MATCHVELOCITY_STRENGTH MatchVelocityStrength REAL
UNIT PERCENT
MIN 0.0
MAX 1000.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_CHAOS_STRENGTH ChaosStrength REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_CHAOS_SCALE Scale REAL
UNIT REAL
MIN 0.0
STEP 0.1
MINSLIDER 0.0
MAXSLIDER 50.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_CHAOS_FREQUENCY Frequency REAL
UNIT REAL
MIN 0.0
STEP 0.1
MINSLIDER 0.0
MAXSLIDER 50.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_SMOOTH_USE Use BOOL  
XMFL_FLOCK_SMOOTH_VALUE_X SmoothHeading REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
XMFL_FLOCK_SMOOTH_VALUE_Y SmoothPitch REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
XMFL_FLOCK_GEOMETRY_AVOID EnableAvoidance BOOL  
XMFL_FLOCK_GEOMETRY_DISTANCE DetectionDistance REAL
UNIT METER
MIN 0.001
MINSLIDER 0.001
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_GEOMETRY_SHELL ObjectShell REAL
UNIT REAL
STEP 0.1
MIN 1.0
MINSLIDER 1.0
MAXSLIDER 5.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_GEOMETRY_AVOID_AOT AvoidanceWeight REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMFL_FLOCK_GEOMETRY Objects IN_EXCLUDE NUM_FLAGS
XMFL_FLOCK_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.Omflock)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XMFL_FLOCK_ENABLED] = True
    obj[c4d.XMFL_FLOCK_MODE] = c4d.FLOCK_MODE_INDEP
    obj[c4d.XMFL_FLOCK_GENERAL_STRENGTH] = 0.1
    obj[c4d.XMFL_FLOCK_GENERAL_SPEEDLIMIT] = True
    obj[c4d.XMFL_FLOCK_GENERAL_SPEEDMAX] = 0.1
    obj[c4d.XMFL_FLOCK_RNDSEED] = 1
    obj[c4d.XMFL_FLOCK_COHESION_STRENGTH] = 0.1
    obj[c4d.XMFL_FLOCK_SEPARATION_STRENGTH] = 0.1
    obj[c4d.XMFL_FLOCK_SEPARATION_DISTANCE] = 0.1
    obj[c4d.XMFL_FLOCK_MATCHVELOCITY_STRENGTH] = 0.1
    obj[c4d.XMFL_FLOCK_CHAOS_STRENGTH] = 0.1
    obj[c4d.XMFL_FLOCK_CHAOS_SCALE] = 0.1
    obj[c4d.XMFL_FLOCK_CHAOS_FREQUENCY] = 0.1
    obj[c4d.XMFL_FLOCK_SMOOTH_USE] = True
    obj[c4d.XMFL_FLOCK_SMOOTH_VALUE_X] = 0.1
    obj[c4d.XMFL_FLOCK_SMOOTH_VALUE_Y] = 0.1
    obj[c4d.XMFL_FLOCK_GEOMETRY_AVOID] = True
    obj[c4d.XMFL_FLOCK_GEOMETRY_DISTANCE] = 0.1
    obj[c4d.XMFL_FLOCK_GEOMETRY_SHELL] = 0.1
    obj[c4d.XMFL_FLOCK_GEOMETRY_AVOID_AOT] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XMFL_FLOCK_ENABLED,True)
    bc.SetInt32(c4d.XMFL_FLOCK_MODE,c4d.FLOCK_MODE_INDEP)
    bc.SetFloat(c4d.XMFL_FLOCK_GENERAL_STRENGTH,0.1)
    bc.SetBool(c4d.XMFL_FLOCK_GENERAL_SPEEDLIMIT,True)
    bc.SetFloat(c4d.XMFL_FLOCK_GENERAL_SPEEDMAX,0.1)
    bc.SetInt32(c4d.XMFL_FLOCK_RNDSEED,1)
    bc.SetFloat(c4d.XMFL_FLOCK_COHESION_STRENGTH,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_SEPARATION_STRENGTH,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_SEPARATION_DISTANCE,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_MATCHVELOCITY_STRENGTH,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_CHAOS_STRENGTH,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_CHAOS_SCALE,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_CHAOS_FREQUENCY,0.1)
    bc.SetBool(c4d.XMFL_FLOCK_SMOOTH_USE,True)
    bc.SetFloat(c4d.XMFL_FLOCK_SMOOTH_VALUE_X,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_SMOOTH_VALUE_Y,0.1)
    bc.SetBool(c4d.XMFL_FLOCK_GEOMETRY_AVOID,True)
    bc.SetFloat(c4d.XMFL_FLOCK_GEOMETRY_DISTANCE,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_GEOMETRY_SHELL,0.1)
    bc.SetFloat(c4d.XMFL_FLOCK_GEOMETRY_AVOID_AOT,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/omflock.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omflock);
    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(XMFL_FLOCK_ENABLED),GeData(true),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_MODE),GeData(FLOCK_MODE_INDEP),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_GENERAL_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_GENERAL_SPEEDLIMIT),GeData(true),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_GENERAL_SPEEDMAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_RNDSEED),GeData(1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_COHESION_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_SEPARATION_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_SEPARATION_DISTANCE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_MATCHVELOCITY_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_CHAOS_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_CHAOS_SCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_CHAOS_FREQUENCY),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_SMOOTH_USE),GeData(true),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_SMOOTH_VALUE_X),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_SMOOTH_VALUE_Y),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_GEOMETRY_AVOID),GeData(true),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_GEOMETRY_DISTANCE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_GEOMETRY_SHELL),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFL_FLOCK_GEOMETRY_AVOID_AOT),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XMFL_FLOCK_ENABLED,true);
    bc->SetInt32(XMFL_FLOCK_MODE,FLOCK_MODE_INDEP);
    bc->SetFloat(XMFL_FLOCK_GENERAL_STRENGTH,0.1);
    bc->SetBool(XMFL_FLOCK_GENERAL_SPEEDLIMIT,true);
    bc->SetFloat(XMFL_FLOCK_GENERAL_SPEEDMAX,0.1);
    bc->SetInt32(XMFL_FLOCK_RNDSEED,1);
    bc->SetFloat(XMFL_FLOCK_COHESION_STRENGTH,0.1);
    bc->SetFloat(XMFL_FLOCK_SEPARATION_STRENGTH,0.1);
    bc->SetFloat(XMFL_FLOCK_SEPARATION_DISTANCE,0.1);
    bc->SetFloat(XMFL_FLOCK_MATCHVELOCITY_STRENGTH,0.1);
    bc->SetFloat(XMFL_FLOCK_CHAOS_STRENGTH,0.1);
    bc->SetFloat(XMFL_FLOCK_CHAOS_SCALE,0.1);
    bc->SetFloat(XMFL_FLOCK_CHAOS_FREQUENCY,0.1);
    bc->SetBool(XMFL_FLOCK_SMOOTH_USE,true);
    bc->SetFloat(XMFL_FLOCK_SMOOTH_VALUE_X,0.1);
    bc->SetFloat(XMFL_FLOCK_SMOOTH_VALUE_Y,0.1);
    bc->SetBool(XMFL_FLOCK_GEOMETRY_AVOID,true);
    bc->SetFloat(XMFL_FLOCK_GEOMETRY_DISTANCE,0.1);
    bc->SetFloat(XMFL_FLOCK_GEOMETRY_SHELL,0.1);
    bc->SetFloat(XMFL_FLOCK_GEOMETRY_AVOID_AOT,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}