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 vppositionpass

vppositionpass

Attributes

  • ENGLISH NAME : PositionPass
  • NAME : vppositionpass
  • INCLUDE : VPbase
  • PATH : newman/description/vppositionpass.res
  • PLUGIN : newman
  • MAXON online help (may not exist): VPPOSITIONPASS

Elements

ID UI Name Type Parameters Cycle
VP_POSITIONPASS_SPACE Space LONG  
VP_POSITIONPASS_SPACE_WORLD World
VP_POSITIONPASS_SPACE_CAMERA Camera
VP_POSITIONPASS_SPACE_OBJECT Object
VP_POSITIONPASS_FLIP ChannelOrder LONG  
VP_POSITIONPASS_FLIP_RGB RGB
VP_POSITIONPASS_FLIP_RBG RBG
VP_POSITIONPASS_FLIP_GBR GBR
VP_POSITIONPASS_FLIP_GRB GRB
VP_POSITIONPASS_FLIP_BGR BGR
VP_POSITIONPASS_FLIP_BRG BRG
VP_POSITIONPASS_SCALE Scale REAL
UNIT REAL
MIN 0.0
STEP 0.1
VP_POSITIONPASS_INVERTZ InvertZ 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():
    videoPost = c4d.BaseVideoPost(c4d.vppositionpass)
    
    #You can set parameters two different ways. 
    #First way              
    videoPost[c4d.VP_POSITIONPASS_SPACE] = c4d.VP_POSITIONPASS_SPACE_WORLD
    videoPost[c4d.VP_POSITIONPASS_FLIP] = c4d.VP_POSITIONPASS_FLIP_RGB
    videoPost[c4d.VP_POSITIONPASS_SCALE] = 0.1
    videoPost[c4d.VP_POSITIONPASS_INVERTZ] = True
    
    #Second way, using the base container.
    bc = videoPost.GetDataInstance()
    bc.SetInt32(c4d.VP_POSITIONPASS_SPACE,c4d.VP_POSITIONPASS_SPACE_WORLD)
    bc.SetInt32(c4d.VP_POSITIONPASS_FLIP,c4d.VP_POSITIONPASS_FLIP_RGB)
    bc.SetFloat(c4d.VP_POSITIONPASS_SCALE,0.1)
    bc.SetBool(c4d.VP_POSITIONPASS_INVERTZ,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../newman/description/vppositionpass.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseVideoPost *pVideoPost = BaseVideoPost::Alloc(vppositionpass);  
    
    //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_POSITIONPASS_SPACE),GeData(VP_POSITIONPASS_SPACE_WORLD),flags);
    pVideoPost->SetParameter(DescID(VP_POSITIONPASS_FLIP),GeData(VP_POSITIONPASS_FLIP_RGB),flags);
    pVideoPost->SetParameter(DescID(VP_POSITIONPASS_SCALE),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VP_POSITIONPASS_INVERTZ),GeData(true),flags);
    pVideoPost->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pVideoPost->GetDataInstance();
    bc->SetInt32(VP_POSITIONPASS_SPACE,VP_POSITIONPASS_SPACE_WORLD);
    bc->SetInt32(VP_POSITIONPASS_FLIP,VP_POSITIONPASS_FLIP_RGB);
    bc->SetFloat(VP_POSITIONPASS_SCALE,0.1);
    bc->SetBool(VP_POSITIONPASS_INVERTZ,true);
    pVideoPost->Message(MSG_UPDATE);                                                      
}