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 XSLALumas

XSLALumas

Attributes

  • ENGLISH NAME : LumasShader
  • NAME : XSLALumas
  • INCLUDE : Mpreview
  • INCLUDE : Xbase
  • PATH : sla/description/xslalumas.res
  • PLUGIN : sla
  • MAXON online help (may not exist): XSLALUMAS

Elements

ID UI Name Type Parameters Cycle
SLA_LUMAS_DIFFUSE_ACTIVE Active BOOL  
SLA_LUMAS_DIFFUSE_COLOR Color COLOR  
SLA_LUMAS_DIFFUSE_ALGORITHM Algorithm LONG  
SLA_LUMAS_DIFFUSE_ALGO_INTERNAL Internal
SLA_LUMAS_DIFFUSE_ALGO_ORENNAYAR OrenNayar
SLA_LUMAS_DIFFUSE_ROUGHNESS Roughness REAL
MIN 0
MAX 200
UNIT PERCENT
SLA_LUMAS_DIFFUSE_ILLUMINATION Illumination REAL
MIN 0
MAX 1000
UNIT PERCENT
SLA_LUMAS_DIFFUSE_CONTRAST Contrast REAL
MIN -1000
MAX 1000
UNIT PERCENT
SLA_LUMAS_SPECULAR1_ACTIVE Active BOOL  
SLA_LUMAS_SPECULAR1_COLOR Color COLOR  
SLA_LUMAS_SPECULAR1_INTENSITY Intensity REAL
MIN 0
MAX 1000
UNIT PERCENT
SLA_LUMAS_SPECULAR1_SIZE Size REAL
MIN 0
MAX 200
UNIT PERCENT
SLA_LUMAS_SPECULAR1_CONTRAST Contrast REAL
MIN 0
MAX 100
UNIT PERCENT
SLA_LUMAS_SPECULAR1_GLARE Glare REAL
MIN 0
MAX 1000
UNIT PERCENT
SLA_LUMAS_SPECULAR1_FALLOFF Falloff REAL
MIN 0
UNIT PERCENT
SLA_LUMAS_SPECULAR2_ACTIVE Active BOOL  
SLA_LUMAS_SPECULAR2_COLOR Color COLOR  
SLA_LUMAS_SPECULAR2_INTENSITY Intensity REAL
MIN 0
MAX 1000
UNIT PERCENT
SLA_LUMAS_SPECULAR2_SIZE Size REAL
MIN 0
MAX 200
UNIT PERCENT
SLA_LUMAS_SPECULAR2_CONTRAST Contrast REAL
MIN 0
MAX 100
UNIT PERCENT
SLA_LUMAS_SPECULAR2_GLARE Glare REAL
MIN 0
MAX 1000
UNIT PERCENT
SLA_LUMAS_SPECULAR2_FALLOFF Falloff REAL
MIN 0
UNIT PERCENT
SLA_LUMAS_SPECULAR3_ACTIVE Active BOOL  
SLA_LUMAS_SPECULAR3_COLOR Color COLOR  
SLA_LUMAS_SPECULAR3_INTENSITY Intensity REAL
MIN 0
MAX 1000
UNIT PERCENT
SLA_LUMAS_SPECULAR3_SIZE Size REAL
MIN 0.01
MAX 200
UNIT PERCENT
SLA_LUMAS_SPECULAR3_CONTRAST Contrast REAL
MIN 0
MAX 100
UNIT PERCENT
SLA_LUMAS_SPECULAR3_GLARE Glare REAL
MIN 0
MAX 1000
UNIT PERCENT
SLA_LUMAS_SPECULAR3_FALLOFF Falloff REAL
MIN 0
UNIT PERCENT
SLA_LUMAS_ANISO_ACTIVE Active BOOL  
SLA_LUMAS_ANISO_PROJECTION Projection LONG  
SLA_LUMAS_ANISO_PROJECTION_PLANAR Planar
SLA_LUMAS_ANISO_PROJECTION_AUTO_PLANAR AutoPlanar
SLA_LUMAS_ANISO_PROJECTION_SHRINK_WRAP ShrinkWrap
SLA_LUMAS_ANISO_PROJECTION_RAD_AUTO_PLANAR RadialAutoPlanar
SLA_LUMAS_ANISO_PROJECTION_RAD_PAT_AUTO_PLANAR RadialPatternAutoPlanar
SLA_LUMAS_ANISO_PROJECTION_RAD_PLANAR RadialPlanar
SLA_LUMAS_ANISO_PROJECTION_RAD_PATTERN_PLANAR RadialPatternPlanar
SLA_LUMAS_ANISO_PROJ_SCALE ProjectionScale REAL
MIN 0
MAX 1000
UNIT PERCENT
SLA_LUMAS_ANISO_X_ROUGH XRoughness REAL
MIN 0
UNIT PERCENT
SLA_LUMAS_ANISO_Y_ROUGH YRoughness REAL
MIN 0
UNIT PERCENT
SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC1 Specular1 BOOL  
SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC2 Specular2 BOOL  
SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC3 Specular3 BOOL  
SLA_LUMAS_ANISO_AMPLITUDE Amplitude REAL
MIN 0
MAX 100
UNIT PERCENT
SLA_LUMAS_ANISO_SCALE Scale REAL
MIN 0
UNIT PERCENT
SLA_LUMAS_ANISO_LENGTH Length REAL
MIN 0
UNIT PERCENT
SLA_LUMAS_ANISO_ATTENUATION Attenuation REAL
MIN 0
UNIT PERCENT
SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC1 Specular1 BOOL  
SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC2 Specular2 BOOL  
SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC3 Specular3 BOOL  

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.Xlumas)
    
    #You can set parameters two different ways. 
    #First way              
    shader[c4d.SLA_LUMAS_DIFFUSE_ACTIVE] = True
    shader[c4d.SLA_LUMAS_DIFFUSE_ALGORITHM] = c4d.SLA_LUMAS_DIFFUSE_ALGO_INTERNAL
    shader[c4d.SLA_LUMAS_DIFFUSE_ROUGHNESS] = 0.1
    shader[c4d.SLA_LUMAS_DIFFUSE_ILLUMINATION] = 0.1
    shader[c4d.SLA_LUMAS_DIFFUSE_CONTRAST] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR1_ACTIVE] = True
    shader[c4d.SLA_LUMAS_SPECULAR1_INTENSITY] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR1_SIZE] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR1_CONTRAST] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR1_GLARE] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR1_FALLOFF] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR2_ACTIVE] = True
    shader[c4d.SLA_LUMAS_SPECULAR2_INTENSITY] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR2_SIZE] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR2_CONTRAST] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR2_GLARE] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR2_FALLOFF] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR3_ACTIVE] = True
    shader[c4d.SLA_LUMAS_SPECULAR3_INTENSITY] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR3_SIZE] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR3_CONTRAST] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR3_GLARE] = 0.1
    shader[c4d.SLA_LUMAS_SPECULAR3_FALLOFF] = 0.1
    shader[c4d.SLA_LUMAS_ANISO_ACTIVE] = True
    shader[c4d.SLA_LUMAS_ANISO_PROJECTION] = c4d.SLA_LUMAS_ANISO_PROJECTION_PLANAR
    shader[c4d.SLA_LUMAS_ANISO_PROJ_SCALE] = 0.1
    shader[c4d.SLA_LUMAS_ANISO_X_ROUGH] = 0.1
    shader[c4d.SLA_LUMAS_ANISO_Y_ROUGH] = 0.1
    shader[c4d.SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC1] = True
    shader[c4d.SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC2] = True
    shader[c4d.SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC3] = True
    shader[c4d.SLA_LUMAS_ANISO_AMPLITUDE] = 0.1
    shader[c4d.SLA_LUMAS_ANISO_SCALE] = 0.1
    shader[c4d.SLA_LUMAS_ANISO_LENGTH] = 0.1
    shader[c4d.SLA_LUMAS_ANISO_ATTENUATION] = 0.1
    shader[c4d.SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC1] = True
    shader[c4d.SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC2] = True
    shader[c4d.SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC3] = True
    
    #Second way, using the base container.
    bc = shader.GetDataInstance()
    bc.SetBool(c4d.SLA_LUMAS_DIFFUSE_ACTIVE,True)
    bc.SetInt32(c4d.SLA_LUMAS_DIFFUSE_ALGORITHM,c4d.SLA_LUMAS_DIFFUSE_ALGO_INTERNAL)
    bc.SetFloat(c4d.SLA_LUMAS_DIFFUSE_ROUGHNESS,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_DIFFUSE_ILLUMINATION,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_DIFFUSE_CONTRAST,0.1)
    bc.SetBool(c4d.SLA_LUMAS_SPECULAR1_ACTIVE,True)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR1_INTENSITY,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR1_SIZE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR1_CONTRAST,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR1_GLARE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR1_FALLOFF,0.1)
    bc.SetBool(c4d.SLA_LUMAS_SPECULAR2_ACTIVE,True)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR2_INTENSITY,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR2_SIZE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR2_CONTRAST,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR2_GLARE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR2_FALLOFF,0.1)
    bc.SetBool(c4d.SLA_LUMAS_SPECULAR3_ACTIVE,True)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR3_INTENSITY,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR3_SIZE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR3_CONTRAST,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR3_GLARE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_SPECULAR3_FALLOFF,0.1)
    bc.SetBool(c4d.SLA_LUMAS_ANISO_ACTIVE,True)
    bc.SetInt32(c4d.SLA_LUMAS_ANISO_PROJECTION,c4d.SLA_LUMAS_ANISO_PROJECTION_PLANAR)
    bc.SetFloat(c4d.SLA_LUMAS_ANISO_PROJ_SCALE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_ANISO_X_ROUGH,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_ANISO_Y_ROUGH,0.1)
    bc.SetBool(c4d.SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC1,True)
    bc.SetBool(c4d.SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC2,True)
    bc.SetBool(c4d.SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC3,True)
    bc.SetFloat(c4d.SLA_LUMAS_ANISO_AMPLITUDE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_ANISO_SCALE,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_ANISO_LENGTH,0.1)
    bc.SetFloat(c4d.SLA_LUMAS_ANISO_ATTENUATION,0.1)
    bc.SetBool(c4d.SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC1,True)
    bc.SetBool(c4d.SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC2,True)
    bc.SetBool(c4d.SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC3,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../sla/description/xslalumas.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseShader *pShader = BaseShader::Alloc(Xlumas);  
    
    //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_LUMAS_DIFFUSE_ACTIVE),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_DIFFUSE_ALGORITHM),GeData(SLA_LUMAS_DIFFUSE_ALGO_INTERNAL),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_DIFFUSE_ROUGHNESS),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_DIFFUSE_ILLUMINATION),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_DIFFUSE_CONTRAST),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR1_ACTIVE),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR1_INTENSITY),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR1_SIZE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR1_CONTRAST),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR1_GLARE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR1_FALLOFF),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR2_ACTIVE),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR2_INTENSITY),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR2_SIZE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR2_CONTRAST),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR2_GLARE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR2_FALLOFF),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR3_ACTIVE),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR3_INTENSITY),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR3_SIZE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR3_CONTRAST),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR3_GLARE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_SPECULAR3_FALLOFF),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_ACTIVE),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_PROJECTION),GeData(SLA_LUMAS_ANISO_PROJECTION_PLANAR),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_PROJ_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_X_ROUGH),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_Y_ROUGH),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC1),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC2),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC3),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_AMPLITUDE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_LENGTH),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_ATTENUATION),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC1),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC2),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC3),GeData(true),flags);
    pShader->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pShader->GetDataInstance();
    bc->SetBool(SLA_LUMAS_DIFFUSE_ACTIVE,true);
    bc->SetInt32(SLA_LUMAS_DIFFUSE_ALGORITHM,SLA_LUMAS_DIFFUSE_ALGO_INTERNAL);
    bc->SetFloat(SLA_LUMAS_DIFFUSE_ROUGHNESS,0.1);
    bc->SetFloat(SLA_LUMAS_DIFFUSE_ILLUMINATION,0.1);
    bc->SetFloat(SLA_LUMAS_DIFFUSE_CONTRAST,0.1);
    bc->SetBool(SLA_LUMAS_SPECULAR1_ACTIVE,true);
    bc->SetFloat(SLA_LUMAS_SPECULAR1_INTENSITY,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR1_SIZE,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR1_CONTRAST,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR1_GLARE,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR1_FALLOFF,0.1);
    bc->SetBool(SLA_LUMAS_SPECULAR2_ACTIVE,true);
    bc->SetFloat(SLA_LUMAS_SPECULAR2_INTENSITY,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR2_SIZE,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR2_CONTRAST,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR2_GLARE,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR2_FALLOFF,0.1);
    bc->SetBool(SLA_LUMAS_SPECULAR3_ACTIVE,true);
    bc->SetFloat(SLA_LUMAS_SPECULAR3_INTENSITY,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR3_SIZE,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR3_CONTRAST,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR3_GLARE,0.1);
    bc->SetFloat(SLA_LUMAS_SPECULAR3_FALLOFF,0.1);
    bc->SetBool(SLA_LUMAS_ANISO_ACTIVE,true);
    bc->SetInt32(SLA_LUMAS_ANISO_PROJECTION,SLA_LUMAS_ANISO_PROJECTION_PLANAR);
    bc->SetFloat(SLA_LUMAS_ANISO_PROJ_SCALE,0.1);
    bc->SetFloat(SLA_LUMAS_ANISO_X_ROUGH,0.1);
    bc->SetFloat(SLA_LUMAS_ANISO_Y_ROUGH,0.1);
    bc->SetBool(SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC1,true);
    bc->SetBool(SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC2,true);
    bc->SetBool(SLA_LUMAS_ANISO_SPEC_CHANNEL_SPEC3,true);
    bc->SetFloat(SLA_LUMAS_ANISO_AMPLITUDE,0.1);
    bc->SetFloat(SLA_LUMAS_ANISO_SCALE,0.1);
    bc->SetFloat(SLA_LUMAS_ANISO_LENGTH,0.1);
    bc->SetFloat(SLA_LUMAS_ANISO_ATTENUATION,0.1);
    bc->SetBool(SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC1,true);
    bc->SetBool(SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC2,true);
    bc->SetBool(SLA_LUMAS_ANISO_SCRATCH_CHANNEL_SPEC3,true);
    pShader->Message(MSG_UPDATE);                                                      
}