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 Odoodle

Odoodle

Attributes

  • ENGLISH NAME : DoodleObject
  • NAME : Odoodle
  • INCLUDE : Obase
  • PATH : model/description/odoodle.res
  • PLUGIN : model
  • MAXON online help (may not exist): ODOODLE

Elements

ID UI Name Type Parameters Cycle
DOODLEOBJECT_BD BaseDraw LINK HIDDEN
DOODLEOBJECT_IMAGE CurrentImage LINK HIDDEN
DOODLEOBJECT_ADDIMAGE NewFrame BUTTON FIT_H
DOODLEOBJECT_DELIMAGE DeleteFrame BUTTON FIT_H
DOODLEOBJECT_CLEARFRAME ClearFrame BUTTON FIT_H
DOODLEOBJECT_SETBD SetViewport BUTTON FIT_H
DOODLEOBJECT_LOAD_BITMAP LoadBitmap BUTTON FIT_H
DOODLEOBJECT_REMOVE_UNUSED RemoveUnused BUTTON FIT_H
DOODLEOBJECT_EXPORT Export BUTTON FIT_H
DOODLEOBJECT_IMPORT Import BUTTON FIT_H
DOODLEOBJECT_EXPORT_FORMAT ExportFormat LONG  
DOODLEOBJECT_EXPORT_FORMAT_PNG PNG
DOODLEOBJECT_EXPORT_FORMAT_TIF TIFF
DOODLEOBJECT_SIZE_X SizeX LONG
MIN 100
MAX 4096
DOODLEOBJECT_SIZE_Y SizeY LONG
MIN 100
MAX 4096
DOODLEOBJECT_GHOST_PREV GhostPrevious BOOL  
DOODLEOBJECT_GHOST_NEXT GhostNext BOOL  
DOODLEOBJECT_SMOOTHVIEW DrawSmoothly BOOL  
DOODLEOBJECT_SAVECOMPRESSED SaveCompressed BOOL  
DOODLEOBJECT_CURRENTVIEW CurrentView STRING ANIM
DOODLEOBJECT_TITLE Title STRING ANIM
DOODLEOBJECT_BODY Description STRING
OPEN
CUSTOMGUI MULTISTRING
ANIM OFF

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.Odoodle)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.DOODLEOBJECT_EXPORT_FORMAT] = c4d.DOODLEOBJECT_EXPORT_FORMAT_PNG
    obj[c4d.DOODLEOBJECT_SIZE_X] = 1
    obj[c4d.DOODLEOBJECT_SIZE_Y] = 1
    obj[c4d.DOODLEOBJECT_GHOST_PREV] = True
    obj[c4d.DOODLEOBJECT_GHOST_NEXT] = True
    obj[c4d.DOODLEOBJECT_SMOOTHVIEW] = True
    obj[c4d.DOODLEOBJECT_SAVECOMPRESSED] = True
    obj[c4d.DOODLEOBJECT_CURRENTVIEW] = "Hello World"
    obj[c4d.DOODLEOBJECT_TITLE] = "Hello World"
    obj[c4d.DOODLEOBJECT_BODY] = "Hello World"
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.DOODLEOBJECT_EXPORT_FORMAT,c4d.DOODLEOBJECT_EXPORT_FORMAT_PNG)
    bc.SetInt32(c4d.DOODLEOBJECT_SIZE_X,1)
    bc.SetInt32(c4d.DOODLEOBJECT_SIZE_Y,1)
    bc.SetBool(c4d.DOODLEOBJECT_GHOST_PREV,True)
    bc.SetBool(c4d.DOODLEOBJECT_GHOST_NEXT,True)
    bc.SetBool(c4d.DOODLEOBJECT_SMOOTHVIEW,True)
    bc.SetBool(c4d.DOODLEOBJECT_SAVECOMPRESSED,True)
    bc.SetString(c4d.DOODLEOBJECT_CURRENTVIEW,"Hello World")
    bc.SetString(c4d.DOODLEOBJECT_TITLE,"Hello World")
    bc.SetString(c4d.DOODLEOBJECT_BODY,"Hello World")

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../model/description/odoodle.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Odoodle);
    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(DOODLEOBJECT_EXPORT_FORMAT),GeData(DOODLEOBJECT_EXPORT_FORMAT_PNG),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_SIZE_X),GeData(1),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_SIZE_Y),GeData(1),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_GHOST_PREV),GeData(true),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_GHOST_NEXT),GeData(true),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_SMOOTHVIEW),GeData(true),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_SAVECOMPRESSED),GeData(true),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_CURRENTVIEW),GeData("Hello World"),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_TITLE),GeData("Hello World"),flags);
    pObject->SetParameter(DescID(DOODLEOBJECT_BODY),GeData("Hello World"),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(DOODLEOBJECT_EXPORT_FORMAT,DOODLEOBJECT_EXPORT_FORMAT_PNG);
    bc->SetInt32(DOODLEOBJECT_SIZE_X,1);
    bc->SetInt32(DOODLEOBJECT_SIZE_Y,1);
    bc->SetBool(DOODLEOBJECT_GHOST_PREV,true);
    bc->SetBool(DOODLEOBJECT_GHOST_NEXT,true);
    bc->SetBool(DOODLEOBJECT_SMOOTHVIEW,true);
    bc->SetBool(DOODLEOBJECT_SAVECOMPRESSED,true);
    bc->SetString(DOODLEOBJECT_CURRENTVIEW,"Hello World");
    bc->SetString(DOODLEOBJECT_TITLE,"Hello World");
    bc->SetString(DOODLEOBJECT_BODY,"Hello World");
    pObject->Message(MSG_UPDATE);                                                      
}
             

Buttons

This node has buttons. Buttons can manually be executed by calling the following code

Python

c4d.CallButton(obj,c4d.DOODLEOBJECT_ADDIMAGE)
c4d.CallButton(obj,c4d.DOODLEOBJECT_DELIMAGE)
c4d.CallButton(obj,c4d.DOODLEOBJECT_CLEARFRAME)
c4d.CallButton(obj,c4d.DOODLEOBJECT_SETBD)
c4d.CallButton(obj,c4d.DOODLEOBJECT_LOAD_BITMAP)
c4d.CallButton(obj,c4d.DOODLEOBJECT_REMOVE_UNUSED)
c4d.CallButton(obj,c4d.DOODLEOBJECT_EXPORT)
c4d.CallButton(obj,c4d.DOODLEOBJECT_IMPORT)

C++

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

DescriptionCommand dc; dc.id = DescID(DOODLEOBJECT_DELIMAGE); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(DOODLEOBJECT_CLEARFRAME); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(DOODLEOBJECT_SETBD); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(DOODLEOBJECT_LOAD_BITMAP); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(DOODLEOBJECT_REMOVE_UNUSED); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(DOODLEOBJECT_EXPORT); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(DOODLEOBJECT_IMPORT); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);