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 Osymmetry

Osymmetry

Attributes

  • ENGLISH NAME : SymmetryObject
  • NAME : Osymmetry
  • INCLUDE : Obase
  • PATH : c4dplugin/description/osymmetry.res
  • PLUGIN : c4dplugin
  • MAXON online help (may not exist): OSYMMETRY

Elements

ID UI Name Type Parameters Cycle
SYMMETRYOBJECT_PLANE MirrorPlane LONG  
SYMMETRYOBJECT_PLANE_XY XY
SYMMETRYOBJECT_PLANE_YZ ZY
SYMMETRYOBJECT_PLANE_XZ XZ
SYMMETRYOBJECT_WELD WeldPoints BOOL  
SYMMETRYOBJECT_TOLERANCE WeldTolerance REAL
PARENTID SYMMETRYOBJECT_WELD
UNIT METER
MIN 0.0
SYMMETRYOBJECT_ONPLANE Symmetrical BOOL PARENTID
SYMMETRYOBJECT_CLAMPPOINTS ClampPointsonAxis BOOL
ANIM OFF
PARENTID SYMMETRYOBJECT_WELD
SYMMETRYOBJECT_DELETEPOLYGONS DeletePolygonsonAxis BOOL
ANIM OFF
PARENTID SYMMETRYOBJECT_WELD
SYMMETRYOBJECT_AUTOFLIP AutomaticallyFlip BOOL
ANIM OFF
PARENTID SYMMETRYOBJECT_WELD
SYMMETRYOBJECT_FLIP Flip BUTTON
ANIM OFF
PARENTID SYMMETRYOBJECT_WELD

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.Osymmetry)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.SYMMETRYOBJECT_PLANE] = c4d.SYMMETRYOBJECT_PLANE_XY
    obj[c4d.SYMMETRYOBJECT_WELD] = True
    obj[c4d.SYMMETRYOBJECT_TOLERANCE] = 0.1
    obj[c4d.SYMMETRYOBJECT_ONPLANE] = True
    obj[c4d.SYMMETRYOBJECT_CLAMPPOINTS] = True
    obj[c4d.SYMMETRYOBJECT_DELETEPOLYGONS] = True
    obj[c4d.SYMMETRYOBJECT_AUTOFLIP] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.SYMMETRYOBJECT_PLANE,c4d.SYMMETRYOBJECT_PLANE_XY)
    bc.SetBool(c4d.SYMMETRYOBJECT_WELD,True)
    bc.SetFloat(c4d.SYMMETRYOBJECT_TOLERANCE,0.1)
    bc.SetBool(c4d.SYMMETRYOBJECT_ONPLANE,True)
    bc.SetBool(c4d.SYMMETRYOBJECT_CLAMPPOINTS,True)
    bc.SetBool(c4d.SYMMETRYOBJECT_DELETEPOLYGONS,True)
    bc.SetBool(c4d.SYMMETRYOBJECT_AUTOFLIP,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/osymmetry.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Osymmetry);
    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(SYMMETRYOBJECT_PLANE),GeData(SYMMETRYOBJECT_PLANE_XY),flags);
    pObject->SetParameter(DescID(SYMMETRYOBJECT_WELD),GeData(true),flags);
    pObject->SetParameter(DescID(SYMMETRYOBJECT_TOLERANCE),GeData(0.1),flags);
    pObject->SetParameter(DescID(SYMMETRYOBJECT_ONPLANE),GeData(true),flags);
    pObject->SetParameter(DescID(SYMMETRYOBJECT_CLAMPPOINTS),GeData(true),flags);
    pObject->SetParameter(DescID(SYMMETRYOBJECT_DELETEPOLYGONS),GeData(true),flags);
    pObject->SetParameter(DescID(SYMMETRYOBJECT_AUTOFLIP),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(SYMMETRYOBJECT_PLANE,SYMMETRYOBJECT_PLANE_XY);
    bc->SetBool(SYMMETRYOBJECT_WELD,true);
    bc->SetFloat(SYMMETRYOBJECT_TOLERANCE,0.1);
    bc->SetBool(SYMMETRYOBJECT_ONPLANE,true);
    bc->SetBool(SYMMETRYOBJECT_CLAMPPOINTS,true);
    bc->SetBool(SYMMETRYOBJECT_DELETEPOLYGONS,true);
    bc->SetBool(SYMMETRYOBJECT_AUTOFLIP,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.SYMMETRYOBJECT_FLIP)

C++

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