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

    FIT_H or SCALE_H in description files

    SDK Help
    0
    12
    1.2k
    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 03/05/2016 at 08:38, xxxxxxxx wrote:

      Oh, by the way, I know I can use LAYOUTGROUP
      However, I'm getting this:

      Everything is flushed to the left and I wanted it to span the whole with of the Attribute Manager.
      It seems that no combination of SCALE_H or FIT_H does the trick.
      And I can't even seem to be able to set those attributes to groups.

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

        On 03/05/2016 at 12:10, xxxxxxxx wrote:

        I ran into this same thing a very long time ago. And this was the only way I could do it.

        This is the .res file from my QuickSteps plugin:

        //This is an example of using LAYOUTGROUP to format two columns of GUI's  
        //The use of SEPARATOR Groups is the only way I found to push the second column GUI's over to the right  
          
        CONTAINER tquicksteps  
        {  
        NAME tquicksteps;  
        INCLUDE Texpression;  
        INCLUDE Obase;      
            
          GROUP ID_TAGPROPERTIES  
          {  
           STATICTEXT MYTEXT {ANIM OFF; } //ANIM OFF hides the set key option from the user  
            
            GROUP    //The master Group  
            {  
              LAYOUTGROUP; COLUMNS 6;   
            
              GROUP  
              {  
                BUTTON BTN_BAKE_STEPS {}  
            REAL NUMofGUIS {MIN 0.0; MAX 100.0; STEP 1;} //STEP controls the amount the values increase using the arrows  
            SEPARATOR { LINE; }          
          }  
          
              GROUP  //Used to space out the other two groups horizontally  
              {  
              SEPARATOR { LINE; }  
          }  
          
              GROUP  //Used to space out the other two groups horizontally  
              {  
              SEPARATOR { LINE; }  
          }  
          
              GROUP  //Used to space out the other two groups horizontally  
              {  
              SEPARATOR { LINE; }  
          }  
          
              GROUP  //Used to space out the other two groups horizontally  
              {  
              SEPARATOR { LINE; }  
          }  
          
              GROUP  
              {  
                BUTTON BTN_BAKE_KEYS {}  
            REAL NUMofKEYS {MIN 1.0; MAX 100.0; STEP 1;} //STEP controls the amount the values increase using the arrows  
          
            BUTTON BTN_DELETE_KEYS {}  
              }  
            }  
          }  
        }
        

        -ScottA

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

          On 03/05/2016 at 14:42, xxxxxxxx wrote:

          Thank you, Scott.
          But it is not working for me

          This is my .res file (I tried to follow your example but it still appears like in the image I posted above).

          CONTAINER vertexmapmix
          {
               NAME vertexmapmix;
               INCLUDE TBase;

          GROUP ID_TAGPROPERTIES
                    {
                    BOOL VMM_ONOFF {}

          LINK VMM_VERTEXMAP { ACCEPT {5682;} }

          GROUP
                         {
                         LAYOUTGROUP;
                         COLUMNS 6;

          GROUP
                              {
                              IN_EXCLUDE VMM_ATOMS
                                   {

          NUM_FLAGS 0;
                                  INIT_STATE 0;
               
                                   ACCEPT {5682;}
                                   }
                              SEPARATOR { LINE; }
                              }

          GROUP
                         {
                         SEPARATOR { LINE; }
                         }

          GROUP
                         {
                         SEPARATOR { LINE; }
                         }

          GROUP
                         {
                         SEPARATOR { LINE; }
                         }

          GROUP
                         {
                         SEPARATOR { LINE; }
                         }

          GROUP
                              {
                              BOOL VMM_ATOM_ONOFF {}
                              LONG VMM_ATOM_MIX { CYCLE { VMM_MIX_NORMAL; VMM_MIX_MULT; VMM_MIX_MIN; VMM_MIX_MAX; VMM_MIX_ADD; VMM_MIX_SUB; } }
                              }

          }

          }
          }

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

            On 03/05/2016 at 16:10, xxxxxxxx wrote:

            My notes about this are very poor. So I can't offer much more help.
            The basic idea is that you add dummy groups between your groups of gizmos.
            It does push things to the right. But it's a hack, and I don't know how much control you'll get from it.
            This was the only way I could figure out how to spread out two columns of gizmos horizontally in a node based AM window.

            Here's a slightly differnt/simpler example:

            CONTAINER MyTag_dec  //Container Must! be set to the name of your .h file  
            {  
            NAME MyTag_dec;  
            INCLUDE Obase;  
              
            GROUP  
            {          
                    
                GROUP  //The master Group  
                {  
                  LAYOUTGROUP; COLUMNS 3;  
              
                       GROUP  
                      {  
                          IN_EXCLUDE MY_IE{}  
                      }  
                        
                      GROUP  
                      {  
                        STATICTEXT { }  //<--Dummy gizmo for spacing. This is not declared in the .h or str files  
                      }  
                        
                      GROUP  
                      {     
                          STATICTEXT MY_TEXT {}                 
                          BOOL MY_CHECKBOX{}   
                          REAL MY_NUMEDIT{MIN 1.0; MAX 100.0; STEP 1;}  
                          BUTTON MY_BTN{}  
                      }  
                }  
            }  
            }
            

            -ScottA

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

              On 03/05/2016 at 17:00, xxxxxxxx wrote:

              This is the .res file I tried:

              CONTAINER vertexmapmix
              {
                   NAME vertexmapmix;
                   INCLUDE TBase;

              GROUP ID_TAGPROPERTIES
                        {
                        BOOL VMM_ONOFF {}

              SEPARATOR { LINE; }

              GROUP
                             {
                             COLUMNS 3;

              LINK VMM_VERTEXMAP { ACCEPT {5682;} }

              BUTTON VMM_CREATEVERTEXTAG { NAME VMM_CREATEVERTEXTAG_TEXT; }

              BUTTON VMM_SELECTVERTEXTAG { NAME VMM_SELECTVERTEXTAG_TEXT; }

              }

              SEPARATOR { LINE; }
                        
                        GROUP
                             {
                             LAYOUTGROUP; COLUMNS 3;

              GROUP
                                  {
                                  IN_EXCLUDE VMM_ATOMS
                                       {

              NUM_FLAGS 0;
                                      INIT_STATE 0;

              ACCEPT {5682;}
                                       }
                                  }

              GROUP
                                  { STATICTEXT {} }

              GROUP
                                  {
                                  BOOL VMM_ATOM_ONOFF {}
                                  
                                  LONG VMM_ATOM_MIX { FIT_H; CYCLE { VMM_MIX_NORMAL; VMM_MIX_MULT; VMM_MIX_MIN; VMM_MIX_MAX; VMM_MIX_ADD; VMM_MIX_SUB; } }

              SPLINE VMM_ATOM_CURVE
                                            {
                                            SHOWGRID_H;
                                            SHOWGRID_V;
                                            GRIDSIZE_V 8;
                                            X_MIN 0.0;
                                            X_MAX 1.0;
                                            Y_MIN 0.0;
                                            Y_MAX 1.0;
                                            EDIT_H;
                                            EDIT_V;
                                            }

              }

              }

              }
              }

              And this is what I get:

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

                On 03/05/2016 at 17:48, xxxxxxxx wrote:

                Well...It's better than it was.
                At least now they aren't both squished up against each other to the left.
                Maybe you can try a different kind of dummy gizmo to see if it pushes the second column farther to  the right. Or maybe add another group. Or maybe a combo of the two.

                The Maxon support guys might know of a better way.
                It was along time ago and I have a bad memory. But I'm fairly sure I remember they said that there was no way to format columns in a Node based AM window with the SDK.
                And I typically only invent terrible hacks like this when there is no other choice.

                -ScottA

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

                  On 03/05/2016 at 17:58, xxxxxxxx wrote:

                  Yes, I just found a few minutes ago another post (that I created sometime ago) and the final verdict was that it is not possible
                  So, I re-arranged my layout and, although not as pretty and efficient as the one I wanted, it is not bad.
                  But it has no columns

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

                    On 03/05/2016 at 18:13, xxxxxxxx wrote:

                    These might help you.

                    STATICTEXT { JOINENDSCALE; }
                    STATICTEXT { JOINEND; }

                    These will tell the previous widget to use up its space to the right of the widget.

                    Here is an example use.

                    GROUP
                    {
                         COLUMNS 3;

                    SEPARATOR { LINE; }
                         STATICTEXT { JOINENDSCALE; }
                         STATICTEXT { JOINEND; }
                              
                         REAL MY_VALUE { MIN 0.1; MINSLIDER 1; MAXSLIDER 100; CUSTOMGUI REALSLIDER; SCALE_H; }
                         STATICTEXT { JOINENDSCALE; }
                         BUTTON MY_BUTTON { ALIGN_LEFT; }
                         
                         BOOL MY_BUTTON2 { }
                         STATICTEXT { DUMMY; }
                         STATICTEXT { DUMMY; }
                    }

                    The SEPARATOR line will go over all 3 columns.
                    The Real value will be a slider that uses up most of the space but puts a button at end of it.
                    The last button will just be in a row by itself with the next 2 columns empty.

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

                      On 03/05/2016 at 18:25, xxxxxxxx wrote:

                      Thank you,kbar.
                      I will look into it tomorrow.
                      It is already very late here (2:24 a.m.)

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

                        On 03/05/2016 at 21:26, xxxxxxxx wrote:

                        This is a list of all the known flags that STATICTEXT can have, based on what is currently used in C4D R17.

                        http://dev.gamelogicdesign.com/Description/FindElementFiles?elem=STATICTEXT

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

                          On 04/05/2016 at 04:45, xxxxxxxx wrote:

                          I have been trying but I still can't make it work like I want
                          This is the type of layout I need:

                          So, I guess I really need to use LAYOUTGROUP. But the LAYOUTGROUT doesn't expand to the whole width of the window.

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