Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Transparency channel - Color update

    Cinema 4D SDK
    2
    3
    639
    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.
    • KantroninK
      Kantronin
      last edited by

      Hi,
      In the 'Transparency' channel of a material, I need to modify the color.
      How to read and modify this value with Python ?
      I already have the material identifier.

      1 Reply Last reply Reply Quote 0
      • P
        PluginStudent
        last edited by

        You can simply edit the MATERIAL_TRANSPARENCY_COLOR parameter.

        Mat[c4d.MATERIAL_TRANSPARENCY_COLOR]
        

        The parameter stores a c4d.Vector.

        You find examples on how to handle materials on GitHub.

        1 Reply Last reply Reply Quote 2
        • KantroninK
          Kantronin
          last edited by

          I found the solution (I already had this problem but I couldn't remember the right code)

          mat [c4d.MATERIAL_TRANSPARENCY_COLOR] = c4d.Vector (1.0, 1.0, 1.0) #color white
          mat.Update (True, True)

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