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 Tannotation

Tannotation

Attributes

  • ENGLISH NAME : AnnotationTag
  • NAME : Tannotation
  • INCLUDE : Tbase
  • PATH : objects/description/tannotation.res
  • PLUGIN : objects
  • MAXON online help (may not exist): TANNOTATION

Elements

ID UI Name Type Parameters Cycle
ANNOTATIONTAG_TEXT Text STRING
ANIM OFF
CUSTOMGUI MULTISTRING
SCALE_V
ANNOTATIONTAG_URL URL STRING ANIM
ANNOTATIONTAG_URL_INFO URLInfo STRING ANIM
ANNOTATIONTAG_URL_GO VisitURL BUTTON  
ANNOTATIONTAG_COLOR Color COLOR ANIM
ANNOTATIONTAG_COLORFROMLAYER InheritfromLayer BOOL ANIM
ANNOTATIONTAG_VIEWPORT_SHOW ShowinViewport BOOL ANIM
ANNOTATIONTAG_VIEWPORT_ALL AllViews BOOL ANIM
ANNOTATIONTAG_SCALEFLAG Scale BOOL ANIM
ANNOTATIONTAG_FOLD Fold BOOL ANIM
ANNOTATIONTAG_EXPORT Export BOOL ANIM
ANNOTATIONTAG_SHOW_ALL Showall BUTTON  
ANNOTATIONTAG_HIDE_ALL Hideall BUTTON  
ANNOTATIONTAG_HIDE_OTHERS Hideallbutthis 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.Tannotation)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.ANNOTATIONTAG_TEXT] = "Hello World"
    tag[c4d.ANNOTATIONTAG_URL] = "Hello World"
    tag[c4d.ANNOTATIONTAG_URL_INFO] = "Hello World"
    tag[c4d.ANNOTATIONTAG_COLORFROMLAYER] = True
    tag[c4d.ANNOTATIONTAG_VIEWPORT_SHOW] = True
    tag[c4d.ANNOTATIONTAG_VIEWPORT_ALL] = True
    tag[c4d.ANNOTATIONTAG_SCALEFLAG] = True
    tag[c4d.ANNOTATIONTAG_FOLD] = True
    tag[c4d.ANNOTATIONTAG_EXPORT] = True
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetString(c4d.ANNOTATIONTAG_TEXT,"Hello World")
    bc.SetString(c4d.ANNOTATIONTAG_URL,"Hello World")
    bc.SetString(c4d.ANNOTATIONTAG_URL_INFO,"Hello World")
    bc.SetBool(c4d.ANNOTATIONTAG_COLORFROMLAYER,True)
    bc.SetBool(c4d.ANNOTATIONTAG_VIEWPORT_SHOW,True)
    bc.SetBool(c4d.ANNOTATIONTAG_VIEWPORT_ALL,True)
    bc.SetBool(c4d.ANNOTATIONTAG_SCALEFLAG,True)
    bc.SetBool(c4d.ANNOTATIONTAG_FOLD,True)
    bc.SetBool(c4d.ANNOTATIONTAG_EXPORT,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../objects/description/tannotation.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(Tannotation);
    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(ANNOTATIONTAG_TEXT),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(ANNOTATIONTAG_URL),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(ANNOTATIONTAG_URL_INFO),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(ANNOTATIONTAG_COLORFROMLAYER),GeData(true),flags);
    pTag->SetParameter(DescID(ANNOTATIONTAG_VIEWPORT_SHOW),GeData(true),flags);
    pTag->SetParameter(DescID(ANNOTATIONTAG_VIEWPORT_ALL),GeData(true),flags);
    pTag->SetParameter(DescID(ANNOTATIONTAG_SCALEFLAG),GeData(true),flags);
    pTag->SetParameter(DescID(ANNOTATIONTAG_FOLD),GeData(true),flags);
    pTag->SetParameter(DescID(ANNOTATIONTAG_EXPORT),GeData(true),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetString(ANNOTATIONTAG_TEXT,"Hello World");
    bc->SetString(ANNOTATIONTAG_URL,"Hello World");
    bc->SetString(ANNOTATIONTAG_URL_INFO,"Hello World");
    bc->SetBool(ANNOTATIONTAG_COLORFROMLAYER,true);
    bc->SetBool(ANNOTATIONTAG_VIEWPORT_SHOW,true);
    bc->SetBool(ANNOTATIONTAG_VIEWPORT_ALL,true);
    bc->SetBool(ANNOTATIONTAG_SCALEFLAG,true);
    bc->SetBool(ANNOTATIONTAG_FOLD,true);
    bc->SetBool(ANNOTATIONTAG_EXPORT,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.ANNOTATIONTAG_URL_GO)
c4d.CallButton(tag,c4d.ANNOTATIONTAG_SHOW_ALL)
c4d.CallButton(tag,c4d.ANNOTATIONTAG_HIDE_ALL)
c4d.CallButton(tag,c4d.ANNOTATIONTAG_HIDE_OTHERS)

C++

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

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