Shaderlink / Texbox in GeDialog ?



  • On 16/02/2017 at 11:11, xxxxxxxx wrote:

    no no...

    i wanted to code a helper plugin to setup materials
    for that i must be able to select textures and all shaders, noise, layer, etc etc

    so i would need a texbox :(



  • On 16/02/2017 at 12:05, xxxxxxxx wrote:

    My point is that there are many ways to do what you want without using the shaderlink custom gui.
    For example. You can iterate through a material/materials and get&set the shader links manually.

    import c4d  
      
    shdrlist = []  
      
    def ShaderSearch(shader) :  
      next = shader.GetNext()  
      down = shader.GetDown()   
      if down: ShaderSearch(down)  
      if next: ShaderSearch(next)  
        
      shdrlist.append(shader.GetName())     
      
    def main() :  
        
      mat = doc.GetActiveMaterial()  
      if mat is None: return  
        
      shdr = mat.GetFirstShader()  
      if shdr is None: return  
        
      ShaderSearch(shdr)  
      print shdrlist  
        
      c4d.EventAdd()  
        
    if __name__=='__main__':  
      main()
    

    Where you get the images or shaders that you want to add. And how you want the user to do that task is relative. All depending on your specific desired workflow.
    The shaderlink custom gui might be the most obvious thing to use. But it's not your only option.

    For visualizations. I've written dialog plugins that show the active material using a bitmap button to display it. That can be updated by clicking on them. A UserArea could also be used for this. This gets around the limitation of not being able to use a material gadget in a GeDialog.
    The sdk as so many options in it that you should be able to do almost anything you want to do. But you might have to do them by hand, instead of using a pre made gadget.

    -ScottA



  • On 17/02/2017 at 01:26, xxxxxxxx wrote:

    Yes, the TextBox GUI works with the C++ API.

    And I've already added TexBoxGui to the Python API todo list 🙂



  • On 17/02/2017 at 03:05, xxxxxxxx wrote:

    @ ScottA:
    i would need to be able to choose from all available shaders in c4d, not from the shaders of a selected material.
    the goal is to have the same choice for a shader like when you would be in the material editor itself.

    @ Yannick:
    good news :) !
    but that probably wont go that fast, will it? .)



  • On 17/02/2017 at 05:17, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    good news :) !
    but that probably wont go that fast, will it? .)

    Missing classes and functions are regularly added to the Python API.



  • On 20/05/2017 at 01:37, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Originally posted by xxxxxxxx

    good news :) !
    but that probably wont go that fast, will it? .)

    Missing classes and functions are regularly added to the Python API.

    was there a progress regarding texbox/shader?

    does it work to add a texbox/shader in a GeDialog in python by now?

    my project is kinda stuck till then...
    and i dont even know where i could see a change,
    i guess such details are not in the release notes



  • On 21/05/2017 at 03:11, xxxxxxxx wrote:

    Such details are in the Python documentation "What's New"
    page. Additions to the Python API usually only come with a
    new C4D release, so you'll have to wait until R19.



  • On 06/09/2017 at 00:33, xxxxxxxx wrote:

    ... mhh... i read the news here ...
    https://developers.maxon.net/docs/Cinema4DPythonSDK/html/misc/api_changelist_R19.html

    but i think the Shaderlink / Texbox / SHADER gadget inside a dialog wasn't added to the Python API :/

    is that correct and is it still on the todo list?



  • On 06/09/2017 at 05:22, xxxxxxxx wrote:

    Hi,

    unfortunately the TexBox CustomGUI didn't make it into R19. Sorry. To our excuse, we never said it would.
    But at least I can confirm, it is still on our ToDo list.



  • On 06/09/2017 at 23:09, xxxxxxxx wrote:

    No excuse needed, it wasn't promised at all :)

    But is there a chance that this gets added in between major releases
    (in other words anytime soon-ish) ?

    or is it more likely to take a year or two?
    (i guess it is not tagged with high priority)


Log in to reply