Mmaterial
Attributes
Elements
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():
material = c4d.BaseMaterial(c4d.Mmaterial)
#You can set parameters two different ways.
#First way
material[c4d.MATERIAL_USE_COLOR] = True
material[c4d.MATERIAL_USE_DIFFUSION] = True
material[c4d.MATERIAL_USE_LUMINANCE] = True
material[c4d.MATERIAL_USE_TRANSPARENCY] = True
material[c4d.MATERIAL_USE_REFLECTION] = True
material[c4d.MATERIAL_USE_ENVIRONMENT] = True
material[c4d.MATERIAL_USE_FOG] = True
material[c4d.MATERIAL_USE_BUMP] = True
material[c4d.MATERIAL_USE_NORMAL] = True
material[c4d.MATERIAL_USE_ALPHA] = True
material[c4d.MATERIAL_USE_GLOW] = True
material[c4d.MATERIAL_USE_DISPLACEMENT] = True
material[c4d.MATERIAL_PAGE_NODE] = True
material[c4d.MATERIAL_PAGE_EDITOR] = True
material[c4d.MATERIAL_PAGE_CUSTOM] = True
material[c4d.MATERIAL_COLOR_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_COLOR_TEXTUREMIXING] = c4d.MATERIAL_TEXTUREMIXING_NORMAL
material[c4d.MATERIAL_COLOR_TEXTURESTRENGTH] = 0.1
material[c4d.MATERIAL_COLOR_MODEL] = c4d.MATERIAL_COLOR_MODEL_LAMBERTIAN
material[c4d.MATERIAL_COLOR_DIFFUSEFALLOFF] = 0.1
material[c4d.MATERIAL_COLOR_DIFFUSELEVEL] = 0.1
material[c4d.MATERIAL_COLOR_ROUGHNESS] = 0.1
material[c4d.MATERIAL_DIFFUSION_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_DIFFUSION_AFFECT_LUMINANCE] = True
material[c4d.MATERIAL_DIFFUSION_AFFECT_SPECULAR] = True
material[c4d.MATERIAL_DIFFUSION_AFFECT_REFLECTION] = True
material[c4d.MATERIAL_DIFFUSION_TEXTUREMIXING] = c4d.MATERIAL_TEXTUREMIXING_NORMAL
material[c4d.MATERIAL_DIFFUSION_TEXTURESTRENGTH] = 0.1
material[c4d.MATERIAL_LUMINANCE_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_LUMINANCE_TEXTUREMIXING] = c4d.MATERIAL_TEXTUREMIXING_NORMAL
material[c4d.MATERIAL_LUMINANCE_TEXTURESTRENGTH] = 0.1
material[c4d.MATERIAL_TRANSPARENCY_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_TRANSPARENCY_REFRACTION_PRESET] = c4d.MATERIAL_TRANSPARENCY_REFRACTION_PRESET_CUSTOM
material[c4d.MATERIAL_TRANSPARENCY_REFRACTION] = 0.1
material[c4d.MATERIAL_TRANSPARENCY_FRESNEL] = True
material[c4d.MATERIAL_TRANSPARENCY_EXITREFLECTIONS] = True
material[c4d.MATERIAL_TRANSPARENCY_FRESNELREFLECTIVITY] = 0.1
material[c4d.MATERIAL_TRANSPARENCY_ADDITIVE] = True
material[c4d.MATERIAL_TRANSPARENCY_TEXTUREMIXING] = c4d.MATERIAL_TEXTUREMIXING_NORMAL
material[c4d.MATERIAL_TRANSPARENCY_TEXTURESTRENGTH] = 0.1
material[c4d.MATERIAL_TRANSPARENCY_ABSORPTIONDISTANCE] = 0.1
material[c4d.MATERIAL_TRANSPARENCY_DISPERSION] = 0.1
material[c4d.MATERIAL_TRANSPARENCY_MINSAMPLES] = 1
material[c4d.MATERIAL_TRANSPARENCY_MAXSAMPLES] = 1
material[c4d.MATERIAL_TRANSPARENCY_ACCURACY] = 0.1
material[c4d.MATERIAL_REFLECTION_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_REFLECTION_ADDITIVE] = True
material[c4d.MATERIAL_REFLECTION_USE_BUMP] = True
material[c4d.MATERIAL_REFLECTION_TEXTUREMIXING] = c4d.MATERIAL_TEXTUREMIXING_NORMAL
material[c4d.MATERIAL_REFLECTION_TEXTURESTRENGTH] = 0.1
material[c4d.MATERIAL_REFLECTION_DISPERSION] = 0.1
material[c4d.MATERIAL_REFLECTION_MINSAMPLES] = 1
material[c4d.MATERIAL_REFLECTION_MAXSAMPLES] = 1
material[c4d.MATERIAL_REFLECTION_ACCURACY] = 0.1
material[c4d.MATERIAL_ENVIRONMENT_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_ENVIRONMENT_TEXTUREMIXING] = c4d.MATERIAL_TEXTUREMIXING_NORMAL
material[c4d.MATERIAL_ENVIRONMENT_TEXTURESTRENGTH] = 0.1
material[c4d.MATERIAL_ENVIRONMENT_TILESX] = 0.1
material[c4d.MATERIAL_ENVIRONMENT_TILESY] = 0.1
material[c4d.MATERIAL_ENVIRONMENT_EXCLUSIVE] = True
material[c4d.MATERIAL_FOG_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_FOG_DISTANCE] = 0.1
material[c4d.MATERIAL_BUMP_STRENGTH] = 0.1
material[c4d.MATERIAL_BUMP_MIPFALLOFF] = True
material[c4d.MATERIAL_NORMAL_STRENGTH] = 0.1
material[c4d.MATERIAL_NORMAL_SPACE] = c4d.MATERIAL_NORMAL_SPACE_TANGENT
material[c4d.MATERIAL_NORMAL_REVERSEX] = True
material[c4d.MATERIAL_NORMAL_REVERSEY] = True
material[c4d.MATERIAL_NORMAL_REVERSEZ] = True
material[c4d.MATERIAL_NORMAL_SWAP] = True
material[c4d.MATERIAL_ALPHA_INVERT] = True
material[c4d.MATERIAL_ALPHA_SOFT] = True
material[c4d.MATERIAL_ALPHA_IMAGEALPHA] = True
material[c4d.MATERIAL_ALPHA_PREMULTIPLIED] = True
material[c4d.MATERIAL_SPECULAR_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_SPECULAR_TEXTUREMIXING] = c4d.MATERIAL_TEXTUREMIXING_NORMAL
material[c4d.MATERIAL_SPECULAR_TEXTURESTRENGTH] = 0.1
material[c4d.MATERIAL_SPECULAR_MODE] = c4d.MATERIAL_SPECULAR_MODE_PLASTIC
material[c4d.MATERIAL_SPECULAR_WIDTH] = 0.1
material[c4d.MATERIAL_SPECULAR_HEIGHT] = 0.1
material[c4d.MATERIAL_SPECULAR_FALLOFF] = 0.1
material[c4d.MATERIAL_SPECULAR_INNERWIDTH] = 0.1
material[c4d.MATERIAL_GLOW_BRIGHTNESS] = 0.1
material[c4d.MATERIAL_GLOW_INNERSTRENGTH] = 0.1
material[c4d.MATERIAL_GLOW_OUTERSTRENGTH] = 0.1
material[c4d.MATERIAL_GLOW_RADIUS] = 0.1
material[c4d.MATERIAL_GLOW_RANDOM] = 0.1
material[c4d.MATERIAL_GLOW_FREQUENCY] = 0.1
material[c4d.MATERIAL_GLOW_USEMATERIALCOLOR] = True
material[c4d.MATERIAL_DISPLACEMENT_STRENGTH] = 0.1
material[c4d.MATERIAL_DISPLACEMENT_HEIGHT] = 0.1
material[c4d.MATERIAL_DISPLACEMENT_TYPE] = c4d.MATERIAL_DISPLACEMENT_TYPE_INTENSITY
material[c4d.MATERIAL_DISPLACEMENT_SUBPOLY] = True
material[c4d.MATERIAL_DISPLACEMENT_SUBPOLY_SUBDIVISION] = 1
material[c4d.MATERIAL_DISPLACEMENT_SUBPOLY_ROUND] = True
material[c4d.MATERIAL_DISPLACEMENT_SUBPOLY_ROUNDCONTOUR] = True
material[c4d.MATERIAL_DISPLACEMENT_SUBPOLY_HQREMAPPING] = True
material[c4d.MATERIAL_DISPLACEMENT_SUBPOLY_MAPRESULT] = True
material[c4d.MATERIAL_DISPLACEMENT_SUBPOLY_KEEPEDGES] = True
material[c4d.MATERIAL_DISPLACEMENT_SUBPOLY_DISTRIBUTION] = True
material[c4d.MATERIAL_ANIMATEPREVIEW] = True
material[c4d.MATERIAL_PREVIEWSIZE] = c4d.MATERIAL_PREVIEWSIZE_DEF
material[c4d.MATERIAL_EDITORDISPLAY] = c4d.MATERIAL_EDITORDISPLAY_COMBINED
material[c4d.MATERIAL_DISPLAY_USE_COLOR] = True
material[c4d.MATERIAL_DISPLAY_USE_DIFFUSION] = True
material[c4d.MATERIAL_DISPLAY_USE_LUMINANCE] = True
material[c4d.MATERIAL_DISPLAY_USE_TRANSPARENCY] = True
material[c4d.MATERIAL_DISPLAY_USE_ENVIRONMENT] = True
material[c4d.MATERIAL_DISPLAY_USE_BUMP] = True
material[c4d.MATERIAL_DISPLAY_USE_NORMAL] = True
material[c4d.MATERIAL_DISPLAY_USE_ALPHA] = True
material[c4d.MATERIAL_DISPLAY_USE_REFLECTANCE] = True
material[c4d.MATERIAL_DISPLAY_USE_DISPLACEMENT] = True
material[c4d.MATERIAL_VIEWPORT_REFLECTION_ENVIRONMENT_ROTATION] = c4d.Vector(1.0,1.0,1.0)
material[c4d.MATERIAL_DISPLACEMENT_TESSELLATION] = c4d.MATERIAL_DISPLACEMENT_TESSELLATION_NONE
material[c4d.MATERIAL_DISPLACEMENT_TESSELLATION_UNIFORM_LEVEL] = 0.1
material[c4d.MATERIAL_DISPLACEMENT_TESSELLATION_ADAPTIVE_LEVEL] = 0.1
#Second way, using the base container.
bc = material.GetDataInstance()
bc.SetBool(c4d.MATERIAL_USE_COLOR,True)
bc.SetBool(c4d.MATERIAL_USE_DIFFUSION,True)
bc.SetBool(c4d.MATERIAL_USE_LUMINANCE,True)
bc.SetBool(c4d.MATERIAL_USE_TRANSPARENCY,True)
bc.SetBool(c4d.MATERIAL_USE_REFLECTION,True)
bc.SetBool(c4d.MATERIAL_USE_ENVIRONMENT,True)
bc.SetBool(c4d.MATERIAL_USE_FOG,True)
bc.SetBool(c4d.MATERIAL_USE_BUMP,True)
bc.SetBool(c4d.MATERIAL_USE_NORMAL,True)
bc.SetBool(c4d.MATERIAL_USE_ALPHA,True)
bc.SetBool(c4d.MATERIAL_USE_GLOW,True)
bc.SetBool(c4d.MATERIAL_USE_DISPLACEMENT,True)
bc.SetBool(c4d.MATERIAL_PAGE_NODE,True)
bc.SetBool(c4d.MATERIAL_PAGE_EDITOR,True)
bc.SetBool(c4d.MATERIAL_PAGE_CUSTOM,True)
bc.SetFloat(c4d.MATERIAL_COLOR_BRIGHTNESS,0.1)
bc.SetInt32(c4d.MATERIAL_COLOR_TEXTUREMIXING,c4d.MATERIAL_TEXTUREMIXING_NORMAL)
bc.SetFloat(c4d.MATERIAL_COLOR_TEXTURESTRENGTH,0.1)
bc.SetInt32(c4d.MATERIAL_COLOR_MODEL,c4d.MATERIAL_COLOR_MODEL_LAMBERTIAN)
bc.SetFloat(c4d.MATERIAL_COLOR_DIFFUSEFALLOFF,0.1)
bc.SetFloat(c4d.MATERIAL_COLOR_DIFFUSELEVEL,0.1)
bc.SetFloat(c4d.MATERIAL_COLOR_ROUGHNESS,0.1)
bc.SetFloat(c4d.MATERIAL_DIFFUSION_BRIGHTNESS,0.1)
bc.SetBool(c4d.MATERIAL_DIFFUSION_AFFECT_LUMINANCE,True)
bc.SetBool(c4d.MATERIAL_DIFFUSION_AFFECT_SPECULAR,True)
bc.SetBool(c4d.MATERIAL_DIFFUSION_AFFECT_REFLECTION,True)
bc.SetInt32(c4d.MATERIAL_DIFFUSION_TEXTUREMIXING,c4d.MATERIAL_TEXTUREMIXING_NORMAL)
bc.SetFloat(c4d.MATERIAL_DIFFUSION_TEXTURESTRENGTH,0.1)
bc.SetFloat(c4d.MATERIAL_LUMINANCE_BRIGHTNESS,0.1)
bc.SetInt32(c4d.MATERIAL_LUMINANCE_TEXTUREMIXING,c4d.MATERIAL_TEXTUREMIXING_NORMAL)
bc.SetFloat(c4d.MATERIAL_LUMINANCE_TEXTURESTRENGTH,0.1)
bc.SetFloat(c4d.MATERIAL_TRANSPARENCY_BRIGHTNESS,0.1)
bc.SetInt32(c4d.MATERIAL_TRANSPARENCY_REFRACTION_PRESET,c4d.MATERIAL_TRANSPARENCY_REFRACTION_PRESET_CUSTOM)
bc.SetFloat(c4d.MATERIAL_TRANSPARENCY_REFRACTION,0.1)
bc.SetBool(c4d.MATERIAL_TRANSPARENCY_FRESNEL,True)
bc.SetBool(c4d.MATERIAL_TRANSPARENCY_EXITREFLECTIONS,True)
bc.SetFloat(c4d.MATERIAL_TRANSPARENCY_FRESNELREFLECTIVITY,0.1)
bc.SetBool(c4d.MATERIAL_TRANSPARENCY_ADDITIVE,True)
bc.SetInt32(c4d.MATERIAL_TRANSPARENCY_TEXTUREMIXING,c4d.MATERIAL_TEXTUREMIXING_NORMAL)
bc.SetFloat(c4d.MATERIAL_TRANSPARENCY_TEXTURESTRENGTH,0.1)
bc.SetFloat(c4d.MATERIAL_TRANSPARENCY_ABSORPTIONDISTANCE,0.1)
bc.SetFloat(c4d.MATERIAL_TRANSPARENCY_DISPERSION,0.1)
bc.SetInt32(c4d.MATERIAL_TRANSPARENCY_MINSAMPLES,1)
bc.SetInt32(c4d.MATERIAL_TRANSPARENCY_MAXSAMPLES,1)
bc.SetFloat(c4d.MATERIAL_TRANSPARENCY_ACCURACY,0.1)
bc.SetFloat(c4d.MATERIAL_REFLECTION_BRIGHTNESS,0.1)
bc.SetBool(c4d.MATERIAL_REFLECTION_ADDITIVE,True)
bc.SetBool(c4d.MATERIAL_REFLECTION_USE_BUMP,True)
bc.SetInt32(c4d.MATERIAL_REFLECTION_TEXTUREMIXING,c4d.MATERIAL_TEXTUREMIXING_NORMAL)
bc.SetFloat(c4d.MATERIAL_REFLECTION_TEXTURESTRENGTH,0.1)
bc.SetFloat(c4d.MATERIAL_REFLECTION_DISPERSION,0.1)
bc.SetInt32(c4d.MATERIAL_REFLECTION_MINSAMPLES,1)
bc.SetInt32(c4d.MATERIAL_REFLECTION_MAXSAMPLES,1)
bc.SetFloat(c4d.MATERIAL_REFLECTION_ACCURACY,0.1)
bc.SetFloat(c4d.MATERIAL_ENVIRONMENT_BRIGHTNESS,0.1)
bc.SetInt32(c4d.MATERIAL_ENVIRONMENT_TEXTUREMIXING,c4d.MATERIAL_TEXTUREMIXING_NORMAL)
bc.SetFloat(c4d.MATERIAL_ENVIRONMENT_TEXTURESTRENGTH,0.1)
bc.SetFloat(c4d.MATERIAL_ENVIRONMENT_TILESX,0.1)
bc.SetFloat(c4d.MATERIAL_ENVIRONMENT_TILESY,0.1)
bc.SetBool(c4d.MATERIAL_ENVIRONMENT_EXCLUSIVE,True)
bc.SetFloat(c4d.MATERIAL_FOG_BRIGHTNESS,0.1)
bc.SetFloat(c4d.MATERIAL_FOG_DISTANCE,0.1)
bc.SetFloat(c4d.MATERIAL_BUMP_STRENGTH,0.1)
bc.SetBool(c4d.MATERIAL_BUMP_MIPFALLOFF,True)
bc.SetFloat(c4d.MATERIAL_NORMAL_STRENGTH,0.1)
bc.SetInt32(c4d.MATERIAL_NORMAL_SPACE,c4d.MATERIAL_NORMAL_SPACE_TANGENT)
bc.SetBool(c4d.MATERIAL_NORMAL_REVERSEX,True)
bc.SetBool(c4d.MATERIAL_NORMAL_REVERSEY,True)
bc.SetBool(c4d.MATERIAL_NORMAL_REVERSEZ,True)
bc.SetBool(c4d.MATERIAL_NORMAL_SWAP,True)
bc.SetBool(c4d.MATERIAL_ALPHA_INVERT,True)
bc.SetBool(c4d.MATERIAL_ALPHA_SOFT,True)
bc.SetBool(c4d.MATERIAL_ALPHA_IMAGEALPHA,True)
bc.SetBool(c4d.MATERIAL_ALPHA_PREMULTIPLIED,True)
bc.SetFloat(c4d.MATERIAL_SPECULAR_BRIGHTNESS,0.1)
bc.SetInt32(c4d.MATERIAL_SPECULAR_TEXTUREMIXING,c4d.MATERIAL_TEXTUREMIXING_NORMAL)
bc.SetFloat(c4d.MATERIAL_SPECULAR_TEXTURESTRENGTH,0.1)
bc.SetInt32(c4d.MATERIAL_SPECULAR_MODE,c4d.MATERIAL_SPECULAR_MODE_PLASTIC)
bc.SetFloat(c4d.MATERIAL_SPECULAR_WIDTH,0.1)
bc.SetFloat(c4d.MATERIAL_SPECULAR_HEIGHT,0.1)
bc.SetFloat(c4d.MATERIAL_SPECULAR_FALLOFF,0.1)
bc.SetFloat(c4d.MATERIAL_SPECULAR_INNERWIDTH,0.1)
bc.SetFloat(c4d.MATERIAL_GLOW_BRIGHTNESS,0.1)
bc.SetFloat(c4d.MATERIAL_GLOW_INNERSTRENGTH,0.1)
bc.SetFloat(c4d.MATERIAL_GLOW_OUTERSTRENGTH,0.1)
bc.SetFloat(c4d.MATERIAL_GLOW_RADIUS,0.1)
bc.SetFloat(c4d.MATERIAL_GLOW_RANDOM,0.1)
bc.SetFloat(c4d.MATERIAL_GLOW_FREQUENCY,0.1)
bc.SetBool(c4d.MATERIAL_GLOW_USEMATERIALCOLOR,True)
bc.SetFloat(c4d.MATERIAL_DISPLACEMENT_STRENGTH,0.1)
bc.SetFloat(c4d.MATERIAL_DISPLACEMENT_HEIGHT,0.1)
bc.SetInt32(c4d.MATERIAL_DISPLACEMENT_TYPE,c4d.MATERIAL_DISPLACEMENT_TYPE_INTENSITY)
bc.SetBool(c4d.MATERIAL_DISPLACEMENT_SUBPOLY,True)
bc.SetInt32(c4d.MATERIAL_DISPLACEMENT_SUBPOLY_SUBDIVISION,1)
bc.SetBool(c4d.MATERIAL_DISPLACEMENT_SUBPOLY_ROUND,True)
bc.SetBool(c4d.MATERIAL_DISPLACEMENT_SUBPOLY_ROUNDCONTOUR,True)
bc.SetBool(c4d.MATERIAL_DISPLACEMENT_SUBPOLY_HQREMAPPING,True)
bc.SetBool(c4d.MATERIAL_DISPLACEMENT_SUBPOLY_MAPRESULT,True)
bc.SetBool(c4d.MATERIAL_DISPLACEMENT_SUBPOLY_KEEPEDGES,True)
bc.SetBool(c4d.MATERIAL_DISPLACEMENT_SUBPOLY_DISTRIBUTION,True)
bc.SetBool(c4d.MATERIAL_ANIMATEPREVIEW,True)
bc.SetInt32(c4d.MATERIAL_PREVIEWSIZE,c4d.MATERIAL_PREVIEWSIZE_DEF)
bc.SetInt32(c4d.MATERIAL_EDITORDISPLAY,c4d.MATERIAL_EDITORDISPLAY_COMBINED)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_COLOR,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_DIFFUSION,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_LUMINANCE,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_TRANSPARENCY,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_ENVIRONMENT,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_BUMP,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_NORMAL,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_ALPHA,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_REFLECTANCE,True)
bc.SetBool(c4d.MATERIAL_DISPLAY_USE_DISPLACEMENT,True)
bc.SetVector(c4d.MATERIAL_VIEWPORT_REFLECTION_ENVIRONMENT_ROTATION, c4d.Vector(1.0,1.0,1.0)
bc.SetInt32(c4d.MATERIAL_DISPLACEMENT_TESSELLATION,c4d.MATERIAL_DISPLACEMENT_TESSELLATION_NONE)
bc.SetFloat(c4d.MATERIAL_DISPLACEMENT_TESSELLATION_UNIFORM_LEVEL,0.1)
bc.SetFloat(c4d.MATERIAL_DISPLACEMENT_TESSELLATION_ADAPTIVE_LEVEL,0.1)
if __name__=='__main__':
main()
C++
#include "c4d.h"
#include "../c4dplugin/description/mmaterial.h"
void SampleFunction()
{
BaseDocument *pDoc = GetActiveDocument();
BaseMaterial *pMaterial = BaseMaterial::Alloc(Mmaterial);
//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;
pMaterial->SetParameter(DescID(MATERIAL_USE_COLOR),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_DIFFUSION),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_LUMINANCE),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_TRANSPARENCY),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_REFLECTION),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_ENVIRONMENT),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_FOG),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_BUMP),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_NORMAL),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_ALPHA),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_GLOW),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_USE_DISPLACEMENT),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_PAGE_NODE),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_PAGE_EDITOR),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_PAGE_CUSTOM),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_COLOR_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_COLOR_TEXTUREMIXING),GeData(MATERIAL_TEXTUREMIXING_NORMAL),flags);
pMaterial->SetParameter(DescID(MATERIAL_COLOR_TEXTURESTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_COLOR_MODEL),GeData(MATERIAL_COLOR_MODEL_LAMBERTIAN),flags);
pMaterial->SetParameter(DescID(MATERIAL_COLOR_DIFFUSEFALLOFF),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_COLOR_DIFFUSELEVEL),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_COLOR_ROUGHNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_DIFFUSION_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_DIFFUSION_AFFECT_LUMINANCE),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DIFFUSION_AFFECT_SPECULAR),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DIFFUSION_AFFECT_REFLECTION),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DIFFUSION_TEXTUREMIXING),GeData(MATERIAL_TEXTUREMIXING_NORMAL),flags);
pMaterial->SetParameter(DescID(MATERIAL_DIFFUSION_TEXTURESTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_LUMINANCE_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_LUMINANCE_TEXTUREMIXING),GeData(MATERIAL_TEXTUREMIXING_NORMAL),flags);
pMaterial->SetParameter(DescID(MATERIAL_LUMINANCE_TEXTURESTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_REFRACTION_PRESET),GeData(MATERIAL_TRANSPARENCY_REFRACTION_PRESET_CUSTOM),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_REFRACTION),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_FRESNEL),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_EXITREFLECTIONS),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_FRESNELREFLECTIVITY),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_ADDITIVE),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_TEXTUREMIXING),GeData(MATERIAL_TEXTUREMIXING_NORMAL),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_TEXTURESTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_ABSORPTIONDISTANCE),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_DISPERSION),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_MINSAMPLES),GeData(1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_MAXSAMPLES),GeData(1),flags);
pMaterial->SetParameter(DescID(MATERIAL_TRANSPARENCY_ACCURACY),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_ADDITIVE),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_USE_BUMP),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_TEXTUREMIXING),GeData(MATERIAL_TEXTUREMIXING_NORMAL),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_TEXTURESTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_DISPERSION),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_MINSAMPLES),GeData(1),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_MAXSAMPLES),GeData(1),flags);
pMaterial->SetParameter(DescID(MATERIAL_REFLECTION_ACCURACY),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_ENVIRONMENT_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_ENVIRONMENT_TEXTUREMIXING),GeData(MATERIAL_TEXTUREMIXING_NORMAL),flags);
pMaterial->SetParameter(DescID(MATERIAL_ENVIRONMENT_TEXTURESTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_ENVIRONMENT_TILESX),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_ENVIRONMENT_TILESY),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_ENVIRONMENT_EXCLUSIVE),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_FOG_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_FOG_DISTANCE),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_BUMP_STRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_BUMP_MIPFALLOFF),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_NORMAL_STRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_NORMAL_SPACE),GeData(MATERIAL_NORMAL_SPACE_TANGENT),flags);
pMaterial->SetParameter(DescID(MATERIAL_NORMAL_REVERSEX),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_NORMAL_REVERSEY),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_NORMAL_REVERSEZ),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_NORMAL_SWAP),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_ALPHA_INVERT),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_ALPHA_SOFT),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_ALPHA_IMAGEALPHA),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_ALPHA_PREMULTIPLIED),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_SPECULAR_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_SPECULAR_TEXTUREMIXING),GeData(MATERIAL_TEXTUREMIXING_NORMAL),flags);
pMaterial->SetParameter(DescID(MATERIAL_SPECULAR_TEXTURESTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_SPECULAR_MODE),GeData(MATERIAL_SPECULAR_MODE_PLASTIC),flags);
pMaterial->SetParameter(DescID(MATERIAL_SPECULAR_WIDTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_SPECULAR_HEIGHT),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_SPECULAR_FALLOFF),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_SPECULAR_INNERWIDTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_GLOW_BRIGHTNESS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_GLOW_INNERSTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_GLOW_OUTERSTRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_GLOW_RADIUS),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_GLOW_RANDOM),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_GLOW_FREQUENCY),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_GLOW_USEMATERIALCOLOR),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_STRENGTH),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_HEIGHT),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_TYPE),GeData(MATERIAL_DISPLACEMENT_TYPE_INTENSITY),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_SUBPOLY),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_SUBPOLY_SUBDIVISION),GeData(1),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_SUBPOLY_ROUND),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_SUBPOLY_ROUNDCONTOUR),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_SUBPOLY_HQREMAPPING),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_SUBPOLY_MAPRESULT),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_SUBPOLY_KEEPEDGES),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_SUBPOLY_DISTRIBUTION),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_ANIMATEPREVIEW),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_PREVIEWSIZE),GeData(MATERIAL_PREVIEWSIZE_DEF),flags);
pMaterial->SetParameter(DescID(MATERIAL_EDITORDISPLAY),GeData(MATERIAL_EDITORDISPLAY_COMBINED),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_COLOR),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_DIFFUSION),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_LUMINANCE),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_TRANSPARENCY),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_ENVIRONMENT),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_BUMP),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_NORMAL),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_ALPHA),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_REFLECTANCE),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLAY_USE_DISPLACEMENT),GeData(true),flags);
pMaterial->SetParameter(DescID(MATERIAL_VIEWPORT_REFLECTION_ENVIRONMENT_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_TESSELLATION),GeData(MATERIAL_DISPLACEMENT_TESSELLATION_NONE),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_TESSELLATION_UNIFORM_LEVEL),GeData(0.1),flags);
pMaterial->SetParameter(DescID(MATERIAL_DISPLACEMENT_TESSELLATION_ADAPTIVE_LEVEL),GeData(0.1),flags);
pMaterial->Message(MSG_UPDATE);
//Second way, using the base container.
BaseContainer *bc = pMaterial->GetDataInstance();
bc->SetBool(MATERIAL_USE_COLOR,true);
bc->SetBool(MATERIAL_USE_DIFFUSION,true);
bc->SetBool(MATERIAL_USE_LUMINANCE,true);
bc->SetBool(MATERIAL_USE_TRANSPARENCY,true);
bc->SetBool(MATERIAL_USE_REFLECTION,true);
bc->SetBool(MATERIAL_USE_ENVIRONMENT,true);
bc->SetBool(MATERIAL_USE_FOG,true);
bc->SetBool(MATERIAL_USE_BUMP,true);
bc->SetBool(MATERIAL_USE_NORMAL,true);
bc->SetBool(MATERIAL_USE_ALPHA,true);
bc->SetBool(MATERIAL_USE_GLOW,true);
bc->SetBool(MATERIAL_USE_DISPLACEMENT,true);
bc->SetBool(MATERIAL_PAGE_NODE,true);
bc->SetBool(MATERIAL_PAGE_EDITOR,true);
bc->SetBool(MATERIAL_PAGE_CUSTOM,true);
bc->SetFloat(MATERIAL_COLOR_BRIGHTNESS,0.1);
bc->SetInt32(MATERIAL_COLOR_TEXTUREMIXING,MATERIAL_TEXTUREMIXING_NORMAL);
bc->SetFloat(MATERIAL_COLOR_TEXTURESTRENGTH,0.1);
bc->SetInt32(MATERIAL_COLOR_MODEL,MATERIAL_COLOR_MODEL_LAMBERTIAN);
bc->SetFloat(MATERIAL_COLOR_DIFFUSEFALLOFF,0.1);
bc->SetFloat(MATERIAL_COLOR_DIFFUSELEVEL,0.1);
bc->SetFloat(MATERIAL_COLOR_ROUGHNESS,0.1);
bc->SetFloat(MATERIAL_DIFFUSION_BRIGHTNESS,0.1);
bc->SetBool(MATERIAL_DIFFUSION_AFFECT_LUMINANCE,true);
bc->SetBool(MATERIAL_DIFFUSION_AFFECT_SPECULAR,true);
bc->SetBool(MATERIAL_DIFFUSION_AFFECT_REFLECTION,true);
bc->SetInt32(MATERIAL_DIFFUSION_TEXTUREMIXING,MATERIAL_TEXTUREMIXING_NORMAL);
bc->SetFloat(MATERIAL_DIFFUSION_TEXTURESTRENGTH,0.1);
bc->SetFloat(MATERIAL_LUMINANCE_BRIGHTNESS,0.1);
bc->SetInt32(MATERIAL_LUMINANCE_TEXTUREMIXING,MATERIAL_TEXTUREMIXING_NORMAL);
bc->SetFloat(MATERIAL_LUMINANCE_TEXTURESTRENGTH,0.1);
bc->SetFloat(MATERIAL_TRANSPARENCY_BRIGHTNESS,0.1);
bc->SetInt32(MATERIAL_TRANSPARENCY_REFRACTION_PRESET,MATERIAL_TRANSPARENCY_REFRACTION_PRESET_CUSTOM);
bc->SetFloat(MATERIAL_TRANSPARENCY_REFRACTION,0.1);
bc->SetBool(MATERIAL_TRANSPARENCY_FRESNEL,true);
bc->SetBool(MATERIAL_TRANSPARENCY_EXITREFLECTIONS,true);
bc->SetFloat(MATERIAL_TRANSPARENCY_FRESNELREFLECTIVITY,0.1);
bc->SetBool(MATERIAL_TRANSPARENCY_ADDITIVE,true);
bc->SetInt32(MATERIAL_TRANSPARENCY_TEXTUREMIXING,MATERIAL_TEXTUREMIXING_NORMAL);
bc->SetFloat(MATERIAL_TRANSPARENCY_TEXTURESTRENGTH,0.1);
bc->SetFloat(MATERIAL_TRANSPARENCY_ABSORPTIONDISTANCE,0.1);
bc->SetFloat(MATERIAL_TRANSPARENCY_DISPERSION,0.1);
bc->SetInt32(MATERIAL_TRANSPARENCY_MINSAMPLES,1);
bc->SetInt32(MATERIAL_TRANSPARENCY_MAXSAMPLES,1);
bc->SetFloat(MATERIAL_TRANSPARENCY_ACCURACY,0.1);
bc->SetFloat(MATERIAL_REFLECTION_BRIGHTNESS,0.1);
bc->SetBool(MATERIAL_REFLECTION_ADDITIVE,true);
bc->SetBool(MATERIAL_REFLECTION_USE_BUMP,true);
bc->SetInt32(MATERIAL_REFLECTION_TEXTUREMIXING,MATERIAL_TEXTUREMIXING_NORMAL);
bc->SetFloat(MATERIAL_REFLECTION_TEXTURESTRENGTH,0.1);
bc->SetFloat(MATERIAL_REFLECTION_DISPERSION,0.1);
bc->SetInt32(MATERIAL_REFLECTION_MINSAMPLES,1);
bc->SetInt32(MATERIAL_REFLECTION_MAXSAMPLES,1);
bc->SetFloat(MATERIAL_REFLECTION_ACCURACY,0.1);
bc->SetFloat(MATERIAL_ENVIRONMENT_BRIGHTNESS,0.1);
bc->SetInt32(MATERIAL_ENVIRONMENT_TEXTUREMIXING,MATERIAL_TEXTUREMIXING_NORMAL);
bc->SetFloat(MATERIAL_ENVIRONMENT_TEXTURESTRENGTH,0.1);
bc->SetFloat(MATERIAL_ENVIRONMENT_TILESX,0.1);
bc->SetFloat(MATERIAL_ENVIRONMENT_TILESY,0.1);
bc->SetBool(MATERIAL_ENVIRONMENT_EXCLUSIVE,true);
bc->SetFloat(MATERIAL_FOG_BRIGHTNESS,0.1);
bc->SetFloat(MATERIAL_FOG_DISTANCE,0.1);
bc->SetFloat(MATERIAL_BUMP_STRENGTH,0.1);
bc->SetBool(MATERIAL_BUMP_MIPFALLOFF,true);
bc->SetFloat(MATERIAL_NORMAL_STRENGTH,0.1);
bc->SetInt32(MATERIAL_NORMAL_SPACE,MATERIAL_NORMAL_SPACE_TANGENT);
bc->SetBool(MATERIAL_NORMAL_REVERSEX,true);
bc->SetBool(MATERIAL_NORMAL_REVERSEY,true);
bc->SetBool(MATERIAL_NORMAL_REVERSEZ,true);
bc->SetBool(MATERIAL_NORMAL_SWAP,true);
bc->SetBool(MATERIAL_ALPHA_INVERT,true);
bc->SetBool(MATERIAL_ALPHA_SOFT,true);
bc->SetBool(MATERIAL_ALPHA_IMAGEALPHA,true);
bc->SetBool(MATERIAL_ALPHA_PREMULTIPLIED,true);
bc->SetFloat(MATERIAL_SPECULAR_BRIGHTNESS,0.1);
bc->SetInt32(MATERIAL_SPECULAR_TEXTUREMIXING,MATERIAL_TEXTUREMIXING_NORMAL);
bc->SetFloat(MATERIAL_SPECULAR_TEXTURESTRENGTH,0.1);
bc->SetInt32(MATERIAL_SPECULAR_MODE,MATERIAL_SPECULAR_MODE_PLASTIC);
bc->SetFloat(MATERIAL_SPECULAR_WIDTH,0.1);
bc->SetFloat(MATERIAL_SPECULAR_HEIGHT,0.1);
bc->SetFloat(MATERIAL_SPECULAR_FALLOFF,0.1);
bc->SetFloat(MATERIAL_SPECULAR_INNERWIDTH,0.1);
bc->SetFloat(MATERIAL_GLOW_BRIGHTNESS,0.1);
bc->SetFloat(MATERIAL_GLOW_INNERSTRENGTH,0.1);
bc->SetFloat(MATERIAL_GLOW_OUTERSTRENGTH,0.1);
bc->SetFloat(MATERIAL_GLOW_RADIUS,0.1);
bc->SetFloat(MATERIAL_GLOW_RANDOM,0.1);
bc->SetFloat(MATERIAL_GLOW_FREQUENCY,0.1);
bc->SetBool(MATERIAL_GLOW_USEMATERIALCOLOR,true);
bc->SetFloat(MATERIAL_DISPLACEMENT_STRENGTH,0.1);
bc->SetFloat(MATERIAL_DISPLACEMENT_HEIGHT,0.1);
bc->SetInt32(MATERIAL_DISPLACEMENT_TYPE,MATERIAL_DISPLACEMENT_TYPE_INTENSITY);
bc->SetBool(MATERIAL_DISPLACEMENT_SUBPOLY,true);
bc->SetInt32(MATERIAL_DISPLACEMENT_SUBPOLY_SUBDIVISION,1);
bc->SetBool(MATERIAL_DISPLACEMENT_SUBPOLY_ROUND,true);
bc->SetBool(MATERIAL_DISPLACEMENT_SUBPOLY_ROUNDCONTOUR,true);
bc->SetBool(MATERIAL_DISPLACEMENT_SUBPOLY_HQREMAPPING,true);
bc->SetBool(MATERIAL_DISPLACEMENT_SUBPOLY_MAPRESULT,true);
bc->SetBool(MATERIAL_DISPLACEMENT_SUBPOLY_KEEPEDGES,true);
bc->SetBool(MATERIAL_DISPLACEMENT_SUBPOLY_DISTRIBUTION,true);
bc->SetBool(MATERIAL_ANIMATEPREVIEW,true);
bc->SetInt32(MATERIAL_PREVIEWSIZE,MATERIAL_PREVIEWSIZE_DEF);
bc->SetInt32(MATERIAL_EDITORDISPLAY,MATERIAL_EDITORDISPLAY_COMBINED);
bc->SetBool(MATERIAL_DISPLAY_USE_COLOR,true);
bc->SetBool(MATERIAL_DISPLAY_USE_DIFFUSION,true);
bc->SetBool(MATERIAL_DISPLAY_USE_LUMINANCE,true);
bc->SetBool(MATERIAL_DISPLAY_USE_TRANSPARENCY,true);
bc->SetBool(MATERIAL_DISPLAY_USE_ENVIRONMENT,true);
bc->SetBool(MATERIAL_DISPLAY_USE_BUMP,true);
bc->SetBool(MATERIAL_DISPLAY_USE_NORMAL,true);
bc->SetBool(MATERIAL_DISPLAY_USE_ALPHA,true);
bc->SetBool(MATERIAL_DISPLAY_USE_REFLECTANCE,true);
bc->SetBool(MATERIAL_DISPLAY_USE_DISPLACEMENT,true);
bc->SetVector(MATERIAL_VIEWPORT_REFLECTION_ENVIRONMENT_ROTATION, c4d.Vector(1.0,1.0,1.0);
bc->SetInt32(MATERIAL_DISPLACEMENT_TESSELLATION,MATERIAL_DISPLACEMENT_TESSELLATION_NONE);
bc->SetFloat(MATERIAL_DISPLACEMENT_TESSELLATION_UNIFORM_LEVEL,0.1);
bc->SetFloat(MATERIAL_DISPLACEMENT_TESSELLATION_ADAPTIVE_LEVEL,0.1);
pMaterial->Message(MSG_UPDATE);
}
Buttons
This node has buttons. Buttons can manually be executed by calling the following code
Python
c4d.CallButton(material,c4d.MATERIAL_OPEN_IN_NODEEDITOR)
c4d.CallButton(material,c4d.MATERIAL_CUSTOM_ADDCHANNEL)
C++
DescriptionCommand dc;
dc.id = DescID(MATERIAL_OPEN_IN_NODEEDITOR);
pMaterial->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(MATERIAL_CUSTOM_ADDCHANNEL);
pMaterial->Message(MSG_DESCRIPTION_COMMAND, &dc);