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 XSLASpline

XSLASpline

Attributes

  • ENGLISH NAME : SplineShader
  • NAME : XSLASpline
  • INCLUDE : Mpreview
  • INCLUDE : Xbase
  • PATH : sla/description/xslaspline.res
  • PLUGIN : sla
  • MAXON online help (may not exist): XSLASPLINE

Elements

ID UI Name Type Parameters Cycle
SLA_SPLINE_OBJECT Spline LINK  
SLA_SPLINE_BACKGROUND_COLOR BackgroundTexture SHADERLINK  
SLA_SPLINE_LINE_COLOR LineTexture SHADERLINK  
SLA_SPLINE_FILLET_COLOR FillTexture SHADERLINK  
SLA_SPLINE_X_OFFSET XOffset REAL
UNIT PERCENT
MIN -100000
MAX 100000
MINSLIDER -100
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_SPLINE_Y_OFFSET YOffset REAL
UNIT PERCENT
MIN -100000
MAX 100000
MINSLIDER -100
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_SPLINE_X_SCALE XScale REAL
UNIT PERCENT
MIN -100000
MAX 100000
MINSLIDER -100
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_SPLINE_Y_SCALE YScale REAL
UNIT PERCENT
MIN -100000
MAX 100000
MINSLIDER -100
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_SPLINE_USE_PLANE Plane LONG  
SLA_SPLINE_USE_PLANE_XY XY
SLA_SPLINE_USE_PLANE_XZ XZ
SLA_SPLINE_USE_PLANE_YZ YZ
SLA_SPLINE_SINGLE_PIXEL_WIDTH SinglePixel BOOL  
SLA_SPLINE_LINE_WIDTH LineWidth REAL
UNIT PERCENT
MIN 0
MAX 10000
MINSLIDER 0
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_SPLINE_SMOOTH_WIDTH SmoothWidth REAL
UNIT PERCENT
MIN 0
MAX 10000
MINSLIDER 0
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_SPLINE_HAS_CAPS Caps BOOL  
SLA_SPLINE_FILL Fill BOOL  
SLA_SPLINE_FILL_COLOR UseFillColor BOOL  
SLA_SPLINE_BUMP_WIDTH BumpWidth REAL
UNIT PERCENT
MIN 0
MAX 10000
MINSLIDER 0
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_SPLINE_TEXT TextSpline BOOL  
SLA_SPLINE_TEXT_TEXT Text STRING CUSTOMGUI
SLA_SPLINE_TEXT_FONT Font FONT  
SLA_SPLINE_TEXT_ALIGN Align LONG  
SLA_SPLINE_TEXT_ALIGN_LEFT Left
SLA_SPLINE_TEXT_ALIGN_MIDDLE Center
SLA_SPLINE_TEXT_ALIGN_RIGHT Right
SLA_SPLINE_TEXT_HEIGHT Height REAL UNIT
SLA_SPLINE_TEXT_HSPACING HSpacing REAL UNIT
SLA_SPLINE_TEXT_VSPACING VSpacing REAL UNIT

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.Xspline)
    
    #You can set parameters two different ways. 
    #First way              
    shader[c4d.SLA_SPLINE_X_OFFSET] = 0.1
    shader[c4d.SLA_SPLINE_Y_OFFSET] = 0.1
    shader[c4d.SLA_SPLINE_X_SCALE] = 0.1
    shader[c4d.SLA_SPLINE_Y_SCALE] = 0.1
    shader[c4d.SLA_SPLINE_USE_PLANE] = c4d.SLA_SPLINE_USE_PLANE_XY
    shader[c4d.SLA_SPLINE_SINGLE_PIXEL_WIDTH] = True
    shader[c4d.SLA_SPLINE_LINE_WIDTH] = 0.1
    shader[c4d.SLA_SPLINE_SMOOTH_WIDTH] = 0.1
    shader[c4d.SLA_SPLINE_HAS_CAPS] = True
    shader[c4d.SLA_SPLINE_FILL] = True
    shader[c4d.SLA_SPLINE_FILL_COLOR] = True
    shader[c4d.SLA_SPLINE_BUMP_WIDTH] = 0.1
    shader[c4d.SLA_SPLINE_TEXT] = True
    shader[c4d.SLA_SPLINE_TEXT_TEXT] = "Hello World"
    shader[c4d.SLA_SPLINE_TEXT_ALIGN] = c4d.SLA_SPLINE_TEXT_ALIGN_LEFT
    shader[c4d.SLA_SPLINE_TEXT_HEIGHT] = 0.1
    shader[c4d.SLA_SPLINE_TEXT_HSPACING] = 0.1
    shader[c4d.SLA_SPLINE_TEXT_VSPACING] = 0.1
    
    #Second way, using the base container.
    bc = shader.GetDataInstance()
    bc.SetFloat(c4d.SLA_SPLINE_X_OFFSET,0.1)
    bc.SetFloat(c4d.SLA_SPLINE_Y_OFFSET,0.1)
    bc.SetFloat(c4d.SLA_SPLINE_X_SCALE,0.1)
    bc.SetFloat(c4d.SLA_SPLINE_Y_SCALE,0.1)
    bc.SetInt32(c4d.SLA_SPLINE_USE_PLANE,c4d.SLA_SPLINE_USE_PLANE_XY)
    bc.SetBool(c4d.SLA_SPLINE_SINGLE_PIXEL_WIDTH,True)
    bc.SetFloat(c4d.SLA_SPLINE_LINE_WIDTH,0.1)
    bc.SetFloat(c4d.SLA_SPLINE_SMOOTH_WIDTH,0.1)
    bc.SetBool(c4d.SLA_SPLINE_HAS_CAPS,True)
    bc.SetBool(c4d.SLA_SPLINE_FILL,True)
    bc.SetBool(c4d.SLA_SPLINE_FILL_COLOR,True)
    bc.SetFloat(c4d.SLA_SPLINE_BUMP_WIDTH,0.1)
    bc.SetBool(c4d.SLA_SPLINE_TEXT,True)
    bc.SetString(c4d.SLA_SPLINE_TEXT_TEXT,"Hello World")
    bc.SetInt32(c4d.SLA_SPLINE_TEXT_ALIGN,c4d.SLA_SPLINE_TEXT_ALIGN_LEFT)
    bc.SetFloat(c4d.SLA_SPLINE_TEXT_HEIGHT,0.1)
    bc.SetFloat(c4d.SLA_SPLINE_TEXT_HSPACING,0.1)
    bc.SetFloat(c4d.SLA_SPLINE_TEXT_VSPACING,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../sla/description/xslaspline.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseShader *pShader = BaseShader::Alloc(Xspline);  
    
    //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_SPLINE_X_OFFSET),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_Y_OFFSET),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_X_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_Y_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_USE_PLANE),GeData(SLA_SPLINE_USE_PLANE_XY),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_SINGLE_PIXEL_WIDTH),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_LINE_WIDTH),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_SMOOTH_WIDTH),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_HAS_CAPS),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_FILL),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_FILL_COLOR),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_BUMP_WIDTH),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_TEXT),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_TEXT_TEXT),GeData("Hello World"),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_TEXT_ALIGN),GeData(SLA_SPLINE_TEXT_ALIGN_LEFT),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_TEXT_HEIGHT),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_TEXT_HSPACING),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_SPLINE_TEXT_VSPACING),GeData(0.1),flags);
    pShader->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pShader->GetDataInstance();
    bc->SetFloat(SLA_SPLINE_X_OFFSET,0.1);
    bc->SetFloat(SLA_SPLINE_Y_OFFSET,0.1);
    bc->SetFloat(SLA_SPLINE_X_SCALE,0.1);
    bc->SetFloat(SLA_SPLINE_Y_SCALE,0.1);
    bc->SetInt32(SLA_SPLINE_USE_PLANE,SLA_SPLINE_USE_PLANE_XY);
    bc->SetBool(SLA_SPLINE_SINGLE_PIXEL_WIDTH,true);
    bc->SetFloat(SLA_SPLINE_LINE_WIDTH,0.1);
    bc->SetFloat(SLA_SPLINE_SMOOTH_WIDTH,0.1);
    bc->SetBool(SLA_SPLINE_HAS_CAPS,true);
    bc->SetBool(SLA_SPLINE_FILL,true);
    bc->SetBool(SLA_SPLINE_FILL_COLOR,true);
    bc->SetFloat(SLA_SPLINE_BUMP_WIDTH,0.1);
    bc->SetBool(SLA_SPLINE_TEXT,true);
    bc->SetString(SLA_SPLINE_TEXT_TEXT,"Hello World");
    bc->SetInt32(SLA_SPLINE_TEXT_ALIGN,SLA_SPLINE_TEXT_ALIGN_LEFT);
    bc->SetFloat(SLA_SPLINE_TEXT_HEIGHT,0.1);
    bc->SetFloat(SLA_SPLINE_TEXT_HSPACING,0.1);
    bc->SetFloat(SLA_SPLINE_TEXT_VSPACING,0.1);
    pShader->Message(MSG_UPDATE);                                                      
}