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 Xbitmap

Xbitmap

Attributes

  • ENGLISH NAME : BitmapShader
  • NAME : Xbitmap
  • INCLUDE : Mpreview
  • INCLUDE : Xbase
  • PATH : c4dplugin/description/xbitmap.res
  • PLUGIN : c4dplugin
  • MAXON online help (may not exist): XBITMAP

Elements

ID UI Name Type Parameters Cycle
BITMAPSHADER_RELOADIMAGE ReloadImage... BUTTON FIT_H
BITMAPSHADER_EDITIMAGE EditImage... BUTTON FIT_H
BITMAPSHADER_LOCATEIMAGE LocateImage... BUTTON FIT_H
BITMAPSHADER_INTERPOLATION Sampling LONG  
BITMAPSHADER_INTERPOLATION_NONE None
BITMAPSHADER_INTERPOLATION_CIRCLE Circle
BITMAPSHADER_INTERPOLATION_SQUARE Square
BITMAPSHADER_INTERPOLATION_ALIAS1 Alias1
BITMAPSHADER_INTERPOLATION_ALIAS2 Alias2
BITMAPSHADER_INTERPOLATION_ALIAS3 Alias3
BITMAPSHADER_INTERPOLATION_MIP MIP
BITMAPSHADER_INTERPOLATION_SAT SAT
BITMAPSHADER_FILENAME File FILENAME TEXTURE
BITMAPSHADER_LAYERSET LayerSet LAYERSET  
BITMAPSHADER_COLORPROFILE ColorProfile LONG  
BITMAPSHADER_COLORPROFILE_EMBEDDED Embedded(Default)
BITMAPSHADER_COLORPROFILE_LINEAR Linear
BITMAPSHADER_COLORPROFILE_SRGB sRGB
BITMAPSHADER_COLORPROFILE_CUSTOM Custom
BITMAPSHADER_CUSTOMCOLORPROFILE CustomColorProfile COLORPROFILE  
BITMAPSHADER_EXPOSURE Exposure REAL
STEP 0.01
MIN -25.0
MAX 25.0
BITMAPSHADER_GAMMA HDRGamma REAL
STEP 0.01
MIN 0.0
MAX 100.0
BITMAPSHADER_BLACKPOINT BlackPoint REAL
STEP 0.01
MIN 0.0
MAX 100.0
BITMAPSHADER_WHITEPOINT WhitePoint REAL
STEP 0.01
MIN 0.0
MAX 100.0
BITMAPSHADER_RESETVALUES Reset BUTTON  
BITMAPSHADER_TIMING_MODE Mode LONG  
BITMAPSHADER_TIMING_MODE_SIMPLE Simple
BITMAPSHADER_TIMING_MODE_LOOP Loop
BITMAPSHADER_TIMING_MODE_PINGPONG Ping-Pong
BITMAPSHADER_TIMING_TIMING Timing LONG  
BITMAPSHADER_TIMING_TIMING_FRAME ExactFrame
BITMAPSHADER_TIMING_TIMING_SECOND ExactSecond
BITMAPSHADER_TIMING_TIMING_AREA Range
BITMAPSHADER_TIMING_RANGEFROM RangeStart BASETIME
MIN 0.0
MAX 999999999.0
BITMAPSHADER_TIMING_RANGETO RangeEnd BASETIME
MIN 0.0
MAX 999999999.0
BITMAPSHADER_TIMING_LOOPS Loops LONG
MIN 0
MAX 1000
BITMAPSHADER_TIMING_FROM MovieStartFrame LONG
MIN 0
MAX 999999999
BITMAPSHADER_TIMING_TO MovieEndFrame LONG
MIN 0
MAX 999999999
BITMAPSHADER_TIMING_FPS MovieFrameRate REAL
MIN 1
MAX 100
STEP 1.0
BITMAPSHADER_CALCULATE Calculate BUTTON  

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.Xbitmap)
    
    #You can set parameters two different ways. 
    #First way              
    shader[c4d.BITMAPSHADER_INTERPOLATION] = c4d.BITMAPSHADER_INTERPOLATION_NONE
    shader[c4d.BITMAPSHADER_FILENAME] = "c:\\SomeFile.txt"
    shader[c4d.BITMAPSHADER_COLORPROFILE] = c4d.BITMAPSHADER_COLORPROFILE_EMBEDDED
    shader[c4d.BITMAPSHADER_EXPOSURE] = 0.1
    shader[c4d.BITMAPSHADER_GAMMA] = 0.1
    shader[c4d.BITMAPSHADER_BLACKPOINT] = 0.1
    shader[c4d.BITMAPSHADER_WHITEPOINT] = 0.1
    shader[c4d.BITMAPSHADER_TIMING_MODE] = c4d.BITMAPSHADER_TIMING_MODE_SIMPLE
    shader[c4d.BITMAPSHADER_TIMING_TIMING] = c4d.BITMAPSHADER_TIMING_TIMING_FRAME
    shader[c4d.BITMAPSHADER_TIMING_LOOPS] = 1
    shader[c4d.BITMAPSHADER_TIMING_FROM] = 1
    shader[c4d.BITMAPSHADER_TIMING_TO] = 1
    shader[c4d.BITMAPSHADER_TIMING_FPS] = 0.1
    
    #Second way, using the base container.
    bc = shader.GetDataInstance()
    bc.SetInt32(c4d.BITMAPSHADER_INTERPOLATION,c4d.BITMAPSHADER_INTERPOLATION_NONE)
    bc.SetFileName(c4d.BITMAPSHADER_FILENAME,"c:\\SomeFile.txt")
    bc.SetInt32(c4d.BITMAPSHADER_COLORPROFILE,c4d.BITMAPSHADER_COLORPROFILE_EMBEDDED)
    bc.SetFloat(c4d.BITMAPSHADER_EXPOSURE,0.1)
    bc.SetFloat(c4d.BITMAPSHADER_GAMMA,0.1)
    bc.SetFloat(c4d.BITMAPSHADER_BLACKPOINT,0.1)
    bc.SetFloat(c4d.BITMAPSHADER_WHITEPOINT,0.1)
    bc.SetInt32(c4d.BITMAPSHADER_TIMING_MODE,c4d.BITMAPSHADER_TIMING_MODE_SIMPLE)
    bc.SetInt32(c4d.BITMAPSHADER_TIMING_TIMING,c4d.BITMAPSHADER_TIMING_TIMING_FRAME)
    bc.SetInt32(c4d.BITMAPSHADER_TIMING_LOOPS,1)
    bc.SetInt32(c4d.BITMAPSHADER_TIMING_FROM,1)
    bc.SetInt32(c4d.BITMAPSHADER_TIMING_TO,1)
    bc.SetFloat(c4d.BITMAPSHADER_TIMING_FPS,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/xbitmap.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseShader *pShader = BaseShader::Alloc(Xbitmap);  
    
    //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(BITMAPSHADER_INTERPOLATION),GeData(BITMAPSHADER_INTERPOLATION_NONE),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_FILENAME),GeData(Filename("c:\\SomeFile.txt"),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_COLORPROFILE),GeData(BITMAPSHADER_COLORPROFILE_EMBEDDED),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_EXPOSURE),GeData(0.1),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_GAMMA),GeData(0.1),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_BLACKPOINT),GeData(0.1),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_WHITEPOINT),GeData(0.1),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_TIMING_MODE),GeData(BITMAPSHADER_TIMING_MODE_SIMPLE),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_TIMING_TIMING),GeData(BITMAPSHADER_TIMING_TIMING_FRAME),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_TIMING_LOOPS),GeData(1),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_TIMING_FROM),GeData(1),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_TIMING_TO),GeData(1),flags);
    pShader->SetParameter(DescID(BITMAPSHADER_TIMING_FPS),GeData(0.1),flags);
    pShader->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pShader->GetDataInstance();
    bc->SetInt32(BITMAPSHADER_INTERPOLATION,BITMAPSHADER_INTERPOLATION_NONE);
    bc->SetFileName(BITMAPSHADER_FILENAME,"c:\\SomeFile.txt");
    bc->SetInt32(BITMAPSHADER_COLORPROFILE,BITMAPSHADER_COLORPROFILE_EMBEDDED);
    bc->SetFloat(BITMAPSHADER_EXPOSURE,0.1);
    bc->SetFloat(BITMAPSHADER_GAMMA,0.1);
    bc->SetFloat(BITMAPSHADER_BLACKPOINT,0.1);
    bc->SetFloat(BITMAPSHADER_WHITEPOINT,0.1);
    bc->SetInt32(BITMAPSHADER_TIMING_MODE,BITMAPSHADER_TIMING_MODE_SIMPLE);
    bc->SetInt32(BITMAPSHADER_TIMING_TIMING,BITMAPSHADER_TIMING_TIMING_FRAME);
    bc->SetInt32(BITMAPSHADER_TIMING_LOOPS,1);
    bc->SetInt32(BITMAPSHADER_TIMING_FROM,1);
    bc->SetInt32(BITMAPSHADER_TIMING_TO,1);
    bc->SetFloat(BITMAPSHADER_TIMING_FPS,0.1);
    pShader->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(shader,c4d.BITMAPSHADER_RELOADIMAGE)
c4d.CallButton(shader,c4d.BITMAPSHADER_EDITIMAGE)
c4d.CallButton(shader,c4d.BITMAPSHADER_LOCATEIMAGE)
c4d.CallButton(shader,c4d.BITMAPSHADER_RESETVALUES)
c4d.CallButton(shader,c4d.BITMAPSHADER_CALCULATE)

C++

DescriptionCommand dc;
dc.id = DescID(BITMAPSHADER_RELOADIMAGE);             
pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);

DescriptionCommand dc; dc.id = DescID(BITMAPSHADER_EDITIMAGE); pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(BITMAPSHADER_LOCATEIMAGE); pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(BITMAPSHADER_RESETVALUES); pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(BITMAPSHADER_CALCULATE); pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);