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 Ombranch

Ombranch

Attributes

  • ENGLISH NAME : X-ParticlesBranchingModifier
  • NAME : Ombranch
  • INCLUDE : Obase
  • PATH : res/description/ombranch.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OMBRANCH

Elements

ID UI Name Type Parameters Cycle
XBRANCH_ENABLED Enabled BOOL  
XBRANCH_MODE Mode LONG  
BRANCH_MODE_INDEP Independent
BRANCH_MODE_ACTION Action-Controlled
XBRANCH_ACTIONONLY ActionOnly BOOL  
XBRANCH_STEM_LENGTH_MODE LengthMethod LONG SCALE_H
STEM_LENGTH_MODE_FRAMES Time
STEM_LENGTH_MODE_ACTUAL DistanceUnits
XBRANCH_STEM_MAXLENGTH_MAX Max.Time BASETIME SCALE_H
XBRANCH_STEM_MAXLENGTH_MIN Min.Time BASETIME SCALE_H
XBRANCH_STEM_MAXLENGTH_MAX_ACTUAL Max.Distance REAL
SCALE_H
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XBRANCH_STEM_MAXLENGTH_MIN_ACTUAL Min.Distance REAL
SCALE_H
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XBRANCH_STEM_BENDMODE BendingMode LONG SCALE_H
STEM_BENDMODE_NATURAL Natural
STEM_BENDMODE_ZIGZAG Zigzag
XBRANCH_STEM_DEV_COUNTER BendIn BASETIME SCALE_H
XBRANCH_STEM_DEV_COUNTER_VAR Variation BASETIME SCALE_H
XBRANCH_STEM_BENDVECMAX Max.BendDeviation REAL
SCALE_H
UNIT DEGREE
MIN 0.0
MAX 90.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 90.0
CUSTOMGUI REALSLIDER
XBRANCH_STEM_BENDVECMIN Min.BendDeviation REAL
SCALE_H
UNIT DEGREE
MIN 0.0
MAX 90.0
STEP 1.0
MINSLIDER 0.0
MAXSLIDER 90.0
CUSTOMGUI REALSLIDER
XBRANCH_BUTTON_ADD AddBranchObject BUTTON  
XBRANCH_STEM_DOBRANCH EnableBranching BOOL  
XBRANCH_STEM_BRANCH_COUNTER BranchIn BASETIME  
XBRANCH_STEM_BRANCH_COUNTER_VAR Variation BASETIME  
XBRANCH_STEM_FROMBASE BranchfromBase BOOL  
XBRANCH_STEM_FROMTIP BranchfromTip BOOL  
XBRANCH_STEM_NUMBRANCHES NumberofBranches LONG
MIN 0
MINSLIDER 0
MAXSLIDER 100
CUSTOMGUI LONGSLIDER
XBRANCH_STEM_MAXBRANCHES Max.Branches LONG
MIN 0
MINSLIDER 0
MAXSLIDER 1000
CUSTOMGUI LONGSLIDER
XBRANCH_BRANCH_DEVIATION_MAX Max.BranchDeviation REAL
SCALE_H
UNIT DEGREE
MIN 0.0
MAX 90.0
MINSLIDER 0.0
MAXSLIDER 90.0
CUSTOMGUI REALSLIDER
XBRANCH_BRANCH_DEVIATION_MIN Min.BranchDeviation REAL
SCALE_H
UNIT DEGREE
MIN 0.0
MAX 90.0
MINSLIDER 0.0
MAXSLIDER 90.0
CUSTOMGUI REALSLIDER
XBRANCH_BRANCH_SPEEDMODE BranchSpeedMode LONG  
BRANCH_SPEEDMODE_ABS UseEmitterSpeed
BRANCH_SPEEDMODE_INHERIT SourceParticleSpeed
BRANCH_SPEEDMODE_SET SetSpeed
XBRANCH_BRANCH_SPEED BranchSpeed REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XBRANCH_BRANCH_DISTRIB Distribution SPLINE
Y_MIN 0.0
Y_MAX 1.0
X_MIN 0.0
X_MAX 1.0
X_STEPS 0.01
Y_STEPS 0.01
XBRANCH_BRANCH_SCALE BranchLength SPLINE
Y_MIN 0.0
Y_MAX 1.0
X_MIN 0.0
X_MAX 1.0
X_STEPS 0.01
Y_STEPS 0.01
XBRANCH_BRANCH_TWIST_TYPE RotationMode LONG  
TWIST_TYPE_RANDOM Random
TWIST_TYPE_SPLINE UseSpline
TWIST_TYPE_RANSPLINE RandomThenSpline
TWIST_TYPE_SET SetAngle
TWIST_TYPE_SETSPLINE SetAngleThenSpline
XBRANCH_BRANCH_TWIST_ANGLE Angle REAL
UNIT DEGREE
MIN 0.0
MAX 360.0
MINSLIDER 0.0
MAXSLIDER 360.0
CUSTOMGUI REALSLIDER
XBRANCH_BRANCH_TWIST_SPLINE Rotation SPLINE
Y_MIN 0
Y_MAX 360
X_MIN 0
X_MAX 1
X_STEPS 0.01
Y_STEPS 1
XBRANCH_STEM_SPAWN EnableSpawning BOOL  
XBRANCH_SPAWN_EMITTER SpawningEmitter LINK  
XBRANCH_SPAWN_DIR Direction LONG  
BSPAWN_DIR_RANDOM Random
BSPAWN_DIR_PARTICLE SourceParticle
XBRANCH_SPAWN_SPEED SpawnedParticleSpeed LONG  
BSPAWN_SPEED_ABS Absolute
BSPAWN_SPEED_REL Relative
XBRANCH_SPAWN_NUMBER NumbertoSpawn LONG
MIN 0
STEP 1
MINSLIDER 0
MAXSLIDER 1000
CUSTOMGUI LONGSLIDER
XBRANCH_SPAWN_INTERVAL SpawnInterval BASETIME  
XBRANCH_SPAWN_OFFSET UseRandomOffset BOOL  
XBRANCH_SPAWN_SETGROUPNUM Group LINK  
XBRANCH_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.Ombranch)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XBRANCH_ENABLED] = True
    obj[c4d.XBRANCH_MODE] = c4d.BRANCH_MODE_INDEP
    obj[c4d.XBRANCH_ACTIONONLY] = True
    obj[c4d.XBRANCH_STEM_LENGTH_MODE] = c4d.STEM_LENGTH_MODE_FRAMES
    obj[c4d.XBRANCH_STEM_MAXLENGTH_MAX_ACTUAL] = 0.1
    obj[c4d.XBRANCH_STEM_MAXLENGTH_MIN_ACTUAL] = 0.1
    obj[c4d.XBRANCH_STEM_BENDMODE] = c4d.STEM_BENDMODE_NATURAL
    obj[c4d.XBRANCH_STEM_BENDVECMAX] = 0.1
    obj[c4d.XBRANCH_STEM_BENDVECMIN] = 0.1
    obj[c4d.XBRANCH_STEM_DOBRANCH] = True
    obj[c4d.XBRANCH_STEM_FROMBASE] = True
    obj[c4d.XBRANCH_STEM_FROMTIP] = True
    obj[c4d.XBRANCH_STEM_NUMBRANCHES] = 1
    obj[c4d.XBRANCH_STEM_MAXBRANCHES] = 1
    obj[c4d.XBRANCH_BRANCH_DEVIATION_MAX] = 0.1
    obj[c4d.XBRANCH_BRANCH_DEVIATION_MIN] = 0.1
    obj[c4d.XBRANCH_BRANCH_SPEEDMODE] = c4d.BRANCH_SPEEDMODE_ABS
    obj[c4d.XBRANCH_BRANCH_SPEED] = 0.1
    obj[c4d.XBRANCH_BRANCH_TWIST_TYPE] = c4d.TWIST_TYPE_RANDOM
    obj[c4d.XBRANCH_BRANCH_TWIST_ANGLE] = 0.1
    obj[c4d.XBRANCH_STEM_SPAWN] = True
    obj[c4d.XBRANCH_SPAWN_DIR] = c4d.BSPAWN_DIR_RANDOM
    obj[c4d.XBRANCH_SPAWN_SPEED] = c4d.BSPAWN_SPEED_ABS
    obj[c4d.XBRANCH_SPAWN_NUMBER] = 1
    obj[c4d.XBRANCH_SPAWN_OFFSET] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XBRANCH_ENABLED,True)
    bc.SetInt32(c4d.XBRANCH_MODE,c4d.BRANCH_MODE_INDEP)
    bc.SetBool(c4d.XBRANCH_ACTIONONLY,True)
    bc.SetInt32(c4d.XBRANCH_STEM_LENGTH_MODE,c4d.STEM_LENGTH_MODE_FRAMES)
    bc.SetFloat(c4d.XBRANCH_STEM_MAXLENGTH_MAX_ACTUAL,0.1)
    bc.SetFloat(c4d.XBRANCH_STEM_MAXLENGTH_MIN_ACTUAL,0.1)
    bc.SetInt32(c4d.XBRANCH_STEM_BENDMODE,c4d.STEM_BENDMODE_NATURAL)
    bc.SetFloat(c4d.XBRANCH_STEM_BENDVECMAX,0.1)
    bc.SetFloat(c4d.XBRANCH_STEM_BENDVECMIN,0.1)
    bc.SetBool(c4d.XBRANCH_STEM_DOBRANCH,True)
    bc.SetBool(c4d.XBRANCH_STEM_FROMBASE,True)
    bc.SetBool(c4d.XBRANCH_STEM_FROMTIP,True)
    bc.SetInt32(c4d.XBRANCH_STEM_NUMBRANCHES,1)
    bc.SetInt32(c4d.XBRANCH_STEM_MAXBRANCHES,1)
    bc.SetFloat(c4d.XBRANCH_BRANCH_DEVIATION_MAX,0.1)
    bc.SetFloat(c4d.XBRANCH_BRANCH_DEVIATION_MIN,0.1)
    bc.SetInt32(c4d.XBRANCH_BRANCH_SPEEDMODE,c4d.BRANCH_SPEEDMODE_ABS)
    bc.SetFloat(c4d.XBRANCH_BRANCH_SPEED,0.1)
    bc.SetInt32(c4d.XBRANCH_BRANCH_TWIST_TYPE,c4d.TWIST_TYPE_RANDOM)
    bc.SetFloat(c4d.XBRANCH_BRANCH_TWIST_ANGLE,0.1)
    bc.SetBool(c4d.XBRANCH_STEM_SPAWN,True)
    bc.SetInt32(c4d.XBRANCH_SPAWN_DIR,c4d.BSPAWN_DIR_RANDOM)
    bc.SetInt32(c4d.XBRANCH_SPAWN_SPEED,c4d.BSPAWN_SPEED_ABS)
    bc.SetInt32(c4d.XBRANCH_SPAWN_NUMBER,1)
    bc.SetBool(c4d.XBRANCH_SPAWN_OFFSET,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/ombranch.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Ombranch);
    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(XBRANCH_ENABLED),GeData(true),flags);
    pObject->SetParameter(DescID(XBRANCH_MODE),GeData(BRANCH_MODE_INDEP),flags);
    pObject->SetParameter(DescID(XBRANCH_ACTIONONLY),GeData(true),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_LENGTH_MODE),GeData(STEM_LENGTH_MODE_FRAMES),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_MAXLENGTH_MAX_ACTUAL),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_MAXLENGTH_MIN_ACTUAL),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_BENDMODE),GeData(STEM_BENDMODE_NATURAL),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_BENDVECMAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_BENDVECMIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_DOBRANCH),GeData(true),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_FROMBASE),GeData(true),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_FROMTIP),GeData(true),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_NUMBRANCHES),GeData(1),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_MAXBRANCHES),GeData(1),flags);
    pObject->SetParameter(DescID(XBRANCH_BRANCH_DEVIATION_MAX),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBRANCH_BRANCH_DEVIATION_MIN),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBRANCH_BRANCH_SPEEDMODE),GeData(BRANCH_SPEEDMODE_ABS),flags);
    pObject->SetParameter(DescID(XBRANCH_BRANCH_SPEED),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBRANCH_BRANCH_TWIST_TYPE),GeData(TWIST_TYPE_RANDOM),flags);
    pObject->SetParameter(DescID(XBRANCH_BRANCH_TWIST_ANGLE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBRANCH_STEM_SPAWN),GeData(true),flags);
    pObject->SetParameter(DescID(XBRANCH_SPAWN_DIR),GeData(BSPAWN_DIR_RANDOM),flags);
    pObject->SetParameter(DescID(XBRANCH_SPAWN_SPEED),GeData(BSPAWN_SPEED_ABS),flags);
    pObject->SetParameter(DescID(XBRANCH_SPAWN_NUMBER),GeData(1),flags);
    pObject->SetParameter(DescID(XBRANCH_SPAWN_OFFSET),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XBRANCH_ENABLED,true);
    bc->SetInt32(XBRANCH_MODE,BRANCH_MODE_INDEP);
    bc->SetBool(XBRANCH_ACTIONONLY,true);
    bc->SetInt32(XBRANCH_STEM_LENGTH_MODE,STEM_LENGTH_MODE_FRAMES);
    bc->SetFloat(XBRANCH_STEM_MAXLENGTH_MAX_ACTUAL,0.1);
    bc->SetFloat(XBRANCH_STEM_MAXLENGTH_MIN_ACTUAL,0.1);
    bc->SetInt32(XBRANCH_STEM_BENDMODE,STEM_BENDMODE_NATURAL);
    bc->SetFloat(XBRANCH_STEM_BENDVECMAX,0.1);
    bc->SetFloat(XBRANCH_STEM_BENDVECMIN,0.1);
    bc->SetBool(XBRANCH_STEM_DOBRANCH,true);
    bc->SetBool(XBRANCH_STEM_FROMBASE,true);
    bc->SetBool(XBRANCH_STEM_FROMTIP,true);
    bc->SetInt32(XBRANCH_STEM_NUMBRANCHES,1);
    bc->SetInt32(XBRANCH_STEM_MAXBRANCHES,1);
    bc->SetFloat(XBRANCH_BRANCH_DEVIATION_MAX,0.1);
    bc->SetFloat(XBRANCH_BRANCH_DEVIATION_MIN,0.1);
    bc->SetInt32(XBRANCH_BRANCH_SPEEDMODE,BRANCH_SPEEDMODE_ABS);
    bc->SetFloat(XBRANCH_BRANCH_SPEED,0.1);
    bc->SetInt32(XBRANCH_BRANCH_TWIST_TYPE,TWIST_TYPE_RANDOM);
    bc->SetFloat(XBRANCH_BRANCH_TWIST_ANGLE,0.1);
    bc->SetBool(XBRANCH_STEM_SPAWN,true);
    bc->SetInt32(XBRANCH_SPAWN_DIR,BSPAWN_DIR_RANDOM);
    bc->SetInt32(XBRANCH_SPAWN_SPEED,BSPAWN_SPEED_ABS);
    bc->SetInt32(XBRANCH_SPAWN_NUMBER,1);
    bc->SetBool(XBRANCH_SPAWN_OFFSET,true);
    pObject->Message(MSG_UPDATE);                                                      
}
             

Buttons

This node has buttons. Buttons can manually be executed by calling the following code

Python

c4d.CallButton(obj,c4d.XBRANCH_BUTTON_ADD)

C++

DescriptionCommand dc;
dc.id = DescID(XBRANCH_BUTTON_ADD);             
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);