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 vpnormalpass

vpnormalpass

Attributes

  • ENGLISH NAME : NormalPass
  • NAME : vpnormalpass
  • INCLUDE : VPbase
  • PATH : newman/description/vpnormalpass.res
  • PLUGIN : newman
  • MAXON online help (may not exist): VPNORMALPASS

Elements

ID UI Name Type Parameters Cycle
VP_NORMALPASS_SPACE Space LONG  
VP_NORMALPASS_SPACE_WORLD World
VP_NORMALPASS_SPACE_CAMERA Camera
VP_NORMALPASS_SPACE_OBJECT Object
VP_NORMALPASS_FLIP ChannelOrder LONG  
VP_NORMALPASS_FLIP_RGB RGB
VP_NORMALPASS_FLIP_RBG RBG
VP_NORMALPASS_FLIP_GBR GBR
VP_NORMALPASS_FLIP_GRB GRB
VP_NORMALPASS_FLIP_BGR BGR
VP_NORMALPASS_FLIP_BRG BRG
VP_NORMALPASS_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.vpnormalpass)
    
    #You can set parameters two different ways. 
    #First way              
    videoPost[c4d.VP_NORMALPASS_SPACE] = c4d.VP_NORMALPASS_SPACE_WORLD
    videoPost[c4d.VP_NORMALPASS_FLIP] = c4d.VP_NORMALPASS_FLIP_RGB
    videoPost[c4d.VP_NORMALPASS_INVERTZ] = True
    
    #Second way, using the base container.
    bc = videoPost.GetDataInstance()
    bc.SetInt32(c4d.VP_NORMALPASS_SPACE,c4d.VP_NORMALPASS_SPACE_WORLD)
    bc.SetInt32(c4d.VP_NORMALPASS_FLIP,c4d.VP_NORMALPASS_FLIP_RGB)
    bc.SetBool(c4d.VP_NORMALPASS_INVERTZ,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../newman/description/vpnormalpass.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseVideoPost *pVideoPost = BaseVideoPost::Alloc(vpnormalpass);  
    
    //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_NORMALPASS_SPACE),GeData(VP_NORMALPASS_SPACE_WORLD),flags);
    pVideoPost->SetParameter(DescID(VP_NORMALPASS_FLIP),GeData(VP_NORMALPASS_FLIP_RGB),flags);
    pVideoPost->SetParameter(DescID(VP_NORMALPASS_INVERTZ),GeData(true),flags);
    pVideoPost->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pVideoPost->GetDataInstance();
    bc->SetInt32(VP_NORMALPASS_SPACE,VP_NORMALPASS_SPACE_WORLD);
    bc->SetInt32(VP_NORMALPASS_FLIP,VP_NORMALPASS_FLIP_RGB);
    bc->SetBool(VP_NORMALPASS_INVERTZ,true);
    pVideoPost->Message(MSG_UPDATE);                                                      
}