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 Onurbscapslegacy

Onurbscapslegacy

Attributes

  • ENGLISH NAME :
  • INCLUDE : Obase
  • PATH : c4dplugin/description/onurbscapslegacy.res
  • PLUGIN : c4dplugin
  • MAXON online help (may not exist): ONURBSCAPSLEGACY

Elements

ID UI Name Type Parameters Cycle
CAP_MIGRATE_BUTTON Migrate BUTTON  
CAP_START StartCap LONG  
CAPTYPE_NOCAP None
CAPTYPE_CAP Cap
CAPTYPE_ROUNDING Fillet
CAPTYPE_ROUNDINGANDCAP FilletCap
CAP_STARTSTEPS StartCapSteps LONG
PARENTID CAP_START
MIN 1
MAX 100
CAP_STARTRADIUS StartCapRadius REAL
PARENTID CAP_START
UNIT METER
MIN 0.0
CAP_END EndCap LONG  
CAPTYPE_NOCAP None
CAPTYPE_CAP Cap
CAPTYPE_ROUNDING Fillet
CAPTYPE_ROUNDINGANDCAP FilletCap
CAP_ENDSTEPS EndCapSteps LONG
PARENTID CAP_END
MIN 1
MAX 100
CAP_ENDRADIUS EndCapRadius REAL
PARENTID CAP_END
UNIT METER
MIN 0.0
CAP_ROUNDING FilletType LONG  
CAP_ROUNDING_LINEAR Linear
CAP_ROUNDING_CONVEX Convex
CAP_ROUNDING_CONCAVE Concave
CAP_ROUNDING_HALFCIRCLE HalfCircle
CAP_ROUNDING_STEP 1Step
CAP_ROUNDING_2STEPS 2Steps
CAP_ROUNDING_ENGRAVED Engraved
CAP_PHONG PhongAngle REAL
UNIT DEGREE
MIN 0.0
MAX 180.0
CAP_HULLINWARD HullInwards BOOL  
CAP_HOLEINWARD HoleInwards BOOL  
CAP_CONSTRAIN Constrain BOOL  
CAP_CONNECT CreateSingleObject BOOL  
CAP_UVWROUDING RoundingUVWKeepShape BOOL  
CAP_TYPE Type LONG  
CAP_TYPE_TRI Triangles
CAP_TYPE_QUAD Quadrangles
CAP_TYPE_NGON N-gons
CAP_REGULAR RegularGrid BOOL  
CAP_REGULARWIDTH Width REAL
PARENTID CAP_REGULAR
UNIT METER
MIN 0.01

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.Onurbscapslegacy)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.CAP_START] = c4d.CAPTYPE_NOCAP
    obj[c4d.CAP_STARTSTEPS] = 1
    obj[c4d.CAP_STARTRADIUS] = 0.1
    obj[c4d.CAP_END] = c4d.CAPTYPE_NOCAP
    obj[c4d.CAP_ENDSTEPS] = 1
    obj[c4d.CAP_ENDRADIUS] = 0.1
    obj[c4d.CAP_ROUNDING] = c4d.CAP_ROUNDING_LINEAR
    obj[c4d.CAP_PHONG] = 0.1
    obj[c4d.CAP_HULLINWARD] = True
    obj[c4d.CAP_HOLEINWARD] = True
    obj[c4d.CAP_CONSTRAIN] = True
    obj[c4d.CAP_CONNECT] = True
    obj[c4d.CAP_UVWROUDING] = True
    obj[c4d.CAP_TYPE] = c4d.CAP_TYPE_TRI
    obj[c4d.CAP_REGULAR] = True
    obj[c4d.CAP_REGULARWIDTH] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.CAP_START,c4d.CAPTYPE_NOCAP)
    bc.SetInt32(c4d.CAP_STARTSTEPS,1)
    bc.SetFloat(c4d.CAP_STARTRADIUS,0.1)
    bc.SetInt32(c4d.CAP_END,c4d.CAPTYPE_NOCAP)
    bc.SetInt32(c4d.CAP_ENDSTEPS,1)
    bc.SetFloat(c4d.CAP_ENDRADIUS,0.1)
    bc.SetInt32(c4d.CAP_ROUNDING,c4d.CAP_ROUNDING_LINEAR)
    bc.SetFloat(c4d.CAP_PHONG,0.1)
    bc.SetBool(c4d.CAP_HULLINWARD,True)
    bc.SetBool(c4d.CAP_HOLEINWARD,True)
    bc.SetBool(c4d.CAP_CONSTRAIN,True)
    bc.SetBool(c4d.CAP_CONNECT,True)
    bc.SetBool(c4d.CAP_UVWROUDING,True)
    bc.SetInt32(c4d.CAP_TYPE,c4d.CAP_TYPE_TRI)
    bc.SetBool(c4d.CAP_REGULAR,True)
    bc.SetFloat(c4d.CAP_REGULARWIDTH,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/onurbscapslegacy.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Onurbscapslegacy);
    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(CAP_START),GeData(CAPTYPE_NOCAP),flags);
    pObject->SetParameter(DescID(CAP_STARTSTEPS),GeData(1),flags);
    pObject->SetParameter(DescID(CAP_STARTRADIUS),GeData(0.1),flags);
    pObject->SetParameter(DescID(CAP_END),GeData(CAPTYPE_NOCAP),flags);
    pObject->SetParameter(DescID(CAP_ENDSTEPS),GeData(1),flags);
    pObject->SetParameter(DescID(CAP_ENDRADIUS),GeData(0.1),flags);
    pObject->SetParameter(DescID(CAP_ROUNDING),GeData(CAP_ROUNDING_LINEAR),flags);
    pObject->SetParameter(DescID(CAP_PHONG),GeData(0.1),flags);
    pObject->SetParameter(DescID(CAP_HULLINWARD),GeData(true),flags);
    pObject->SetParameter(DescID(CAP_HOLEINWARD),GeData(true),flags);
    pObject->SetParameter(DescID(CAP_CONSTRAIN),GeData(true),flags);
    pObject->SetParameter(DescID(CAP_CONNECT),GeData(true),flags);
    pObject->SetParameter(DescID(CAP_UVWROUDING),GeData(true),flags);
    pObject->SetParameter(DescID(CAP_TYPE),GeData(CAP_TYPE_TRI),flags);
    pObject->SetParameter(DescID(CAP_REGULAR),GeData(true),flags);
    pObject->SetParameter(DescID(CAP_REGULARWIDTH),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(CAP_START,CAPTYPE_NOCAP);
    bc->SetInt32(CAP_STARTSTEPS,1);
    bc->SetFloat(CAP_STARTRADIUS,0.1);
    bc->SetInt32(CAP_END,CAPTYPE_NOCAP);
    bc->SetInt32(CAP_ENDSTEPS,1);
    bc->SetFloat(CAP_ENDRADIUS,0.1);
    bc->SetInt32(CAP_ROUNDING,CAP_ROUNDING_LINEAR);
    bc->SetFloat(CAP_PHONG,0.1);
    bc->SetBool(CAP_HULLINWARD,true);
    bc->SetBool(CAP_HOLEINWARD,true);
    bc->SetBool(CAP_CONSTRAIN,true);
    bc->SetBool(CAP_CONNECT,true);
    bc->SetBool(CAP_UVWROUDING,true);
    bc->SetInt32(CAP_TYPE,CAP_TYPE_TRI);
    bc->SetBool(CAP_REGULAR,true);
    bc->SetFloat(CAP_REGULARWIDTH,0.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.CAP_MIGRATE_BUTTON)

C++

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