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 Oxpbranchmesh

Oxpbranchmesh

Attributes

  • ENGLISH NAME : X-ParticlesSplineMeshObject
  • NAME : Oxpbranchmesh
  • INCLUDE : Obase
  • PATH : res/description/oxpbranchmesh.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OXPBRANCHMESH

Elements

ID UI Name Type Parameters Cycle
XBME_BRMESH_SPLINE Spline LINK HIDDEN
XBME_BRMESH_RENDER_ONLY RenderOnly BOOL  
XBME_BRMESH_JOINS Joins BOOL PARENTCOLLAPSE
XBME_BRMESH_JOIN_THRESHOLD Threshold REAL
UNIT METER
MIN 0.0
MAXSLIDER 10.0
CUSTOMGUI REALSLIDER
PARENTCOLLAPSE XBME_BRMESH_JOINS
XBME_BRMESH_JOIN_PARENT Parent LONG PARENTCOLLAPSE
XBME_BRMESH_JOIN_PARENT_LENGTH Longest
XBME_BRMESH_JOIN_PARENT_ORDER Order
XBME_BRMESH_CAPS Caps BOOL  
XBME_BRMESH_SIZE Size REAL
UNIT METER
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
PARENTCOLLAPSE
XBME_SCALE_SPLINE Scale SPLINE
Y_MIN 0.0
Y_MAX 1.0
X_MIN 0.0
X_MAX 1.0
PARENTCOLLAPSE XBME_BRMESH_SIZE
XBME_BRMESH_TWIST Twist BOOL PARENTCOLLAPSE
XBME_TWIST_SPLINE Rotation SPLINE
Y_MIN -360.0
Y_MAX 360.0
X_MIN 0.0
X_MAX 1.0
PARENTCOLLAPSE XBME_BRMESH_TWIST
XBME_BRMESH_SUBTWIST Sub-BranchTwist REAL
UNIT DEGREE
CUSTOMGUI REALSLIDER
MINSLIDER -360.0
MAXSLIDER 360.0
XBME_BRMESH_SUBSCALE Sub-BranchScale REAL
UNIT PERCENT
CUSTOMGUI REALSLIDER
MIN 0.0
MAXSLIDER 100.0
XBME_BRMESH_SUBOFFSET Sub-BranchOffset REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 1000.0
CUSTOMGUI REALSLIDER
XBME_BRMESH_SUBUV Sub-BranchParentUV BOOL  
XBME_BRMESH_SUBPOLY Sub-BranchJoin LONG  
XBME_BRMESH_SUBPOLY_INTERSECT Intersection
XBME_BRMESH_SUBPOLY_CLOSEST_ORIGIN FirstPoint
XBME_BRMESH_SUBPOLY_CLOSEST_OFFSET OffsetPosition
XBME_BRMESH_SUBJOINOFFSET JoinOffset REAL
UNIT METER
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XBME_BRMESH_RESAMPLE Spacing LONG  
XBME_BRMESH_RESAMPLE_NONE AsSpline
XBME_BRMESH_RESAMPLE_SAMPLES Samples
XBME_BRMESH_RESAMPLE_ABS Absolute
XBME_BRMESH_RESAMPLE_REL Relative
XBME_BRMESH_SAMPLES Samples LONG
MIN 2
MINSLIDER 2
MAXSLIDER 100
CUSTOMGUI LONGSLIDER
XBME_BRMESH_ABS_SPACING SpacingDistance REAL
UNIT METER
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XBME_BRMESH_REL_SPACING SpacingValue REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XBME_BRMESH_SUBDIV Subdivisions LONG
MIN 0
MINSLIDER 0
MAXSLIDER 5
CUSTOMGUI LONGSLIDER
XBME_BRMESH_SPLINES Objects IN_EXCLUDE
NUM_FLAGS 2
INIT_STATE 3
SEND_SELCHNGMSG 1
SCALE_V
OPEN
IMAGE_01_ON 1009316
IMAGE_01_OFF 1009320
IMAGE_02_ON 300000231
IMAGE_02_OFF 300000230
XBME_HELP_BUTTON BITMAPBUTTON  
XBME_VIDMAN_BUTTON BITMAPBUTTON  
XBME_BUTTON_RESET ResettoDefaults BUTTON  
XBME_BUTTON_SAVE_PRESET SavePreset... BUTTON  
XBME_BUTTON_LOAD_PRESET LoadPreset... BUTTON  

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.Oxpbranchmesh)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XBME_BRMESH_RENDER_ONLY] = True
    obj[c4d.XBME_BRMESH_JOINS] = True
    obj[c4d.XBME_BRMESH_JOIN_THRESHOLD] = 0.1
    obj[c4d.XBME_BRMESH_JOIN_PARENT] = c4d.XBME_BRMESH_JOIN_PARENT_LENGTH
    obj[c4d.XBME_BRMESH_CAPS] = True
    obj[c4d.XBME_BRMESH_SIZE] = 0.1
    obj[c4d.XBME_BRMESH_TWIST] = True
    obj[c4d.XBME_BRMESH_SUBTWIST] = 0.1
    obj[c4d.XBME_BRMESH_SUBSCALE] = 0.1
    obj[c4d.XBME_BRMESH_SUBOFFSET] = 0.1
    obj[c4d.XBME_BRMESH_SUBUV] = True
    obj[c4d.XBME_BRMESH_SUBPOLY] = c4d.XBME_BRMESH_SUBPOLY_INTERSECT
    obj[c4d.XBME_BRMESH_SUBJOINOFFSET] = 0.1
    obj[c4d.XBME_BRMESH_RESAMPLE] = c4d.XBME_BRMESH_RESAMPLE_NONE
    obj[c4d.XBME_BRMESH_SAMPLES] = 1
    obj[c4d.XBME_BRMESH_ABS_SPACING] = 0.1
    obj[c4d.XBME_BRMESH_REL_SPACING] = 0.1
    obj[c4d.XBME_BRMESH_SUBDIV] = 1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XBME_BRMESH_RENDER_ONLY,True)
    bc.SetBool(c4d.XBME_BRMESH_JOINS,True)
    bc.SetFloat(c4d.XBME_BRMESH_JOIN_THRESHOLD,0.1)
    bc.SetInt32(c4d.XBME_BRMESH_JOIN_PARENT,c4d.XBME_BRMESH_JOIN_PARENT_LENGTH)
    bc.SetBool(c4d.XBME_BRMESH_CAPS,True)
    bc.SetFloat(c4d.XBME_BRMESH_SIZE,0.1)
    bc.SetBool(c4d.XBME_BRMESH_TWIST,True)
    bc.SetFloat(c4d.XBME_BRMESH_SUBTWIST,0.1)
    bc.SetFloat(c4d.XBME_BRMESH_SUBSCALE,0.1)
    bc.SetFloat(c4d.XBME_BRMESH_SUBOFFSET,0.1)
    bc.SetBool(c4d.XBME_BRMESH_SUBUV,True)
    bc.SetInt32(c4d.XBME_BRMESH_SUBPOLY,c4d.XBME_BRMESH_SUBPOLY_INTERSECT)
    bc.SetFloat(c4d.XBME_BRMESH_SUBJOINOFFSET,0.1)
    bc.SetInt32(c4d.XBME_BRMESH_RESAMPLE,c4d.XBME_BRMESH_RESAMPLE_NONE)
    bc.SetInt32(c4d.XBME_BRMESH_SAMPLES,1)
    bc.SetFloat(c4d.XBME_BRMESH_ABS_SPACING,0.1)
    bc.SetFloat(c4d.XBME_BRMESH_REL_SPACING,0.1)
    bc.SetInt32(c4d.XBME_BRMESH_SUBDIV,1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/oxpbranchmesh.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oxpbranchmesh);
    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(XBME_BRMESH_RENDER_ONLY),GeData(true),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_JOINS),GeData(true),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_JOIN_THRESHOLD),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_JOIN_PARENT),GeData(XBME_BRMESH_JOIN_PARENT_LENGTH),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_CAPS),GeData(true),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SIZE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_TWIST),GeData(true),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SUBTWIST),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SUBSCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SUBOFFSET),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SUBUV),GeData(true),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SUBPOLY),GeData(XBME_BRMESH_SUBPOLY_INTERSECT),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SUBJOINOFFSET),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_RESAMPLE),GeData(XBME_BRMESH_RESAMPLE_NONE),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SAMPLES),GeData(1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_ABS_SPACING),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_REL_SPACING),GeData(0.1),flags);
    pObject->SetParameter(DescID(XBME_BRMESH_SUBDIV),GeData(1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XBME_BRMESH_RENDER_ONLY,true);
    bc->SetBool(XBME_BRMESH_JOINS,true);
    bc->SetFloat(XBME_BRMESH_JOIN_THRESHOLD,0.1);
    bc->SetInt32(XBME_BRMESH_JOIN_PARENT,XBME_BRMESH_JOIN_PARENT_LENGTH);
    bc->SetBool(XBME_BRMESH_CAPS,true);
    bc->SetFloat(XBME_BRMESH_SIZE,0.1);
    bc->SetBool(XBME_BRMESH_TWIST,true);
    bc->SetFloat(XBME_BRMESH_SUBTWIST,0.1);
    bc->SetFloat(XBME_BRMESH_SUBSCALE,0.1);
    bc->SetFloat(XBME_BRMESH_SUBOFFSET,0.1);
    bc->SetBool(XBME_BRMESH_SUBUV,true);
    bc->SetInt32(XBME_BRMESH_SUBPOLY,XBME_BRMESH_SUBPOLY_INTERSECT);
    bc->SetFloat(XBME_BRMESH_SUBJOINOFFSET,0.1);
    bc->SetInt32(XBME_BRMESH_RESAMPLE,XBME_BRMESH_RESAMPLE_NONE);
    bc->SetInt32(XBME_BRMESH_SAMPLES,1);
    bc->SetFloat(XBME_BRMESH_ABS_SPACING,0.1);
    bc->SetFloat(XBME_BRMESH_REL_SPACING,0.1);
    bc->SetInt32(XBME_BRMESH_SUBDIV,1);
    pObject->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(obj,c4d.XBME_HELP_BUTTON)
c4d.CallButton(obj,c4d.XBME_VIDMAN_BUTTON)
c4d.CallButton(obj,c4d.XBME_BUTTON_RESET)
c4d.CallButton(obj,c4d.XBME_BUTTON_SAVE_PRESET)
c4d.CallButton(obj,c4d.XBME_BUTTON_LOAD_PRESET)

C++

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

DescriptionCommand dc; dc.id = DescID(XBME_VIDMAN_BUTTON); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XBME_BUTTON_RESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XBME_BUTTON_SAVE_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XBME_BUTTON_LOAD_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);