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 VPtonemapping

VPtonemapping

Attributes

  • ENGLISH NAME : ToneMapping
  • NAME : VPtonemapping
  • INCLUDE : VPbase
  • PATH : c4dplugin/description/vptonemapping.res
  • PLUGIN : c4dplugin
  • MAXON online help (may not exist): VPTONEMAPPING

Elements

ID UI Name Type Parameters Cycle
VP_TONEMAPPING_OPERATOR Operator LONG  
VP_TONEMAPPING_LINEAR Linear
VP_TONEMAPPING_PHOTOLINEAR PhotoLinear
VP_TONEMAPPING_AUTOLINEAR AutoLinear
VP_TONEMAPPING_MAXWHITE MaxWhite
VP_TONEMAPPING_REINHARD02 Reinhard02
VP_TONEMAPPING_SCALE Scale REAL
MIN 0
STEP 0.1
VP_TONEMAPPING_EXPOSURE Exposure REAL
MIN 0
STEP 0.001
VP_TONEMAPPING_SENSITIVITY ISO REAL
MIN 0
STEP 10.0
VP_TONEMAPPING_FSTOP F-Stop REAL
MIN 0
STEP 0.1
VP_TONEMAPPING_GAMMA Gamma REAL
MIN 0
STEP 0.1
VP_TONEMAPPING_PRESCALE Pre-Scale REAL
MIN 0
STEP 0.1
VP_TONEMAPPING_POSTSCALE Post-Scale REAL
MIN 0
STEP 0.1
VP_TONEMAPPING_BURN Burn REAL
MIN 0
STEP 0.1

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():
    videoPost = c4d.BaseVideoPost(c4d.VPtonemapping)
    
    #You can set parameters two different ways. 
    #First way              
    videoPost[c4d.VP_TONEMAPPING_OPERATOR] = c4d.VP_TONEMAPPING_LINEAR
    videoPost[c4d.VP_TONEMAPPING_SCALE] = 0.1
    videoPost[c4d.VP_TONEMAPPING_EXPOSURE] = 0.1
    videoPost[c4d.VP_TONEMAPPING_SENSITIVITY] = 0.1
    videoPost[c4d.VP_TONEMAPPING_FSTOP] = 0.1
    videoPost[c4d.VP_TONEMAPPING_GAMMA] = 0.1
    videoPost[c4d.VP_TONEMAPPING_PRESCALE] = 0.1
    videoPost[c4d.VP_TONEMAPPING_POSTSCALE] = 0.1
    videoPost[c4d.VP_TONEMAPPING_BURN] = 0.1
    
    #Second way, using the base container.
    bc = videoPost.GetDataInstance()
    bc.SetInt32(c4d.VP_TONEMAPPING_OPERATOR,c4d.VP_TONEMAPPING_LINEAR)
    bc.SetFloat(c4d.VP_TONEMAPPING_SCALE,0.1)
    bc.SetFloat(c4d.VP_TONEMAPPING_EXPOSURE,0.1)
    bc.SetFloat(c4d.VP_TONEMAPPING_SENSITIVITY,0.1)
    bc.SetFloat(c4d.VP_TONEMAPPING_FSTOP,0.1)
    bc.SetFloat(c4d.VP_TONEMAPPING_GAMMA,0.1)
    bc.SetFloat(c4d.VP_TONEMAPPING_PRESCALE,0.1)
    bc.SetFloat(c4d.VP_TONEMAPPING_POSTSCALE,0.1)
    bc.SetFloat(c4d.VP_TONEMAPPING_BURN,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../c4dplugin/description/vptonemapping.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseVideoPost *pVideoPost = BaseVideoPost::Alloc(VPtonemapping);  
    
    //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;
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_OPERATOR),GeData(VP_TONEMAPPING_LINEAR),flags);
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_SCALE),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_EXPOSURE),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_SENSITIVITY),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_FSTOP),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_GAMMA),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_PRESCALE),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_POSTSCALE),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VP_TONEMAPPING_BURN),GeData(0.1),flags);
    pVideoPost->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pVideoPost->GetDataInstance();
    bc->SetInt32(VP_TONEMAPPING_OPERATOR,VP_TONEMAPPING_LINEAR);
    bc->SetFloat(VP_TONEMAPPING_SCALE,0.1);
    bc->SetFloat(VP_TONEMAPPING_EXPOSURE,0.1);
    bc->SetFloat(VP_TONEMAPPING_SENSITIVITY,0.1);
    bc->SetFloat(VP_TONEMAPPING_FSTOP,0.1);
    bc->SetFloat(VP_TONEMAPPING_GAMMA,0.1);
    bc->SetFloat(VP_TONEMAPPING_PRESCALE,0.1);
    bc->SetFloat(VP_TONEMAPPING_POSTSCALE,0.1);
    bc->SetFloat(VP_TONEMAPPING_BURN,0.1);
    pVideoPost->Message(MSG_UPDATE);                                                      
}