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 Onurbsselection

Onurbsselection

Attributes

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

Elements

ID UI Name Type Parameters Cycle
GENERATOR_SELECTION_POLYGON_SHELL Shell BOOL ANIM
GENERATOR_SELECTION_POLYGON_CAP_START StartCap BOOL ANIM
GENERATOR_SELECTION_POLYGON_CAP_END EndCap BOOL ANIM
GENERATOR_SELECTION_POLYGON_BEVEL_START StartBevel BOOL ANIM
GENERATOR_SELECTION_POLYGON_BEVEL_END EndBevel BOOL ANIM
GENERATOR_SELECTION_EDGE_SHELL_START StartShell BOOL ANIM
GENERATOR_SELECTION_EDGE_SHELL_END EndShell BOOL ANIM
GENERATOR_SELECTION_EDGE_CAP_START StartCap BOOL ANIM
GENERATOR_SELECTION_EDGE_CAP_END EndCap BOOL ANIM
GENERATOR_SELECTION_EDGE_STEP_START StartStep BOOL ANIM
GENERATOR_SELECTION_EDGE_STEP_END EndStep BOOL ANIM

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.Onurbsselection)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.GENERATOR_SELECTION_POLYGON_SHELL] = True
    obj[c4d.GENERATOR_SELECTION_POLYGON_CAP_START] = True
    obj[c4d.GENERATOR_SELECTION_POLYGON_CAP_END] = True
    obj[c4d.GENERATOR_SELECTION_POLYGON_BEVEL_START] = True
    obj[c4d.GENERATOR_SELECTION_POLYGON_BEVEL_END] = True
    obj[c4d.GENERATOR_SELECTION_EDGE_SHELL_START] = True
    obj[c4d.GENERATOR_SELECTION_EDGE_SHELL_END] = True
    obj[c4d.GENERATOR_SELECTION_EDGE_CAP_START] = True
    obj[c4d.GENERATOR_SELECTION_EDGE_CAP_END] = True
    obj[c4d.GENERATOR_SELECTION_EDGE_STEP_START] = True
    obj[c4d.GENERATOR_SELECTION_EDGE_STEP_END] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.GENERATOR_SELECTION_POLYGON_SHELL,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_POLYGON_CAP_START,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_POLYGON_CAP_END,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_POLYGON_BEVEL_START,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_POLYGON_BEVEL_END,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_EDGE_SHELL_START,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_EDGE_SHELL_END,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_EDGE_CAP_START,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_EDGE_CAP_END,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_EDGE_STEP_START,True)
    bc.SetBool(c4d.GENERATOR_SELECTION_EDGE_STEP_END,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/onurbsselection.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Onurbsselection);
    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(GENERATOR_SELECTION_POLYGON_SHELL),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_POLYGON_CAP_START),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_POLYGON_CAP_END),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_POLYGON_BEVEL_START),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_POLYGON_BEVEL_END),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_EDGE_SHELL_START),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_EDGE_SHELL_END),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_EDGE_CAP_START),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_EDGE_CAP_END),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_EDGE_STEP_START),GeData(true),flags);
    pObject->SetParameter(DescID(GENERATOR_SELECTION_EDGE_STEP_END),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(GENERATOR_SELECTION_POLYGON_SHELL,true);
    bc->SetBool(GENERATOR_SELECTION_POLYGON_CAP_START,true);
    bc->SetBool(GENERATOR_SELECTION_POLYGON_CAP_END,true);
    bc->SetBool(GENERATOR_SELECTION_POLYGON_BEVEL_START,true);
    bc->SetBool(GENERATOR_SELECTION_POLYGON_BEVEL_END,true);
    bc->SetBool(GENERATOR_SELECTION_EDGE_SHELL_START,true);
    bc->SetBool(GENERATOR_SELECTION_EDGE_SHELL_END,true);
    bc->SetBool(GENERATOR_SELECTION_EDGE_CAP_START,true);
    bc->SetBool(GENERATOR_SELECTION_EDGE_CAP_END,true);
    bc->SetBool(GENERATOR_SELECTION_EDGE_STEP_START,true);
    bc->SetBool(GENERATOR_SELECTION_EDGE_STEP_END,true);
    pObject->Message(MSG_UPDATE);                                                      
}