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

    [SOLVED] Disabling Reflection Channel

    SDK Help
    0
    3
    694
    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
      Helper
      last edited by

      On 24/02/2018 at 00:45, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R18 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi all,

      I'm trying to do something rather simple, disable the reflection channel on a material.

      I've tried both of these

      newMat->SetChannelState(CHANNEL_REFLECTION, false);
      newMat->SetParameter(MATERIAL_USE_REFLECTION, false, DESCFLAGS_SET_0);
      

      Neither have any effect, however they both work flawlessly in the Python console within c4d.
      I'm not having issues setting any other channel, just the reflection channel Confused

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

        On 26/02/2018 at 09:35, xxxxxxxx wrote:

        Hi,

        in which context are you trying to do this? Is it a script? Or a scene importer? Or something completely different?
        If it's in a SceneLoaderData, you probably have to set REFLECTION_LAYER_IMPORTED.
        See here the Material manual. Or this blog post about Cinema 4D R16 Reflectance channel's API[URL-REMOVED].


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

          On 26/02/2018 at 22:53, xxxxxxxx wrote:

          Blah I somehow missed that while skimming through the material manual. It is a SceneLoaderData plugin and that absolutely did the trick, thank you Andreas! 🙂

          my code for reference

          newMat->SetChannelState(CHANNEL_REFLECTION, false);
          newMat->GetDataInstance()->SetBool(REFLECTION_LAYER_IMPORTED, true);
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post