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

    HandleShaderMessage

    Cinema 4D SDK
    2
    3
    417
    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.
    • RenatoTR
      RenatoT
      last edited by

      Hi All,

      i'm working on my custom shader that can have a lot of subshaders as the C4D Layer shaders.

      Using HandleShaderMessage i get problem with TextureManager. Every time i add a texture, in TexManager the list will be replaced by last shader added and also with Save Project with Asset i get Double Textures, renamed, in Tex Folder.
      My question is: Do i really need to use HandleShaderMessage? If so.. why ?

      Thanks in advance
      Renato T.

      1 Reply Last reply Reply Quote 0
      • RenatoTR
        RenatoT
        last edited by

        Seem that i miss to set in GetRenderInfo() the SHADERINFO_DYNAMICSUBSHADERS. Now all seem working good. A confirmation will be welcome. 🙂

        Thanks
        Renato T.

        1 Reply Last reply Reply Quote 0
        • r_giganteR
          r_gigante
          last edited by

          Hi @RenatoT thanks for reaching out us.
          Can you please:

          • add a tag to specify the C4D version you're using?
          • can you make use of the Q&A functionality?

          With regard to HandleShaderMessage, I confim that it is indeed used by shaders in NodeData::Message() when they have subchannels. The code snippet found the call documentation represents exactly what is used in the Fusion shader with regard to the Base, Mask and Blend channels.

          Instead with regard to SHADERINFO_DYNAMICSUBSHADERS, assuming I've checked the version of Cinema you're working with, it is used no more.

          Looking forward your further notes, give best.

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