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 SBplane

SBplane

Attributes

  • ENGLISH NAME : Plane
  • NAME : SBplane
  • INCLUDE : Obasesurface
  • PATH : dwgobjects/description/SBplane.res
  • PLUGIN : dwgobjects
  • MAXON online help (may not exist): SBPLANE

Elements

ID UI Name Type Parameters Cycle
PLANESURFACE_DISPLAY_POS DisplayPosition VECTOR  
PLANESURFACE_DISPLAY_SIZE DisplaySize REAL
MIN 0.001
MAX 1000.0
PLANESURFACE_TYPE PlaneType LONG  
PLANESURFACE_BOUNDED Bounded
PLANESURFACE_UNBOUNDED Unbounded
PLANESURFACE_A CoefficientA REAL  
PLANESURFACE_B CoefficientB REAL  
PLANESURFACE_C CoefficientC REAL  
PLANESURFACE_D CoefficientD REAL  
PLANESURFACE_LIMIT InfinityLimit REAL  

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.SBplane)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.PLANESURFACE_DISPLAY_POS] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.PLANESURFACE_DISPLAY_SIZE] = 0.1
    obj[c4d.PLANESURFACE_TYPE] = c4d.PLANESURFACE_BOUNDED
    obj[c4d.PLANESURFACE_A] = 0.1
    obj[c4d.PLANESURFACE_B] = 0.1
    obj[c4d.PLANESURFACE_C] = 0.1
    obj[c4d.PLANESURFACE_D] = 0.1
    obj[c4d.PLANESURFACE_LIMIT] = 0.1
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetVector(c4d.PLANESURFACE_DISPLAY_POS, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.PLANESURFACE_DISPLAY_SIZE,0.1)
    bc.SetInt32(c4d.PLANESURFACE_TYPE,c4d.PLANESURFACE_BOUNDED)
    bc.SetFloat(c4d.PLANESURFACE_A,0.1)
    bc.SetFloat(c4d.PLANESURFACE_B,0.1)
    bc.SetFloat(c4d.PLANESURFACE_C,0.1)
    bc.SetFloat(c4d.PLANESURFACE_D,0.1)
    bc.SetFloat(c4d.PLANESURFACE_LIMIT,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../dwgobjects/description/SBplane.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(SBplane);
    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(PLANESURFACE_DISPLAY_POS),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(PLANESURFACE_DISPLAY_SIZE),GeData(0.1),flags);
    pObject->SetParameter(DescID(PLANESURFACE_TYPE),GeData(PLANESURFACE_BOUNDED),flags);
    pObject->SetParameter(DescID(PLANESURFACE_A),GeData(0.1),flags);
    pObject->SetParameter(DescID(PLANESURFACE_B),GeData(0.1),flags);
    pObject->SetParameter(DescID(PLANESURFACE_C),GeData(0.1),flags);
    pObject->SetParameter(DescID(PLANESURFACE_D),GeData(0.1),flags);
    pObject->SetParameter(DescID(PLANESURFACE_LIMIT),GeData(0.1),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetVector(PLANESURFACE_DISPLAY_POS, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(PLANESURFACE_DISPLAY_SIZE,0.1);
    bc->SetInt32(PLANESURFACE_TYPE,PLANESURFACE_BOUNDED);
    bc->SetFloat(PLANESURFACE_A,0.1);
    bc->SetFloat(PLANESURFACE_B,0.1);
    bc->SetFloat(PLANESURFACE_C,0.1);
    bc->SetFloat(PLANESURFACE_D,0.1);
    bc->SetFloat(PLANESURFACE_LIMIT,0.1);
    pObject->Message(MSG_UPDATE);                                                      
}