Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Modify Reflectance Layer Parameter

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 249 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post