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

    Shader-Material Linking

    Cinema 4D SDK
    c++ r20 sdk classic api
    2
    2
    419
    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.
    • O
      Ogers
      last edited by Ogers

      Hello,
      I know that for the BaseMaterial we can find which shader is applied to color's texture or diffusion's texture and so by using a BaseContainer
      (basecontainer->GetLink(MATERIAL_COLOR_SHADER, doc)) or a GeData by using GetParameter() function.
      Can we do the opposite of this. By traversing through all the shaders to find in which parameter(color,diffusion,luminance...) of a material each shader is used.
      Thank you.

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @Ogers, unfortunately, there is no direct way to do so.
        The only working solution is to retrieves the host of the shader (using BaseList2D.GetMain) Then iterates the description of this element and all its children to see where the shader is used.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

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