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 Ttexture

Ttexture

Attributes

  • ENGLISH NAME : MaterialTag
  • NAME : Ttexture
  • INCLUDE : Tbase
  • PATH : c4dplugin/description/ttexture.res
  • PLUGIN : c4dplugin
  • MAXON online help (may not exist): TTEXTURE

Elements

ID UI Name Type Parameters Cycle
TEXTURETAG_MATERIAL Material LINK
FIT_H
ANIM MIX
TEXTURETAG_STOPINTERACTIVEMAPPING StopInteractiveMapping BUTTON
FIT_H
HIDDEN
TEXTURETAG_RESTRICTION Selection STRING FIT_H
TEXTURETAG_PROJECTION Projection LONG FIT_H
TEXTURETAG_PROJECTION_SPHERICAL Spherical
TEXTURETAG_PROJECTION_CYLINDRICAL Cylindrical
TEXTURETAG_PROJECTION_FLAT Flat
TEXTURETAG_PROJECTION_CUBIC Cubic
TEXTURETAG_PROJECTION_FRONTAL Frontal
TEXTURETAG_PROJECTION_SPATIAL Spatial
TEXTURETAG_PROJECTION_UVW UVWMapping
TEXTURETAG_PROJECTION_SHRINKWRAP ShrinkWrapping
TEXTURETAG_PROJECTION_CAMERAMAP CameraMapping
TEXTURETAG_PROJECTIONDISPLAY ProjectionDisplay LONG FIT_H
TEXTURETAG_PROJECTIONDISPLAY_NONE Simple
TEXTURETAG_PROJECTIONDISPLAY_GRID Grid
TEXTURETAG_PROJECTIONDISPLAY_SOLID Solid
TEXTURETAG_SIDE Side LONG FIT_H
TEXTURETAG_SIDE_FRONTANDBACK Both
TEXTURETAG_SIDE_FRONT Front
TEXTURETAG_SIDE_BACK Back
TEXTURETAG_CAMERA Camera LINK FIT_H
TEXTURETAG_CAMERA_FILMASPECT FilmAspect REAL
ALIGN_LEFT
MIN 0.01
MAX 10000.0
STEP 0.01
TEXTURETAG_CAMERA_FILMPRESET LONG ANIM
TEXTURETAG_CAMERA_FILMPRESET_CUSTOM Custom
TEXTURETAG_CAMERA_FILMPRESET_SQUARE Square(1:1)
TEXTURETAG_CAMERA_FILMPRESET_STANDARD Standard(4:3)
TEXTURETAG_CAMERA_FILMPRESET_HDTV HDTV(16:9)
TEXTURETAG_CAMERA_FILMPRESET_35MMSTILL 35mmStill(3:2)
TEXTURETAG_CAMERA_FILMPRESET_WIDESCREEN Widescreen(14:9)
TEXTURETAG_CAMERA_FILMPRESET_35MM 35mm(1.85:1)
TEXTURETAG_CAMERA_FILMPRESET_PANAVISION Panavision(2.39:1)
TEXTURETAG_CAMERA_PIXELASPECT PixelAspect REAL
ALIGN_LEFT
MIN 0.01
MAX 10000.0
STEP 0.01
TEXTURETAG_CAMERA_PIXELPRESET LONG ANIM
TEXTURETAG_CAMERA_PIXELPRESET_CUSTOM Custom
TEXTURETAG_CAMERA_PIXELPRESET_SQUARE Square
TEXTURETAG_CAMERA_PIXELPRESET_D1DVNTSC D1/DVNTSC(0.9)
TEXTURETAG_CAMERA_PIXELPRESET_D1DVPAL D1/DVPAL(1.067)
TEXTURETAG_CAMERA_PIXELPRESET_D1DVNTSCWIDESCREEN D1/DVNTSCWidescreen(1.2)
TEXTURETAG_CAMERA_PIXELPRESET_HDVANAMORPHIC HDVAnamorphic(1.333)
TEXTURETAG_CAMERA_PIXELPRESET_D1DVPALWIDESCREEN D1/DVPALWidescreen(1.422)
TEXTURETAG_CAMERA_PIXELPRESET_ANAMORPHIC Anamorphic2:1(2.0)
TEXTURETAG_CAMERA_CALCULATE Calculate BUTTON ALIGN_LEFT
TEXTURETAG_MIX AddMaterial BOOL  
TEXTURETAG_TILE Tile BOOL  
TEXTURETAG_SEAMLESS Seamless BOOL  
TEXTURETAG_UVBUMP UseUVWforBump BOOL  
TEXTURETAG_OFFSETX OffsetU REAL UNIT
TEXTURETAG_OFFSETY OffsetV REAL UNIT
TEXTURETAG_LENGTHX LengthU REAL UNIT
TEXTURETAG_LENGTHY LengthV REAL UNIT
TEXTURETAG_TILESX TilesU REAL STEP
TEXTURETAG_TILESY TilesV REAL STEP
TEXTURETAG_REPETITIONX RepetitionsU REAL
MIN 0
MAX 100000
STEP 1.0
TEXTURETAG_REPETITIONY RepetitionsV REAL
MIN 0
MAX 100000
STEP 1.0
TEXTURETAG_POSITION Position VECTOR
UNIT METER
CUSTOMGUI SUBDESCRIPTION
TEXTURETAG_SIZE Size VECTOR
UNIT METER
STEP 0.01
CUSTOMGUI SUBDESCRIPTION
TEXTURETAG_ROTATION Rotation VECTOR
UNIT DEGREE
CUSTOMGUI SUBDESCRIPTION

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.Ttexture)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.TEXTURETAG_RESTRICTION] = "Hello World"
    tag[c4d.TEXTURETAG_PROJECTION] = c4d.TEXTURETAG_PROJECTION_SPHERICAL
    tag[c4d.TEXTURETAG_PROJECTIONDISPLAY] = c4d.TEXTURETAG_PROJECTIONDISPLAY_NONE
    tag[c4d.TEXTURETAG_SIDE] = c4d.TEXTURETAG_SIDE_FRONTANDBACK
    tag[c4d.TEXTURETAG_CAMERA_FILMASPECT] = 0.1
    tag[c4d.TEXTURETAG_CAMERA_FILMPRESET] = c4d.TEXTURETAG_CAMERA_FILMPRESET_CUSTOM
    tag[c4d.TEXTURETAG_CAMERA_PIXELASPECT] = 0.1
    tag[c4d.TEXTURETAG_CAMERA_PIXELPRESET] = c4d.TEXTURETAG_CAMERA_PIXELPRESET_CUSTOM
    tag[c4d.TEXTURETAG_MIX] = True
    tag[c4d.TEXTURETAG_TILE] = True
    tag[c4d.TEXTURETAG_SEAMLESS] = True
    tag[c4d.TEXTURETAG_UVBUMP] = True
    tag[c4d.TEXTURETAG_OFFSETX] = 0.1
    tag[c4d.TEXTURETAG_OFFSETY] = 0.1
    tag[c4d.TEXTURETAG_LENGTHX] = 0.1
    tag[c4d.TEXTURETAG_LENGTHY] = 0.1
    tag[c4d.TEXTURETAG_TILESX] = 0.1
    tag[c4d.TEXTURETAG_TILESY] = 0.1
    tag[c4d.TEXTURETAG_REPETITIONX] = 0.1
    tag[c4d.TEXTURETAG_REPETITIONY] = 0.1
    tag[c4d.TEXTURETAG_POSITION] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.TEXTURETAG_SIZE] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.TEXTURETAG_ROTATION] = c4d.Vector(1.0,1.0,1.0)
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetString(c4d.TEXTURETAG_RESTRICTION,"Hello World")
    bc.SetInt32(c4d.TEXTURETAG_PROJECTION,c4d.TEXTURETAG_PROJECTION_SPHERICAL)
    bc.SetInt32(c4d.TEXTURETAG_PROJECTIONDISPLAY,c4d.TEXTURETAG_PROJECTIONDISPLAY_NONE)
    bc.SetInt32(c4d.TEXTURETAG_SIDE,c4d.TEXTURETAG_SIDE_FRONTANDBACK)
    bc.SetFloat(c4d.TEXTURETAG_CAMERA_FILMASPECT,0.1)
    bc.SetInt32(c4d.TEXTURETAG_CAMERA_FILMPRESET,c4d.TEXTURETAG_CAMERA_FILMPRESET_CUSTOM)
    bc.SetFloat(c4d.TEXTURETAG_CAMERA_PIXELASPECT,0.1)
    bc.SetInt32(c4d.TEXTURETAG_CAMERA_PIXELPRESET,c4d.TEXTURETAG_CAMERA_PIXELPRESET_CUSTOM)
    bc.SetBool(c4d.TEXTURETAG_MIX,True)
    bc.SetBool(c4d.TEXTURETAG_TILE,True)
    bc.SetBool(c4d.TEXTURETAG_SEAMLESS,True)
    bc.SetBool(c4d.TEXTURETAG_UVBUMP,True)
    bc.SetFloat(c4d.TEXTURETAG_OFFSETX,0.1)
    bc.SetFloat(c4d.TEXTURETAG_OFFSETY,0.1)
    bc.SetFloat(c4d.TEXTURETAG_LENGTHX,0.1)
    bc.SetFloat(c4d.TEXTURETAG_LENGTHY,0.1)
    bc.SetFloat(c4d.TEXTURETAG_TILESX,0.1)
    bc.SetFloat(c4d.TEXTURETAG_TILESY,0.1)
    bc.SetFloat(c4d.TEXTURETAG_REPETITIONX,0.1)
    bc.SetFloat(c4d.TEXTURETAG_REPETITIONY,0.1)
    bc.SetVector(c4d.TEXTURETAG_POSITION, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.TEXTURETAG_SIZE, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.TEXTURETAG_ROTATION, c4d.Vector(1.0,1.0,1.0)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/ttexture.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(Ttexture);
    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(TEXTURETAG_RESTRICTION),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(TEXTURETAG_PROJECTION),GeData(TEXTURETAG_PROJECTION_SPHERICAL),flags);
    pTag->SetParameter(DescID(TEXTURETAG_PROJECTIONDISPLAY),GeData(TEXTURETAG_PROJECTIONDISPLAY_NONE),flags);
    pTag->SetParameter(DescID(TEXTURETAG_SIDE),GeData(TEXTURETAG_SIDE_FRONTANDBACK),flags);
    pTag->SetParameter(DescID(TEXTURETAG_CAMERA_FILMASPECT),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_CAMERA_FILMPRESET),GeData(TEXTURETAG_CAMERA_FILMPRESET_CUSTOM),flags);
    pTag->SetParameter(DescID(TEXTURETAG_CAMERA_PIXELASPECT),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_CAMERA_PIXELPRESET),GeData(TEXTURETAG_CAMERA_PIXELPRESET_CUSTOM),flags);
    pTag->SetParameter(DescID(TEXTURETAG_MIX),GeData(true),flags);
    pTag->SetParameter(DescID(TEXTURETAG_TILE),GeData(true),flags);
    pTag->SetParameter(DescID(TEXTURETAG_SEAMLESS),GeData(true),flags);
    pTag->SetParameter(DescID(TEXTURETAG_UVBUMP),GeData(true),flags);
    pTag->SetParameter(DescID(TEXTURETAG_OFFSETX),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_OFFSETY),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_LENGTHX),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_LENGTHY),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_TILESX),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_TILESY),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_REPETITIONX),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_REPETITIONY),GeData(0.1),flags);
    pTag->SetParameter(DescID(TEXTURETAG_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(TEXTURETAG_SIZE),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(TEXTURETAG_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetString(TEXTURETAG_RESTRICTION,"Hello World");
    bc->SetInt32(TEXTURETAG_PROJECTION,TEXTURETAG_PROJECTION_SPHERICAL);
    bc->SetInt32(TEXTURETAG_PROJECTIONDISPLAY,TEXTURETAG_PROJECTIONDISPLAY_NONE);
    bc->SetInt32(TEXTURETAG_SIDE,TEXTURETAG_SIDE_FRONTANDBACK);
    bc->SetFloat(TEXTURETAG_CAMERA_FILMASPECT,0.1);
    bc->SetInt32(TEXTURETAG_CAMERA_FILMPRESET,TEXTURETAG_CAMERA_FILMPRESET_CUSTOM);
    bc->SetFloat(TEXTURETAG_CAMERA_PIXELASPECT,0.1);
    bc->SetInt32(TEXTURETAG_CAMERA_PIXELPRESET,TEXTURETAG_CAMERA_PIXELPRESET_CUSTOM);
    bc->SetBool(TEXTURETAG_MIX,true);
    bc->SetBool(TEXTURETAG_TILE,true);
    bc->SetBool(TEXTURETAG_SEAMLESS,true);
    bc->SetBool(TEXTURETAG_UVBUMP,true);
    bc->SetFloat(TEXTURETAG_OFFSETX,0.1);
    bc->SetFloat(TEXTURETAG_OFFSETY,0.1);
    bc->SetFloat(TEXTURETAG_LENGTHX,0.1);
    bc->SetFloat(TEXTURETAG_LENGTHY,0.1);
    bc->SetFloat(TEXTURETAG_TILESX,0.1);
    bc->SetFloat(TEXTURETAG_TILESY,0.1);
    bc->SetFloat(TEXTURETAG_REPETITIONX,0.1);
    bc->SetFloat(TEXTURETAG_REPETITIONY,0.1);
    bc->SetVector(TEXTURETAG_POSITION, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(TEXTURETAG_SIZE, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(TEXTURETAG_ROTATION, c4d.Vector(1.0,1.0,1.0);
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(tag,c4d.TEXTURETAG_STOPINTERACTIVEMAPPING)
c4d.CallButton(tag,c4d.TEXTURETAG_CAMERA_CALCULATE)

C++

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

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