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 Trestriction

Trestriction

Attributes

  • ENGLISH NAME : RestrictionTag
  • NAME : Trestriction
  • INCLUDE : Tbase
  • PATH : c4dplugin/description/trestriction.res
  • PLUGIN : c4dplugin
  • MAXON online help (may not exist): TRESTRICTION

Elements

ID UI Name Type Parameters Cycle
RESTRICTIONTAG_NAME_01 Name[1] STRING SCALE_H
RESTRICTIONTAG_VAL_01 Strength[1] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_02 Name[2] STRING SCALE_H
RESTRICTIONTAG_VAL_02 Strength[2] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_03 Name[3] STRING SCALE_H
RESTRICTIONTAG_VAL_03 Strength[3] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_04 Name[4] STRING SCALE_H
RESTRICTIONTAG_VAL_04 Strength[4] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_05 Name[5] STRING SCALE_H
RESTRICTIONTAG_VAL_05 Strength[5] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_06 Name[6] STRING SCALE_H
RESTRICTIONTAG_VAL_06 Strength[6] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_07 Name[7] STRING SCALE_H
RESTRICTIONTAG_VAL_07 Strength[7] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_08 Name[8] STRING SCALE_H
RESTRICTIONTAG_VAL_08 Strength[8] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_09 Name[9] STRING SCALE_H
RESTRICTIONTAG_VAL_09 Strength[9] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_10 Name[10] STRING SCALE_H
RESTRICTIONTAG_VAL_10 Strength[10] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_11 Name[11] STRING SCALE_H
RESTRICTIONTAG_VAL_11 Strength[11] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
RESTRICTIONTAG_NAME_12 Name[12] STRING SCALE_H
RESTRICTIONTAG_VAL_12 Strength[12] REAL
UNIT PERCENT
MIN 0.0
MAX 100.0

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.Trestriction)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.RESTRICTIONTAG_NAME_01] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_01] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_02] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_02] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_03] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_03] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_04] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_04] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_05] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_05] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_06] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_06] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_07] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_07] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_08] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_08] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_09] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_09] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_10] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_10] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_11] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_11] = 0.1
    tag[c4d.RESTRICTIONTAG_NAME_12] = "Hello World"
    tag[c4d.RESTRICTIONTAG_VAL_12] = 0.1
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetString(c4d.RESTRICTIONTAG_NAME_01,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_01,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_02,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_02,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_03,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_03,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_04,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_04,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_05,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_05,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_06,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_06,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_07,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_07,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_08,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_08,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_09,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_09,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_10,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_10,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_11,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_11,0.1)
    bc.SetString(c4d.RESTRICTIONTAG_NAME_12,"Hello World")
    bc.SetFloat(c4d.RESTRICTIONTAG_VAL_12,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/trestriction.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(Trestriction);
    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(RESTRICTIONTAG_NAME_01),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_01),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_02),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_02),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_03),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_03),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_04),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_04),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_05),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_05),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_06),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_06),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_07),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_07),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_08),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_08),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_09),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_09),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_10),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_10),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_11),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_11),GeData(0.1),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_NAME_12),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(RESTRICTIONTAG_VAL_12),GeData(0.1),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetString(RESTRICTIONTAG_NAME_01,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_01,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_02,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_02,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_03,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_03,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_04,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_04,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_05,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_05,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_06,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_06,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_07,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_07,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_08,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_08,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_09,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_09,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_10,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_10,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_11,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_11,0.1);
    bc->SetString(RESTRICTIONTAG_NAME_12,"Hello World");
    bc->SetFloat(RESTRICTIONTAG_VAL_12,0.1);
    pTag->Message(MSG_UPDATE);                                                      
}