resbased dialog, combobox changes layout [SOLVED]



  • On 03/11/2014 at 03:58, xxxxxxxx wrote:

    Hi,

    I´m writing a res based Dialog Plugin and I want to change the layout by the users choice of a combobox.
    It´s no problem to accomplish this inside my python file with a script based Dialog, but I want to know, how to do it with a resource file or if it´s even possible.

    It seems to me that I can´t set HIDDEN flags in a dialog plugin, as it´s not possible to set up CYCLE´s and several other gui elements.

    Could anyone give me a hint or at least call the gui elements we can´t use in a dialog plugin?

    Thanks in advance
    Martin



  • On 03/11/2014 at 08:14, xxxxxxxx wrote:

    Hello,

    you can hide an element defined in a resource. Make sure to assign a number to this element in the c4d_symbols.h file. Then catch your events in the Command function. To hide an element simply call "HideElement()". After that make sure Cinema redraws the dialog group that contains the element by calling LayoutChanged:

      
              self.HideElement(3000,True)  
              self.LayoutChanged(1000)  
    

    You find a documentation of all elements available in a dialog here:

    Additional information on how to use dialog resources can be found here:

    Instead of using a LONG parameter with a CYCLE you must use a COMBOBOX. Let me know if that helps you.

    Best wishes,
    Sebastian



  • On 03/11/2014 at 08:48, xxxxxxxx wrote:

    Hi Sebastian,

    thanks for the reply!
    That looks promissing!
    Ok I´ve to hide the element within the python file.
    I´ll take a look at all the docs tonight and will report tomorrow.

    Best wishes,
    Martin



  • On 04/11/2014 at 01:34, xxxxxxxx wrote:

    Hi Sebastian,

    this is exactly, I was looking for. Thank you!
    It was a bit fiddly to show and hide with three colums and keep the look of the dialog
    and special, that even a separator needs an id.
    Anyway, I solved it.

    One last thing I could not solve:
    If I want a separator to separate three colums at once with no gaps.
    I tried this one but no luck:

      
          SEPARATOR DUMMY3 {SCALE_H;}  
          STATICTEXT DUMMY4 { NAME DUMMY4; JOINENDSCALE; }  
          STATICTEXT DUMMY5 { NAME DUMMY5; JOINENDSCALE; }  
      
    

    I´ll be glad if you could help me again!

    Best wishes
    Martin



  • On 04/11/2014 at 05:56, xxxxxxxx wrote:

    Hello,

    I think it's not possible to create a separator across the columns of a group within that group. The only way may be to use two groups:

      
        GROUP   
        {  
          COLUMNS 3;  
            
        }  
          
        SEPARATOR {SCALE_H;}  
          
        GROUP   
        {  
          COLUMNS 3;  
        }  
    

    best wishes,
    Sebastian



  • On 04/11/2014 at 14:59, xxxxxxxx wrote:

    Thank you again!
    now I can fiddle about my dialog.
    Groups in groups in groups

    Best wishes
    Martin


Log in to reply