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 Xpwetmap

Xpwetmap

Attributes

  • ENGLISH NAME : X-ParticleWetMapShader
  • NAME : Xpwetmap
  • INCLUDE : Mpreview
  • INCLUDE : Xbase
  • PATH : res/description/xpwetmap.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): XPWETMAP

Elements

ID UI Name Type Parameters Cycle
ID_XP_SHADER_WETMAP_COLOR Color GRADIENT
COLOR
ICC_BASEDOCUMENT
ID_XP_SHADER_WETMAP_SAMPLE SampleRadius REAL
UNIT METER
MIN 0.0
MAXSLIDER 200.0
CUSTOMGUI REALSLIDER
ID_XP_SHADER_WETMAP_OBJECT Object/UVs LINK  
ID_XP_SHADER_WETMAP_TAG WetMapTag LINK  
ID_XP_SHADER_WETMAP_HELP_BUTTON BITMAPBUTTON  
ID_XP_SHADER_WETMAP_VIDMAN_BUTTON BITMAPBUTTON  
ID_XP_SHADER_WETMAP_RESET ResettoDefaults 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.Xpwetmap)
    
    #You can set parameters two different ways. 
    #First way              
    shader[c4d.ID_XP_SHADER_WETMAP_SAMPLE] = 0.1
    
    #Second way, using the base container.
    bc = shader.GetDataInstance()
    bc.SetFloat(c4d.ID_XP_SHADER_WETMAP_SAMPLE,0.1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/xpwetmap.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseShader *pShader = BaseShader::Alloc(Xpwetmap);  
    
    //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(ID_XP_SHADER_WETMAP_SAMPLE),GeData(0.1),flags);
    pShader->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pShader->GetDataInstance();
    bc->SetFloat(ID_XP_SHADER_WETMAP_SAMPLE,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.ID_XP_SHADER_WETMAP_HELP_BUTTON)
c4d.CallButton(shader,c4d.ID_XP_SHADER_WETMAP_VIDMAN_BUTTON)
c4d.CallButton(shader,c4d.ID_XP_SHADER_WETMAP_RESET)

C++

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

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

Gradients

This node has gradients. Gradients can manually be edited by calling the following code

Python


C++

           
#include "customgui_gradient.h"
ID_XP_SHADER_WETMAP_COLOR
GeData data; pShader->GetParameter(DescID(ID_XP_SHADER_WETMAP_COLOR),data,DESCFLAGS_GET_PARAM_GET)); Gradient *pGradient = (Gradient*)data.GetCustomDataType(CUSTOMDATATYPE_GRADIENT); if(pGradient) { //must be set before any knot is set pGradient->SetData(GRADIENT_MODE, GeData(GRADIENTMODE_ALPHA)); GradientKnot k1, k2; k1.col = Vector(0.0, 0.0, 1.0); k1.pos = 0.0; k2.col = 1.0; k2.pos = 1.0; pGradient->InsertKnot(k1); pGradient->InsertKnot(k2); } pShader->SetParameter(DescID(ID_XP_SHADER_WETMAP_COLOR),data,DESCFLAGS_SET_PARAM_SET));