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

    ShaderLink in DescriptionToolData not allowed?

    SDK Help
    0
    3
    297
    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 08/04/2015 at 01:50, xxxxxxxx wrote:

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

      ---------
      Hi,

      I have a DescriptionToolData tool and in its description resources I use a ShaderLink element. However, the element does not seem to work. It opens the shader menu upon clicking but selecting a shader does not add it into the shader link slot (actually nothing happens).

      Is a shaderlink element not supported in a DescriptionToolData or what is the reason?

      I am using shaderlinks everywhere in my code and never had this issue.

      Thanks for sheding some light here

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

        On 08/04/2015 at 07:04, xxxxxxxx wrote:

        Hello,

        indeed, it seems that a SHADERLINK won't work in a DescriptionToolData plugin.

        In Cinema 4D shaders are stored with objects (using InsertShader()). So when you add a shader in a MaterialData plugin, this shader is stored with the host material. It is important that the entity that stores the shader is part of the document.

        In this case the host of the shaderlink is a tool. So the shaderlink tries to save the shader with the tool. But later the same shaderlink tries to get the shader again. But since the tool is no part of the document it cannot receive the shader and the process fails.

        Best wishes,
        Sebastian

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

          On 08/04/2015 at 10:11, xxxxxxxx wrote:

          Ah I see. Thanks Sebastian, this helps.

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