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 XSLATiles

XSLATiles

Attributes

  • ENGLISH NAME : TileShader
  • NAME : XSLATiles
  • INCLUDE : Mpreview
  • INCLUDE : Xbase
  • PATH : sla/description/xslatiles.res
  • PLUGIN : sla
  • MAXON online help (may not exist): XSLATILES

Elements

ID UI Name Type Parameters Cycle
SLA_TILES_GROUT_COLOR GroutColor COLOR  
SLA_TILES_TILE_COLOR_1 TilesColor1 COLOR  
SLA_TILES_TILE_COLOR_2 TilesColor2 COLOR  
SLA_TILES_TILE_COLOR_3 TilesColor3 COLOR  
SLA_TILES_PATTERN Pattern LONG  
SLA_TILES_PATTERN_BRICK1 Brick1
SLA_TILES_PATTERN_BRICK2 Brick2
SLA_TILES_PATTERN_CIRCLES1 Circles1
SLA_TILES_PATTERN_CIRCLES2 Circles2
SLA_TILES_PATTERN_CIRCLES3 Circles3
SLA_TILES_PATTERN_HEXAGONS Hexagons
SLA_TILES_PATTERN_LINES1 Lines1
SLA_TILES_PATTERN_LINES2 Lines2
SLA_TILES_PATTERN_PARQUET Parquet
SLA_TILES_PATTERN_PLANKS Planks
SLA_TILES_PATTERN_RADIAL_LINES1 RadialLines1
SLA_TILES_PATTERN_RADIAL_LINES2 RadialLines2
SLA_TILES_PATTERN_RANDOM Random
SLA_TILES_PATTERN_RINGS1 Rings1
SLA_TILES_PATTERN_RINGS2 Rings2
SLA_TILES_PATTERN_SAWTOOTH1 Sawtooth1
SLA_TILES_PATTERN_SAWTOOTH2 Sawtooth2
SLA_TILES_PATTERN_SCALES1 Scales1
SLA_TILES_PATTERN_SCALES2 Scales2
SLA_TILES_PATTERN_SPIRAL1 Spiral1
SLA_TILES_PATTERN_SPIRAL2 Spiral2
SLA_TILES_PATTERN_SQUARES Squares
SLA_TILES_PATTERN_TRIANGLES1 Triangles1
SLA_TILES_PATTERN_TRIANGLES2 Triangles2
SLA_TILES_PATTERN_TRIANGLES3 Triangles3
SLA_TILES_PATTERN_WAVES1 Waves1
SLA_TILES_PATTERN_WAVES2 Waves2
SLA_TILES_PATTERN_WEAVE Weave
SLA_TILES_GROUT_WIDTH GroutWidth REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
SLA_TILES_BEVEL_WIDTH BevelWidth REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
SLA_TILES_SMOOTH_BEVEL Bevel BOOL  
SLA_TILES_RANDOMIZE_COLOR RandomizeColor BOOL  
SLA_TILES_ORIENTATION Orientation LONG  
SLA_TILES_ORIENTATION_U U
SLA_TILES_ORIENTATION_V V
SLA_TILES_GLOBAL_SCALE GlobalScale REAL
UNIT PERCENT
MIN 0.0
SLA_TILES_U_SCALE UScale REAL
UNIT PERCENT
MIN 0.0
SLA_TILES_V_SCALE VScale REAL
UNIT PERCENT
MIN 0.0
SLA_TILES_RADIAL_SCALE RadialScale REAL
UNIT PERCENT
MIN 0.0
SLA_TILES_ROTATE Rotate REAL UNIT
SLA_TILES_DELTA Delta REAL
UNIT PERCENT
MIN 0.0
SLA_TILES_SEED Seed LONG  

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():
    shader = c4d.BaseShader(c4d.Xtiles)
    
    #You can set parameters two different ways. 
    #First way              
    shader[c4d.SLA_TILES_PATTERN] = c4d.SLA_TILES_PATTERN_BRICK1
    shader[c4d.SLA_TILES_GROUT_WIDTH] = 0.1
    shader[c4d.SLA_TILES_BEVEL_WIDTH] = 0.1
    shader[c4d.SLA_TILES_SMOOTH_BEVEL] = True
    shader[c4d.SLA_TILES_RANDOMIZE_COLOR] = True
    shader[c4d.SLA_TILES_ORIENTATION] = c4d.SLA_TILES_ORIENTATION_U
    shader[c4d.SLA_TILES_GLOBAL_SCALE] = 0.1
    shader[c4d.SLA_TILES_U_SCALE] = 0.1
    shader[c4d.SLA_TILES_V_SCALE] = 0.1
    shader[c4d.SLA_TILES_RADIAL_SCALE] = 0.1
    shader[c4d.SLA_TILES_ROTATE] = 0.1
    shader[c4d.SLA_TILES_DELTA] = 0.1
    shader[c4d.SLA_TILES_SEED] = 1
    
    #Second way, using the base container.
    bc = shader.GetDataInstance()
    bc.SetInt32(c4d.SLA_TILES_PATTERN,c4d.SLA_TILES_PATTERN_BRICK1)
    bc.SetFloat(c4d.SLA_TILES_GROUT_WIDTH,0.1)
    bc.SetFloat(c4d.SLA_TILES_BEVEL_WIDTH,0.1)
    bc.SetBool(c4d.SLA_TILES_SMOOTH_BEVEL,True)
    bc.SetBool(c4d.SLA_TILES_RANDOMIZE_COLOR,True)
    bc.SetInt32(c4d.SLA_TILES_ORIENTATION,c4d.SLA_TILES_ORIENTATION_U)
    bc.SetFloat(c4d.SLA_TILES_GLOBAL_SCALE,0.1)
    bc.SetFloat(c4d.SLA_TILES_U_SCALE,0.1)
    bc.SetFloat(c4d.SLA_TILES_V_SCALE,0.1)
    bc.SetFloat(c4d.SLA_TILES_RADIAL_SCALE,0.1)
    bc.SetFloat(c4d.SLA_TILES_ROTATE,0.1)
    bc.SetFloat(c4d.SLA_TILES_DELTA,0.1)
    bc.SetInt32(c4d.SLA_TILES_SEED,1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../sla/description/xslatiles.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseShader *pShader = BaseShader::Alloc(Xtiles);  
    
    //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;
    pShader->SetParameter(DescID(SLA_TILES_PATTERN),GeData(SLA_TILES_PATTERN_BRICK1),flags);
    pShader->SetParameter(DescID(SLA_TILES_GROUT_WIDTH),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_TILES_BEVEL_WIDTH),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_TILES_SMOOTH_BEVEL),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_TILES_RANDOMIZE_COLOR),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_TILES_ORIENTATION),GeData(SLA_TILES_ORIENTATION_U),flags);
    pShader->SetParameter(DescID(SLA_TILES_GLOBAL_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_TILES_U_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_TILES_V_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_TILES_RADIAL_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_TILES_ROTATE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_TILES_DELTA),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_TILES_SEED),GeData(1),flags);
    pShader->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pShader->GetDataInstance();
    bc->SetInt32(SLA_TILES_PATTERN,SLA_TILES_PATTERN_BRICK1);
    bc->SetFloat(SLA_TILES_GROUT_WIDTH,0.1);
    bc->SetFloat(SLA_TILES_BEVEL_WIDTH,0.1);
    bc->SetBool(SLA_TILES_SMOOTH_BEVEL,true);
    bc->SetBool(SLA_TILES_RANDOMIZE_COLOR,true);
    bc->SetInt32(SLA_TILES_ORIENTATION,SLA_TILES_ORIENTATION_U);
    bc->SetFloat(SLA_TILES_GLOBAL_SCALE,0.1);
    bc->SetFloat(SLA_TILES_U_SCALE,0.1);
    bc->SetFloat(SLA_TILES_V_SCALE,0.1);
    bc->SetFloat(SLA_TILES_RADIAL_SCALE,0.1);
    bc->SetFloat(SLA_TILES_ROTATE,0.1);
    bc->SetFloat(SLA_TILES_DELTA,0.1);
    bc->SetInt32(SLA_TILES_SEED,1);
    pShader->Message(MSG_UPDATE);                                                      
}