Modify Reflectance Layer Parameter

On 27/05/2016 at 03:34, xxxxxxxx wrote:

Hello,
Can someone give me an example how I can set Parameter in a Reflectance Layer?

I need to set parameter like roughness and Color.

On 03/06/2016 at 08:45, xxxxxxxx wrote:

Hello,

to edit a parameter of a reflection layer you have to construct the specific parameter ID using the data ID of the given layer and the parameter ID that is defined in the c4d_reflection.h header file. This is some simple example:

  
# create a new layer  
layer = mat.AddReflectionLayer()  
  
if layer is not None:  
   
  # configure layer  
  layerID = layer.GetDataID()  
    
  layer.name = "Gold Layer"  
  layer.flags = c4d.REFLECTION_FLAG_SELECTED  | c4d.REFLECTION_FLAG_TAB | c4d.REFLECTION_FLAG_ACTIVE  
    
  mat.SetParameter(layerID + c4d.REFLECTION_LAYER_FRESNEL_MODE, c4d.REFLECTION_FRESNEL_CONDUCTOR, c4d.DESCFLAGS_SET_0)  
  mat.SetParameter(layerID + c4d.REFLECTION_LAYER_FRESNEL_METAL, c4d.REFLECTION_FRESNEL_METAL_GOLD, c4d.DESCFLAGS_SET_0)  
    
  c4d.EventAdd()  

best wishes,
Sebastian