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 Tcavs

Tcavs

Attributes

  • ENGLISH NAME : VisualSelector
  • NAME : Tcavs
  • INCLUDE : Tbase
  • PATH : ca/description/tcavs.res
  • PLUGIN : ca
  • MAXON online help (may not exist): TCAVS

Elements

ID UI Name Type Parameters Cycle
ID_CA_TAG_VS_IMAGE IMAGE SCALE_V
ID_CA_TAG_VS_MODE Mode LONG
SCALE_H
ANIM OFF
CUSTOMGUI RADIOBUTTONS
COLUMNS 2
ID_CA_TAG_VS_MODE_EDIT Edit
ID_CA_TAG_VS_MODE_ANIMATE Animate
ID_CA_TAG_VS_HOTSPOTS ITEMTREE DRAGDROP
ID_CA_TAG_VS_ADD_VIEW AddView BUTTON SCALE_H
ID_CA_TAG_VS_ADD_HOTSPOT AddHotspot BUTTON SCALE_H
ID_CA_TAG_VS_REMOVE Remove BUTTON SCALE_H
ID_CA_TAG_VS_IMAGE_NAME Image TEXTURE ANIM
ID_CA_TAG_VS_ZOOM Zoom REAL
UNIT PERCENT
MIN 0.0
MAXSLIDER 400.0
MAX 1600
CUSTOMGUI REALSLIDER
ANIM OFF
PARENTCOLLAPSE
ID_CA_TAG_VS_LEFT Left LONG
ANIM OFF
PARENTCOLLAPSE ID_CA_TAG_VS_ZOOM
MIN 0
MAXSLIDER 2000
ID_CA_TAG_VS_TOP Top LONG
ANIM OFF
PARENTCOLLAPSE ID_CA_TAG_VS_ZOOM
MIN 0
MAXSLIDER 2000
ID_CA_TAG_VS_RIGHT Right LONG
ANIM OFF
PARENTCOLLAPSE ID_CA_TAG_VS_ZOOM
MIN 0
MAXSLIDER 2000
ID_CA_TAG_VS_BOTTOM Bottom LONG
ANIM OFF
PARENTCOLLAPSE ID_CA_TAG_VS_ZOOM
MIN 0
MAXSLIDER 2000
ID_CA_TAG_VS_COL Color COLOR ANIM
ID_CA_TAG_VS_TRANS Transparency REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ANIM OFF
PARENTCOLLAPSE
ID_CA_TAG_VS_HIGHLIGHT_COL Highlight COLOR
ANIM OFF
PARENTCOLLAPSE ID_CA_TAG_VS_TRANS
ID_CA_TAG_VS_HIGHLIGHT_TRANS Transparency REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ANIM OFF
PARENTCOLLAPSE ID_CA_TAG_VS_TRANS
ID_CA_TAG_VS_SELECT_COL Selected COLOR
ANIM OFF
PARENTCOLLAPSE ID_CA_TAG_VS_TRANS
ID_CA_TAG_VS_SELECT_TRANS Transparency REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
ANIM OFF
PARENTCOLLAPSE ID_CA_TAG_VS_TRANS
ID_CA_TAG_VS_LINK Link LINK ANIM
ID_CA_TAG_VS_ACTION Action LONG ANIM
ID_CA_TAG_VS_ACTION_NONE None
ID_CA_TAG_VS_ACTION_MOVE Move
ID_CA_TAG_VS_ACTION_SCALE Scale
ID_CA_TAG_VS_ACTION_ROTATE Rotate
ID_CA_TAG_VS_ACTION_COMMAND Command
ID_CA_TAG_VS_ACTION_VIEW View
ID_CA_TAG_VS_ACTION_SCRIPT Python
ID_CA_TAG_VS_COMMAND Command STRING
HIDDEN
ANIM OFF
ID_CA_TAG_VS_PYTHON Script STRING
CUSTOMGUI MULTISTRING
ANIM OFF
PYTHON
HIDDEN
SCALE_V
ID_CA_TAG_VS_VIEW Views LONG
ANIM OFF
HIDDEN
ID_CA_TAG_VS_BRUSH Brush LONG
MIN 1
MAXSLIDER 1000
CUSTOMGUI LONGSLIDER
ANIM OFF
ID_CA_TAG_VS_LASSO Lasso LONG
HIDDEN
ANIM OFF
ID_CA_TAG_VS_LASSO_FREE Free
ID_CA_TAG_VS_LASSO_POLY Polygon
ID_CA_TAG_VS_LASSO_RECT Rectangle
ID_CA_TAG_VS_SHAPE Shape LONG
HIDDEN
ANIM OFF
ID_CA_TAG_VS_SHAPE_RECT Rectangle
ID_CA_TAG_VS_SHAPE_ELLIPSE Ellipse

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.Tcavs)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.ID_CA_TAG_VS_MODE] = c4d.ID_CA_TAG_VS_MODE_EDIT
    tag[c4d.ID_CA_TAG_VS_ZOOM] = 0.1
    tag[c4d.ID_CA_TAG_VS_LEFT] = 1
    tag[c4d.ID_CA_TAG_VS_TOP] = 1
    tag[c4d.ID_CA_TAG_VS_RIGHT] = 1
    tag[c4d.ID_CA_TAG_VS_BOTTOM] = 1
    tag[c4d.ID_CA_TAG_VS_TRANS] = 0.1
    tag[c4d.ID_CA_TAG_VS_HIGHLIGHT_TRANS] = 0.1
    tag[c4d.ID_CA_TAG_VS_SELECT_TRANS] = 0.1
    tag[c4d.ID_CA_TAG_VS_ACTION] = c4d.ID_CA_TAG_VS_ACTION_NONE
    tag[c4d.ID_CA_TAG_VS_COMMAND] = "Hello World"
    tag[c4d.ID_CA_TAG_VS_PYTHON] = "Hello World"
    tag[c4d.ID_CA_TAG_VS_VIEW] = 1
    tag[c4d.ID_CA_TAG_VS_BRUSH] = 1
    tag[c4d.ID_CA_TAG_VS_LASSO] = c4d.ID_CA_TAG_VS_LASSO_FREE
    tag[c4d.ID_CA_TAG_VS_SHAPE] = c4d.ID_CA_TAG_VS_SHAPE_RECT
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetInt32(c4d.ID_CA_TAG_VS_MODE,c4d.ID_CA_TAG_VS_MODE_EDIT)
    bc.SetFloat(c4d.ID_CA_TAG_VS_ZOOM,0.1)
    bc.SetInt32(c4d.ID_CA_TAG_VS_LEFT,1)
    bc.SetInt32(c4d.ID_CA_TAG_VS_TOP,1)
    bc.SetInt32(c4d.ID_CA_TAG_VS_RIGHT,1)
    bc.SetInt32(c4d.ID_CA_TAG_VS_BOTTOM,1)
    bc.SetFloat(c4d.ID_CA_TAG_VS_TRANS,0.1)
    bc.SetFloat(c4d.ID_CA_TAG_VS_HIGHLIGHT_TRANS,0.1)
    bc.SetFloat(c4d.ID_CA_TAG_VS_SELECT_TRANS,0.1)
    bc.SetInt32(c4d.ID_CA_TAG_VS_ACTION,c4d.ID_CA_TAG_VS_ACTION_NONE)
    bc.SetString(c4d.ID_CA_TAG_VS_COMMAND,"Hello World")
    bc.SetString(c4d.ID_CA_TAG_VS_PYTHON,"Hello World")
    bc.SetInt32(c4d.ID_CA_TAG_VS_VIEW,1)
    bc.SetInt32(c4d.ID_CA_TAG_VS_BRUSH,1)
    bc.SetInt32(c4d.ID_CA_TAG_VS_LASSO,c4d.ID_CA_TAG_VS_LASSO_FREE)
    bc.SetInt32(c4d.ID_CA_TAG_VS_SHAPE,c4d.ID_CA_TAG_VS_SHAPE_RECT)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../ca/description/tcavs.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(Tcavs);
    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(ID_CA_TAG_VS_MODE),GeData(ID_CA_TAG_VS_MODE_EDIT),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_ZOOM),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_LEFT),GeData(1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_TOP),GeData(1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_RIGHT),GeData(1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_BOTTOM),GeData(1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_TRANS),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_HIGHLIGHT_TRANS),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_SELECT_TRANS),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_ACTION),GeData(ID_CA_TAG_VS_ACTION_NONE),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_COMMAND),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_PYTHON),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_VIEW),GeData(1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_BRUSH),GeData(1),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_LASSO),GeData(ID_CA_TAG_VS_LASSO_FREE),flags);
    pTag->SetParameter(DescID(ID_CA_TAG_VS_SHAPE),GeData(ID_CA_TAG_VS_SHAPE_RECT),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetInt32(ID_CA_TAG_VS_MODE,ID_CA_TAG_VS_MODE_EDIT);
    bc->SetFloat(ID_CA_TAG_VS_ZOOM,0.1);
    bc->SetInt32(ID_CA_TAG_VS_LEFT,1);
    bc->SetInt32(ID_CA_TAG_VS_TOP,1);
    bc->SetInt32(ID_CA_TAG_VS_RIGHT,1);
    bc->SetInt32(ID_CA_TAG_VS_BOTTOM,1);
    bc->SetFloat(ID_CA_TAG_VS_TRANS,0.1);
    bc->SetFloat(ID_CA_TAG_VS_HIGHLIGHT_TRANS,0.1);
    bc->SetFloat(ID_CA_TAG_VS_SELECT_TRANS,0.1);
    bc->SetInt32(ID_CA_TAG_VS_ACTION,ID_CA_TAG_VS_ACTION_NONE);
    bc->SetString(ID_CA_TAG_VS_COMMAND,"Hello World");
    bc->SetString(ID_CA_TAG_VS_PYTHON,"Hello World");
    bc->SetInt32(ID_CA_TAG_VS_VIEW,1);
    bc->SetInt32(ID_CA_TAG_VS_BRUSH,1);
    bc->SetInt32(ID_CA_TAG_VS_LASSO,ID_CA_TAG_VS_LASSO_FREE);
    bc->SetInt32(ID_CA_TAG_VS_SHAPE,ID_CA_TAG_VS_SHAPE_RECT);
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(tag,c4d.ID_CA_TAG_VS_ADD_VIEW)
c4d.CallButton(tag,c4d.ID_CA_TAG_VS_ADD_HOTSPOT)
c4d.CallButton(tag,c4d.ID_CA_TAG_VS_REMOVE)

C++

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

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