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 Obasedeform

Obasedeform

Attributes

  • ENGLISH NAME : DeformObject
  • NAME : Obasedeform
  • INCLUDE : Obase
  • PATH : objects/description/obasedeform.res
  • PLUGIN : objects
  • MAXON online help (may not exist): OBASEDEFORM

Elements

ID UI Name Type Parameters Cycle
DEFORMOBJECT_SIZE Size VECTOR
HIDDEN
UNIT METER
MIN 0.0
DEFORMOBJECT_ALIGNMENT Alignment LONG
ANIM OFF
HIDDEN
DEFORMOBJECT_ALIGNMENT_AUTO Auto
DEFORMOBJECT_ALIGNMENT_POSITIVE_X X+
DEFORMOBJECT_ALIGNMENT_NEGATIVE_X X-
DEFORMOBJECT_ALIGNMENT_POSITIVE_Y Y+
DEFORMOBJECT_ALIGNMENT_NEGATIVE_Y Y-
DEFORMOBJECT_ALIGNMENT_POSITIVE_Z Z+
DEFORMOBJECT_ALIGNMENT_NEGATIVE_Z Z-
DEFORMOBJECT_FITTOPARENT FittoParent BUTTON HIDDEN
DEFORMOBJECT_MODE Mode LONG HIDDEN
DEFORMOBJECT_MODE_LIMIT Limited
DEFORMOBJECT_MODE_BOX WithinBox
DEFORMOBJECT_MODE_UNLIMITED Unlimited
DEFORMOBJECT_STRENGTH Strength REAL
HIDDEN
UNIT PERCENT
DEFORMOBJECT_ANGLE Angle REAL
HIDDEN
UNIT DEGREE
CUSTOMGUI REALSLIDER
STEP 1
MINSLIDER 0
MAXSLIDER 360
DEFAULT 0
DEFORMOBJECT_CURVATURE Curvature REAL
HIDDEN
MIN 0.0
UNIT PERCENT
CUSTOMGUI REALSLIDER
STEP 1
MINSLIDER 0
MAXSLIDER 100
DEFAULT 0
DEFORMOBJECT_FILLET Fillet BOOL HIDDEN

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.Obasedeform)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.DEFORMOBJECT_SIZE] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.DEFORMOBJECT_ALIGNMENT] = c4d.DEFORMOBJECT_ALIGNMENT_AUTO
    obj[c4d.DEFORMOBJECT_MODE] = c4d.DEFORMOBJECT_MODE_LIMIT
    obj[c4d.DEFORMOBJECT_STRENGTH] = 0.1
    obj[c4d.DEFORMOBJECT_ANGLE] = 0.1
    obj[c4d.DEFORMOBJECT_CURVATURE] = 0.1
    obj[c4d.DEFORMOBJECT_FILLET] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetVector(c4d.DEFORMOBJECT_SIZE, c4d.Vector(1.0,1.0,1.0)
    bc.SetInt32(c4d.DEFORMOBJECT_ALIGNMENT,c4d.DEFORMOBJECT_ALIGNMENT_AUTO)
    bc.SetInt32(c4d.DEFORMOBJECT_MODE,c4d.DEFORMOBJECT_MODE_LIMIT)
    bc.SetFloat(c4d.DEFORMOBJECT_STRENGTH,0.1)
    bc.SetFloat(c4d.DEFORMOBJECT_ANGLE,0.1)
    bc.SetFloat(c4d.DEFORMOBJECT_CURVATURE,0.1)
    bc.SetBool(c4d.DEFORMOBJECT_FILLET,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../objects/description/obasedeform.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Obasedeform);
    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(DEFORMOBJECT_SIZE),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(DEFORMOBJECT_ALIGNMENT),GeData(DEFORMOBJECT_ALIGNMENT_AUTO),flags);
    pObject->SetParameter(DescID(DEFORMOBJECT_MODE),GeData(DEFORMOBJECT_MODE_LIMIT),flags);
    pObject->SetParameter(DescID(DEFORMOBJECT_STRENGTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(DEFORMOBJECT_ANGLE),GeData(0.1),flags);
    pObject->SetParameter(DescID(DEFORMOBJECT_CURVATURE),GeData(0.1),flags);
    pObject->SetParameter(DescID(DEFORMOBJECT_FILLET),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetVector(DEFORMOBJECT_SIZE, c4d.Vector(1.0,1.0,1.0);
    bc->SetInt32(DEFORMOBJECT_ALIGNMENT,DEFORMOBJECT_ALIGNMENT_AUTO);
    bc->SetInt32(DEFORMOBJECT_MODE,DEFORMOBJECT_MODE_LIMIT);
    bc->SetFloat(DEFORMOBJECT_STRENGTH,0.1);
    bc->SetFloat(DEFORMOBJECT_ANGLE,0.1);
    bc->SetFloat(DEFORMOBJECT_CURVATURE,0.1);
    bc->SetBool(DEFORMOBJECT_FILLET,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.DEFORMOBJECT_FITTOPARENT)

C++

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