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 Tdisplay

Tdisplay

Attributes

  • ENGLISH NAME : DisplayTag
  • NAME : Tdisplay
  • INCLUDE : Tbase
  • PATH : c4dplugin/description/tdisplay.res
  • PLUGIN : c4dplugin
  • MAXON online help (may not exist): TDISPLAY

Elements

ID UI Name Type Parameters Cycle
DISPLAYTAG_AFFECT_DISPLAYMODE UseShadingMode BOOL  
DISPLAYTAG_SDISPLAYMODE ShadingMode LONG  
DISPLAYTAG_SDISPLAY_GOURAUD GouraudShading
DISPLAYTAG_SDISPLAY_GOURAUD_WIRE GouraudShading(Lines)
DISPLAYTAG_SDISPLAY_QUICK QuickShading
DISPLAYTAG_SDISPLAY_QUICK_WIRE QuickShading(Lines)
DISPLAYTAG_SDISPLAY_FLAT ConstantShading
DISPLAYTAG_SDISPLAY_FLAT_WIRE ConstantShading(Lines)
DISPLAYTAG_SDISPLAY_HIDDENLINE HiddenLine
DISPLAYTAG_SDISPLAY_NOSHADING Lines
DISPLAYTAG_WDISPLAYMODE Style LONG  
DISPLAYTAG_WDISPLAY_WIREFRAME Wireframe
DISPLAYTAG_WDISPLAY_ISOPARMS Isoparms
DISPLAYTAG_WDISPLAY_BOX Box
DISPLAYTAG_WDISPLAY_SKELETON Skeleton
DISPLAYTAG_VDISPLAYMODE VolumeVector LONG  
DISPLAYTAG_VDISPLAY_DIRECTION Direction
DISPLAYTAG_VDISPLAY_LENGTH Length
DISPLAYTAG_AFFECT_LEVELOFDETAIL UseLevelofDetail BOOL  
DISPLAYTAG_LEVELOFDETAIL LevelofDetail REAL
UNIT PERCENT
MIN 0.0
MAX 1000
DISPLAYTAG_AFFECT_VISIBILITY UseVisiblity BOOL  
DISPLAYTAG_VISIBILITY Visibility REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
DISPLAYTAG_AFFECT_BACKFACECULLING UseBackfaceCulling BOOL  
DISPLAYTAG_BACKFACECULLING BackfaceCulling BOOL  
DISPLAYTAG_AFFECT_TEXTURES UseMaterials BOOL  
DISPLAYTAG_TEXTURES Materials BOOL  
DISPLAYTAG_AFFECT_REFLECTIONS UseReflections BOOL  
DISPLAYTAG_REFLECTIONS Reflections BOOL  
DISPLAYTAG_AFFECT_TESSELLATION UseTessellation BOOL  
DISPLAYTAG_TESSELLATION Tessellation BOOL  
ONION_USE Enable BOOL ANIM
ONION_MODE DrawMode LONG
PARENTCOLLAPSE
ANIM OFF
ONION_MODE_OBJECT Object
ONION_MODE_POINT Point
ONION_MODE_AXIS Axis
ONION_MODE_TRAIL Trail
ONION_MODE_MTRAIL MultiTrail
ONION_MODE_VELOCITY Velocity
ONION_SCALE Scale REAL
PARENTCOLLAPSE ONION_MODE
MIN 0
MINEX
ANIM OFF
UNIT PERCENT
ONION_PSIZE Size LONG
PARENTCOLLAPSE ONION_MODE
MIN 0
MINEX
MAX 10
ANIM OFF
ONION_DISPLAYMODE ShadingMode LONG
PARENTCOLLAPSE ONION_MODE
ANIM OFF
ONION_DISPLAY_GOURAUD GouraudShading
ONION_DISPLAY_GOURAUD_WIRE GouraudShading(Lines)
ONION_DISPLAY_QUICK QuickShading
ONION_DISPLAY_QUICK_WIRE QuickShading(Lines)
ONION_DISPLAY_FLAT ConstantShading
ONION_DISPLAY_FLAT_WIRE ConstantShading(Lines)
ONION_DISPLAY_NOSHADING Lines
ONION_XRAY XRay BOOL
PARENTCOLLAPSE ONION_MODE
ANIM OFF
ONION_FRAMES_BEFORE FramesBefore LONG
MIN 0
ANIM OFF
ONION_COL_FRAMES_BEFORE FramesBeforeColor COLOR
SCALE_H
ANIM OFF
ONION_FRAMES_AFTER FramesAfter LONG
MIN 0
ANIM OFF
ONION_COL_FRAMES_AFTER FramesAfterColor COLOR
SCALE_H
ANIM OFF
ONION_FRAMES_STEP FramesStep LONG
MIN 1
ANIM OFF
ONION_ONLY_RANGE UseRange BOOL ANIM
ONION_FROM Start BASETIME ANIM
ONION_TO End BASETIME ANIM
ONION_USE_KEYS UseKeys BOOL ANIM
ONION_KEYS_BEFORE KeysBefore LONG
MIN 0
ANIM OFF
ONION_COL_KEYS_BEFORE KeysBeforeColor COLOR
SCALE_H
ANIM OFF
ONION_KEYS_AFTER KeysAfter LONG
MIN 0
ANIM OFF
ONION_COL_KEYS_AFTER KeysAfterColor COLOR
SCALE_H
ANIM OFF
ONION_USE_CUSTOM UseCustom BOOL ANIM
ONION_CUSTOM CustomFrames STRING
ANIM OFF
ALIGN_LEFT
ONION_COL_CUSTOM CustomColor COLOR
SCALE_H
ANIM OFF
ONION_CACHE UseCache BOOL ANIM
ONION_CALCULATE CalculateCache BUTTON  
ONION_DELCACHE EmptyCache BUTTON  

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.Osphere)
    tag = obj.MakeTag(c4d.Tdisplay)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.DISPLAYTAG_AFFECT_DISPLAYMODE] = True
    tag[c4d.DISPLAYTAG_SDISPLAYMODE] = c4d.DISPLAYTAG_SDISPLAY_GOURAUD
    tag[c4d.DISPLAYTAG_WDISPLAYMODE] = c4d.DISPLAYTAG_WDISPLAY_WIREFRAME
    tag[c4d.DISPLAYTAG_VDISPLAYMODE] = c4d.DISPLAYTAG_VDISPLAY_DIRECTION
    tag[c4d.DISPLAYTAG_AFFECT_LEVELOFDETAIL] = True
    tag[c4d.DISPLAYTAG_LEVELOFDETAIL] = 0.1
    tag[c4d.DISPLAYTAG_AFFECT_VISIBILITY] = True
    tag[c4d.DISPLAYTAG_VISIBILITY] = 0.1
    tag[c4d.DISPLAYTAG_AFFECT_BACKFACECULLING] = True
    tag[c4d.DISPLAYTAG_BACKFACECULLING] = True
    tag[c4d.DISPLAYTAG_AFFECT_TEXTURES] = True
    tag[c4d.DISPLAYTAG_TEXTURES] = True
    tag[c4d.DISPLAYTAG_AFFECT_REFLECTIONS] = True
    tag[c4d.DISPLAYTAG_REFLECTIONS] = True
    tag[c4d.DISPLAYTAG_AFFECT_TESSELLATION] = True
    tag[c4d.DISPLAYTAG_TESSELLATION] = True
    tag[c4d.ONION_USE] = True
    tag[c4d.ONION_MODE] = c4d.ONION_MODE_OBJECT
    tag[c4d.ONION_SCALE] = 0.1
    tag[c4d.ONION_PSIZE] = 1
    tag[c4d.ONION_DISPLAYMODE] = c4d.ONION_DISPLAY_GOURAUD
    tag[c4d.ONION_XRAY] = True
    tag[c4d.ONION_FRAMES_BEFORE] = 1
    tag[c4d.ONION_FRAMES_AFTER] = 1
    tag[c4d.ONION_FRAMES_STEP] = 1
    tag[c4d.ONION_ONLY_RANGE] = True
    tag[c4d.ONION_USE_KEYS] = True
    tag[c4d.ONION_KEYS_BEFORE] = 1
    tag[c4d.ONION_KEYS_AFTER] = 1
    tag[c4d.ONION_USE_CUSTOM] = True
    tag[c4d.ONION_CUSTOM] = "Hello World"
    tag[c4d.ONION_CACHE] = True
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetBool(c4d.DISPLAYTAG_AFFECT_DISPLAYMODE,True)
    bc.SetInt32(c4d.DISPLAYTAG_SDISPLAYMODE,c4d.DISPLAYTAG_SDISPLAY_GOURAUD)
    bc.SetInt32(c4d.DISPLAYTAG_WDISPLAYMODE,c4d.DISPLAYTAG_WDISPLAY_WIREFRAME)
    bc.SetInt32(c4d.DISPLAYTAG_VDISPLAYMODE,c4d.DISPLAYTAG_VDISPLAY_DIRECTION)
    bc.SetBool(c4d.DISPLAYTAG_AFFECT_LEVELOFDETAIL,True)
    bc.SetFloat(c4d.DISPLAYTAG_LEVELOFDETAIL,0.1)
    bc.SetBool(c4d.DISPLAYTAG_AFFECT_VISIBILITY,True)
    bc.SetFloat(c4d.DISPLAYTAG_VISIBILITY,0.1)
    bc.SetBool(c4d.DISPLAYTAG_AFFECT_BACKFACECULLING,True)
    bc.SetBool(c4d.DISPLAYTAG_BACKFACECULLING,True)
    bc.SetBool(c4d.DISPLAYTAG_AFFECT_TEXTURES,True)
    bc.SetBool(c4d.DISPLAYTAG_TEXTURES,True)
    bc.SetBool(c4d.DISPLAYTAG_AFFECT_REFLECTIONS,True)
    bc.SetBool(c4d.DISPLAYTAG_REFLECTIONS,True)
    bc.SetBool(c4d.DISPLAYTAG_AFFECT_TESSELLATION,True)
    bc.SetBool(c4d.DISPLAYTAG_TESSELLATION,True)
    bc.SetBool(c4d.ONION_USE,True)
    bc.SetInt32(c4d.ONION_MODE,c4d.ONION_MODE_OBJECT)
    bc.SetFloat(c4d.ONION_SCALE,0.1)
    bc.SetInt32(c4d.ONION_PSIZE,1)
    bc.SetInt32(c4d.ONION_DISPLAYMODE,c4d.ONION_DISPLAY_GOURAUD)
    bc.SetBool(c4d.ONION_XRAY,True)
    bc.SetInt32(c4d.ONION_FRAMES_BEFORE,1)
    bc.SetInt32(c4d.ONION_FRAMES_AFTER,1)
    bc.SetInt32(c4d.ONION_FRAMES_STEP,1)
    bc.SetBool(c4d.ONION_ONLY_RANGE,True)
    bc.SetBool(c4d.ONION_USE_KEYS,True)
    bc.SetInt32(c4d.ONION_KEYS_BEFORE,1)
    bc.SetInt32(c4d.ONION_KEYS_AFTER,1)
    bc.SetBool(c4d.ONION_USE_CUSTOM,True)
    bc.SetString(c4d.ONION_CUSTOM,"Hello World")
    bc.SetBool(c4d.ONION_CACHE,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/tdisplay.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Osphere);
    pDoc->InsertObject(pObject);
    pDoc->StartUndo();
    pDoc->AddUndo(UNDOTYPE_NEW,pObject);
    pDoc->EndUndo();
    pDoc->StartUndo();
    BaseTag *pTag = pObject->MakeTag(Tdisplay);
    pDoc->AddUndo(UNDOTYPE_NEW,pTag);
    pDoc->EndUndo();
    pObject->Message(MSG_UPDATE);
    
    //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;
    pTag->SetParameter(DescID(DISPLAYTAG_AFFECT_DISPLAYMODE),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_SDISPLAYMODE),GeData(DISPLAYTAG_SDISPLAY_GOURAUD),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_WDISPLAYMODE),GeData(DISPLAYTAG_WDISPLAY_WIREFRAME),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_VDISPLAYMODE),GeData(DISPLAYTAG_VDISPLAY_DIRECTION),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_AFFECT_LEVELOFDETAIL),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_LEVELOFDETAIL),GeData(0.1),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_AFFECT_VISIBILITY),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_VISIBILITY),GeData(0.1),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_AFFECT_BACKFACECULLING),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_BACKFACECULLING),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_AFFECT_TEXTURES),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_TEXTURES),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_AFFECT_REFLECTIONS),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_REFLECTIONS),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_AFFECT_TESSELLATION),GeData(true),flags);
    pTag->SetParameter(DescID(DISPLAYTAG_TESSELLATION),GeData(true),flags);
    pTag->SetParameter(DescID(ONION_USE),GeData(true),flags);
    pTag->SetParameter(DescID(ONION_MODE),GeData(ONION_MODE_OBJECT),flags);
    pTag->SetParameter(DescID(ONION_SCALE),GeData(0.1),flags);
    pTag->SetParameter(DescID(ONION_PSIZE),GeData(1),flags);
    pTag->SetParameter(DescID(ONION_DISPLAYMODE),GeData(ONION_DISPLAY_GOURAUD),flags);
    pTag->SetParameter(DescID(ONION_XRAY),GeData(true),flags);
    pTag->SetParameter(DescID(ONION_FRAMES_BEFORE),GeData(1),flags);
    pTag->SetParameter(DescID(ONION_FRAMES_AFTER),GeData(1),flags);
    pTag->SetParameter(DescID(ONION_FRAMES_STEP),GeData(1),flags);
    pTag->SetParameter(DescID(ONION_ONLY_RANGE),GeData(true),flags);
    pTag->SetParameter(DescID(ONION_USE_KEYS),GeData(true),flags);
    pTag->SetParameter(DescID(ONION_KEYS_BEFORE),GeData(1),flags);
    pTag->SetParameter(DescID(ONION_KEYS_AFTER),GeData(1),flags);
    pTag->SetParameter(DescID(ONION_USE_CUSTOM),GeData(true),flags);
    pTag->SetParameter(DescID(ONION_CUSTOM),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(ONION_CACHE),GeData(true),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetBool(DISPLAYTAG_AFFECT_DISPLAYMODE,true);
    bc->SetInt32(DISPLAYTAG_SDISPLAYMODE,DISPLAYTAG_SDISPLAY_GOURAUD);
    bc->SetInt32(DISPLAYTAG_WDISPLAYMODE,DISPLAYTAG_WDISPLAY_WIREFRAME);
    bc->SetInt32(DISPLAYTAG_VDISPLAYMODE,DISPLAYTAG_VDISPLAY_DIRECTION);
    bc->SetBool(DISPLAYTAG_AFFECT_LEVELOFDETAIL,true);
    bc->SetFloat(DISPLAYTAG_LEVELOFDETAIL,0.1);
    bc->SetBool(DISPLAYTAG_AFFECT_VISIBILITY,true);
    bc->SetFloat(DISPLAYTAG_VISIBILITY,0.1);
    bc->SetBool(DISPLAYTAG_AFFECT_BACKFACECULLING,true);
    bc->SetBool(DISPLAYTAG_BACKFACECULLING,true);
    bc->SetBool(DISPLAYTAG_AFFECT_TEXTURES,true);
    bc->SetBool(DISPLAYTAG_TEXTURES,true);
    bc->SetBool(DISPLAYTAG_AFFECT_REFLECTIONS,true);
    bc->SetBool(DISPLAYTAG_REFLECTIONS,true);
    bc->SetBool(DISPLAYTAG_AFFECT_TESSELLATION,true);
    bc->SetBool(DISPLAYTAG_TESSELLATION,true);
    bc->SetBool(ONION_USE,true);
    bc->SetInt32(ONION_MODE,ONION_MODE_OBJECT);
    bc->SetFloat(ONION_SCALE,0.1);
    bc->SetInt32(ONION_PSIZE,1);
    bc->SetInt32(ONION_DISPLAYMODE,ONION_DISPLAY_GOURAUD);
    bc->SetBool(ONION_XRAY,true);
    bc->SetInt32(ONION_FRAMES_BEFORE,1);
    bc->SetInt32(ONION_FRAMES_AFTER,1);
    bc->SetInt32(ONION_FRAMES_STEP,1);
    bc->SetBool(ONION_ONLY_RANGE,true);
    bc->SetBool(ONION_USE_KEYS,true);
    bc->SetInt32(ONION_KEYS_BEFORE,1);
    bc->SetInt32(ONION_KEYS_AFTER,1);
    bc->SetBool(ONION_USE_CUSTOM,true);
    bc->SetString(ONION_CUSTOM,"Hello World");
    bc->SetBool(ONION_CACHE,true);
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(tag,c4d.ONION_CALCULATE)
c4d.CallButton(tag,c4d.ONION_DELCACHE)

C++

DescriptionCommand dc;
dc.id = DescID(ONION_CALCULATE);             
pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);

DescriptionCommand dc; dc.id = DescID(ONION_DELCACHE); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);