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

    How to change SHADERLINK GUI? [SOLVED]

    SDK Help
    0
    8
    681
    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 22/01/2016 at 07:32, xxxxxxxx wrote:

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

      ---------
      Hello Cinema community!

      Now I start working on Cinema UI integration with my shader system. Many things are clear and thanks for that to developers! But there is one issue:
      When I write

       SHADERLINK ID_BSDF_SHADER          { } 
      

      it then displays as shown on the Figure 1 :
      http://www.dropbox.com/s/h7f6dzfgwx4b6j4/005.jpg?dl=0

      Based on Cinema's ShaderData class I have created a shader of my custom type "engineBSDF" (which has many parameters similar to the concept of Cinema material).
      I have also created "engineMaterial" based on Cinema's MaterialData class (which has many layers which can be of only engineBSDF type). And only this engineMaterial can be applied to scene objects.

      In the res file corresponding to engineMaterial I have written several SHADERLINKs that are supposed to be used to connect engineBSDF as layers to engineMaterial. 
      But SHADERLINK produces in GUI 3 clickable buttons:

      1. a button (where you can select one of many shader types) (#1 on Fig 1)
      2. a long button with name of shader (#2 on Fig 1)
      3. button with "..." (#3 on Fig 1). 
        Basically I don't want #2 and #3 to be there. Or at least it is good to choose my preferred shader type when user clicks #2 or #3 rather than Cinema's bitmap file.

      What flags for SHADERLINK should I use and how?

      Thanks a lot!

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

        On 23/01/2016 at 09:55, xxxxxxxx wrote:

        I don't think you can change the gui exhibited as it is. You won't get around creating your own customgui or datatype for this.

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

          On 23/01/2016 at 10:52, xxxxxxxx wrote:

          Hi Katachi,

          After digging a lot I can conclude it seems to be so. But dynamic tabs that can be done inside material interface make reaching my target possible: implementing many layers for material. It is also quite convenient too.

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

            On 25/01/2016 at 01:43, xxxxxxxx wrote:

            Hello,

            actually it is possible to only display the popup button of the SHADERLINK parameter. This is done by setting the "POPUP_ONLY" flag

              
            SHADERLINK MY_SHADER { CUSTOMGUI SHADER; POPUP_ONLY;}  
            

            best wishes,
            Sebastian

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

              On 25/01/2016 at 03:43, xxxxxxxx wrote:

              Thanks for the info Sebastian! Didn't know that. It would be so great if all these resource flags were documented..

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

                On 25/01/2016 at 04:10, xxxxxxxx wrote:

                At least you can use ResEdit for it. 😉

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

                  On 25/01/2016 at 05:49, xxxxxxxx wrote:

                  Oh, great! Thanks, Sebastian and Niklas!
                  Please, can you also show a link with tutorial on how to install and use ResEdit?

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

                    On 25/01/2016 at 06:02, xxxxxxxx wrote:

                    Nice tip Niklas! : )

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