How to change SHADERLINK GUI? [SOLVED]



  • 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!



  • 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.



  • 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.



  • 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



  • 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..



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

    At least you can use ResEdit for it. ;)



  • 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?



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

    Nice tip Niklas! : )


Log in to reply