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 Oremesh

Oremesh

Attributes

  • ENGLISH NAME : Remesh
  • NAME : Oremesh
  • INCLUDE : Obase
  • PATH : objects/description/oremesh.res
  • PLUGIN : objects
  • MAXON online help (may not exist): OREMESH

Elements

ID UI Name Type Parameters Cycle
ID_REMESH_POLYGONTYPE PolygonType LONG  
ID_REMESH_POLYGONTYPE_QUADRANGLES Quad-dominant
ID_REMESH_POLYGONTYPE_TRIANGLES Triangles
ID_REMESH_POLYGONTARGET_MODE PolygonTargetMode LONG  
ID_REMESH_POLYGONTARGET_MODE_ABSOLUTE PolygonCount
ID_REMESH_POLYGONTARGET_MODE_MESHDENSITY MeshDensity
ID_REMESH_POLYGONSCALE MeshDensity REAL
UNIT PERCENT
MIN 1
MINSLIDER 1
MAX 10000.0
MAXSLIDER 500.0
STEP 1
CUSTOMGUI REALSLIDER
ID_REMESH_POLYGONTARGET PolygonCount LONG
MIN 1
MAX 5000000
ID_REMESH_KEEPOUTLINE KeepOutline BOOL  
ID_REMESH_CREASES KeepCreases BOOL  
ID_REMESH_EDGEANGLE EdgeAngle REAL
UNIT DEGREE
MIN 0.0
MINSLIDER 0.0
MAX 180
MAXSLIDER 180
CUSTOMGUI REALSLIDER
ID_REMESH_SMOOTHITERATIONS SmoothIterations LONG
MIN 0
MAX 100
ID_REMESH_QUADONLY OnlyQuadrangles BOOL  
ID_REMESH_GUIDE_SPLINES FlowSplines IN_EXCLUDE
NUM_FLAGS 1
INIT_STATE 1
IMAGE_01_ON 300000131
IMAGE_01_OFF 300000130

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.Oremesh)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.ID_REMESH_POLYGONTYPE] = c4d.ID_REMESH_POLYGONTYPE_QUADRANGLES
    obj[c4d.ID_REMESH_POLYGONTARGET_MODE] = c4d.ID_REMESH_POLYGONTARGET_MODE_ABSOLUTE
    obj[c4d.ID_REMESH_POLYGONSCALE] = 0.1
    obj[c4d.ID_REMESH_POLYGONTARGET] = 1
    obj[c4d.ID_REMESH_KEEPOUTLINE] = True
    obj[c4d.ID_REMESH_CREASES] = True
    obj[c4d.ID_REMESH_EDGEANGLE] = 0.1
    obj[c4d.ID_REMESH_SMOOTHITERATIONS] = 1
    obj[c4d.ID_REMESH_QUADONLY] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.ID_REMESH_POLYGONTYPE,c4d.ID_REMESH_POLYGONTYPE_QUADRANGLES)
    bc.SetInt32(c4d.ID_REMESH_POLYGONTARGET_MODE,c4d.ID_REMESH_POLYGONTARGET_MODE_ABSOLUTE)
    bc.SetFloat(c4d.ID_REMESH_POLYGONSCALE,0.1)
    bc.SetInt32(c4d.ID_REMESH_POLYGONTARGET,1)
    bc.SetBool(c4d.ID_REMESH_KEEPOUTLINE,True)
    bc.SetBool(c4d.ID_REMESH_CREASES,True)
    bc.SetFloat(c4d.ID_REMESH_EDGEANGLE,0.1)
    bc.SetInt32(c4d.ID_REMESH_SMOOTHITERATIONS,1)
    bc.SetBool(c4d.ID_REMESH_QUADONLY,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../objects/description/oremesh.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oremesh);
    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(ID_REMESH_POLYGONTYPE),GeData(ID_REMESH_POLYGONTYPE_QUADRANGLES),flags);
    pObject->SetParameter(DescID(ID_REMESH_POLYGONTARGET_MODE),GeData(ID_REMESH_POLYGONTARGET_MODE_ABSOLUTE),flags);
    pObject->SetParameter(DescID(ID_REMESH_POLYGONSCALE),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_REMESH_POLYGONTARGET),GeData(1),flags);
    pObject->SetParameter(DescID(ID_REMESH_KEEPOUTLINE),GeData(true),flags);
    pObject->SetParameter(DescID(ID_REMESH_CREASES),GeData(true),flags);
    pObject->SetParameter(DescID(ID_REMESH_EDGEANGLE),GeData(0.1),flags);
    pObject->SetParameter(DescID(ID_REMESH_SMOOTHITERATIONS),GeData(1),flags);
    pObject->SetParameter(DescID(ID_REMESH_QUADONLY),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(ID_REMESH_POLYGONTYPE,ID_REMESH_POLYGONTYPE_QUADRANGLES);
    bc->SetInt32(ID_REMESH_POLYGONTARGET_MODE,ID_REMESH_POLYGONTARGET_MODE_ABSOLUTE);
    bc->SetFloat(ID_REMESH_POLYGONSCALE,0.1);
    bc->SetInt32(ID_REMESH_POLYGONTARGET,1);
    bc->SetBool(ID_REMESH_KEEPOUTLINE,true);
    bc->SetBool(ID_REMESH_CREASES,true);
    bc->SetFloat(ID_REMESH_EDGEANGLE,0.1);
    bc->SetInt32(ID_REMESH_SMOOTHITERATIONS,1);
    bc->SetBool(ID_REMESH_QUADONLY,true);
    pObject->Message(MSG_UPDATE);                                                      
}