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 MGhoneycombarray

MGhoneycombarray

Attributes

Elements

ID UI Name Type Parameters Cycle
MG_HONEYCOMB_ORIENTATION Orientation LONG  
MG_HONEYCOMB_ORIENTATION_XY Z(XY)
MG_HONEYCOMB_ORIENTATION_ZY X(ZY)
MG_HONEYCOMB_ORIENTATION_XZ Y(XZ)
MG_HONEYCOMB_DIRECTION OffsetDirection LONG  
MG_HONEYCOMB_DIRECTION_WIDTH Width
MG_HONEYCOMB_DIRECTION_HEIGHT Height
MG_HONEYCOMB_OFFSET Offset REAL
PARENTCOLLAPSE
MIN 0.0
MAX 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MG_HONEYCOMB_OFFSET_VARIATION OffsetVariation REAL
PARENTCOLLAPSE MG_HONEYCOMB_OFFSET
MIN 0.0
MAX 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MG_HONEYCOMB_VARIATION PerpendicularVariation REAL
PARENTCOLLAPSE MG_HONEYCOMB_OFFSET
MIN 0.0
MAX 100.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
MG_HONEYCOMB_SEED Seed LONG
PARENTCOLLAPSE MG_HONEYCOMB_OFFSET
MIN 0
MG_HONEYCOMB_COUNT_X CountWidth LONG MIN
MG_HONEYCOMB_COUNT_Y CountHeight LONG MIN
MG_HONEYCOMB_MODE Mode LONG  
MG_HONEYCOMB_MODE_PERSTEP PerStep
MG_HONEYCOMB_MODE_ENDPOINT EndPoint
MG_HONEYCOMB_SIZE_X SizeWidth REAL
UNIT METER
MIN 0.0
MG_HONEYCOMB_SIZE_Y SizeHeight REAL
UNIT METER
MIN 0.0
MG_HONEYCOMB_FORM Form LONG  
MG_HONEYCOMB_FORM_CIRCLE Circle
MG_HONEYCOMB_FORM_SQUARE Square
MG_HONEYCOMB_FORM_SPLINE Spline
MG_HONEYCOMB_FORMOBJECT_LINK Spline LINK  

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.MGhoneycombarray)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.MG_HONEYCOMB_ORIENTATION] = c4d.MG_HONEYCOMB_ORIENTATION_XY
    obj[c4d.MG_HONEYCOMB_DIRECTION] = c4d.MG_HONEYCOMB_DIRECTION_WIDTH
    obj[c4d.MG_HONEYCOMB_OFFSET] = 0.1
    obj[c4d.MG_HONEYCOMB_OFFSET_VARIATION] = 0.1
    obj[c4d.MG_HONEYCOMB_VARIATION] = 0.1
    obj[c4d.MG_HONEYCOMB_SEED] = 1
    obj[c4d.MG_HONEYCOMB_COUNT_X] = 1
    obj[c4d.MG_HONEYCOMB_COUNT_Y] = 1
    obj[c4d.MG_HONEYCOMB_MODE] = c4d.MG_HONEYCOMB_MODE_PERSTEP
    obj[c4d.MG_HONEYCOMB_SIZE_X] = 0.1
    obj[c4d.MG_HONEYCOMB_SIZE_Y] = 0.1
    obj[c4d.MG_HONEYCOMB_FORM] = c4d.MG_HONEYCOMB_FORM_CIRCLE
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.MG_HONEYCOMB_ORIENTATION,c4d.MG_HONEYCOMB_ORIENTATION_XY)
    bc.SetInt32(c4d.MG_HONEYCOMB_DIRECTION,c4d.MG_HONEYCOMB_DIRECTION_WIDTH)
    bc.SetFloat(c4d.MG_HONEYCOMB_OFFSET,0.1)
    bc.SetFloat(c4d.MG_HONEYCOMB_OFFSET_VARIATION,0.1)
    bc.SetFloat(c4d.MG_HONEYCOMB_VARIATION,0.1)
    bc.SetInt32(c4d.MG_HONEYCOMB_SEED,1)
    bc.SetInt32(c4d.MG_HONEYCOMB_COUNT_X,1)
    bc.SetInt32(c4d.MG_HONEYCOMB_COUNT_Y,1)
    bc.SetInt32(c4d.MG_HONEYCOMB_MODE,c4d.MG_HONEYCOMB_MODE_PERSTEP)
    bc.SetFloat(c4d.MG_HONEYCOMB_SIZE_X,0.1)
    bc.SetFloat(c4d.MG_HONEYCOMB_SIZE_Y,0.1)
    bc.SetInt32(c4d.MG_HONEYCOMB_FORM,c4d.MG_HONEYCOMB_FORM_CIRCLE)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../mograph/description/mghoneycombarray.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(MGhoneycombarray);
    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(MG_HONEYCOMB_ORIENTATION),GeData(MG_HONEYCOMB_ORIENTATION_XY),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_DIRECTION),GeData(MG_HONEYCOMB_DIRECTION_WIDTH),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_OFFSET),GeData(0.1),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_OFFSET_VARIATION),GeData(0.1),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_VARIATION),GeData(0.1),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_SEED),GeData(1),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_COUNT_X),GeData(1),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_COUNT_Y),GeData(1),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_MODE),GeData(MG_HONEYCOMB_MODE_PERSTEP),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_SIZE_X),GeData(0.1),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_SIZE_Y),GeData(0.1),flags);
    pObject->SetParameter(DescID(MG_HONEYCOMB_FORM),GeData(MG_HONEYCOMB_FORM_CIRCLE),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(MG_HONEYCOMB_ORIENTATION,MG_HONEYCOMB_ORIENTATION_XY);
    bc->SetInt32(MG_HONEYCOMB_DIRECTION,MG_HONEYCOMB_DIRECTION_WIDTH);
    bc->SetFloat(MG_HONEYCOMB_OFFSET,0.1);
    bc->SetFloat(MG_HONEYCOMB_OFFSET_VARIATION,0.1);
    bc->SetFloat(MG_HONEYCOMB_VARIATION,0.1);
    bc->SetInt32(MG_HONEYCOMB_SEED,1);
    bc->SetInt32(MG_HONEYCOMB_COUNT_X,1);
    bc->SetInt32(MG_HONEYCOMB_COUNT_Y,1);
    bc->SetInt32(MG_HONEYCOMB_MODE,MG_HONEYCOMB_MODE_PERSTEP);
    bc->SetFloat(MG_HONEYCOMB_SIZE_X,0.1);
    bc->SetFloat(MG_HONEYCOMB_SIZE_Y,0.1);
    bc->SetInt32(MG_HONEYCOMB_FORM,MG_HONEYCOMB_FORM_CIRCLE);
    pObject->Message(MSG_UPDATE);                                                      
}