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
    • Recent
    • Tags
    • Users
    • Login

    Extend layout items. How [CLOSED]

    Scheduled Pinned Locked Moved PYTHON Development
    18 Posts 0 Posters 1.3k Views
    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 Offline
      Helper
      last edited by

      On 12/12/2014 at 12:28, xxxxxxxx wrote:

      I have a layout defined by a res file (a container, for an object).
      I would like some numerical fields with sliders to extend all the way to the end of the layout, like this:

      I already tried adding FIT_H or SCALE_H to the numerical fields but they always stay flush left.
      How can I do it, if possible?
      Here is the content of my res file:

        
      CONTAINER arbor_mesh  
      {  
         NAME arbor_mesh;  
         INCLUDE Obase;
        
         GROUP ID_OBJECTPROPERTIES  
              {
        
              LINK AM_ARBOR { ACCEPT {1029339;} }
        
              SEPARATOR {LINE;}
        
              GROUP  
                   {  
                   LAYOUTGROUP;  
                   COLUMNS 2;
        
                        GROUP  
                             {  
                             BITMAPBUTTON AM_PROFILE_PREVIEW { FIT_H; BORDER; ICONID1 1034215; }  
                             }
        
                        GROUP  
                             {  
                               LONG AM_TRUNK_SUBDIVS { FIT_H; MIN 3; MAX 50; CUSTOMGUI LONGSLIDER; }  
                               REAL AM_TRUNK_RADIUS_IN { FIT_H; MIN 1.0; CUSTOMGUI REALSLIDER; }  
                             REAL AM_TRUNK_RADIUS_OUT { FIT_H; MIN 1.0; CUSTOMGUI REALSLIDER; }  
                               REAL AM_TRUNK_VAR { FIT_H; MIN 0.0; MAX 100.0; UNIT PERCENT; CUSTOMGUI REALSLIDER; }  
                               LONG AM_TRUNK_SEED { FIT_H; MIN 1; MAX 999999; }  
                               }  
                     }  
                     SEPARATOR {LINE;}  
                }  
           GROUP ABOUT  
              {  
              STATICTEXT ABOUT_ME1 { ANIM OFF; }  
              SEPARATOR {LINE;}  
              STATICTEXT ABOUT_ME2 { ANIM OFF; }  
              }  
      }
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 12/12/2014 at 12:42, xxxxxxxx wrote:

        Hello,

        The group should also have the FIT_H flag.
        Best wishes
        Martin

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

          On 12/12/2014 at 14:35, xxxxxxxx wrote:

          I had tried that already, but I get this when I add my object to the scene:

          Error reading resource
          file '/Applications/Maxon/Cinema4D 14 - DEV/plugins/Arbor/res/description/arbor_mesh.res'
          Line 9

          The line number is the line where I have the FIT_H;
          Is there any specific place, inside the GROUP where I should place it?

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

            On 12/12/2014 at 14:57, xxxxxxxx wrote:

            Hi,

            it would be easier, if you showed us the lines around line 9...
            Basically for groups it looks like this:

            GROUP
            {
              FIT_H; SCALE_H;
              ...
            }
            
            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 12/12/2014 at 15:46, xxxxxxxx wrote:

              Yup, that is what I did.
              It returned that error 😞
              Is it only valid for dialogs? Not for containers?

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

                On 12/12/2014 at 15:51, xxxxxxxx wrote:

                Please try it without using the LAYOUTGROUP flag.

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

                  On 12/12/2014 at 16:01, xxxxxxxx wrote:

                  I still get the same error, even without the LAYOUTGROUP flag.
                  The error occurs in the line where I place the FIT_H; or the SCALE_H;
                  right after the start of the GROUP, like this:

                  GROUP
                  {
                  FIT_H; // This line results in an error

                  LONG MY_VALUE { FIT_H; MIN 1; MAX 10;}
                  }

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

                    On 12/12/2014 at 17:04, xxxxxxxx wrote:

                    I can´t reproduce this error, sorry!

                    But as a solution for your problem, just make a two columns group(no Layoutgroup which seems to fix your scaling) and fill the left sided items with empty statictexts.
                    like:

                      
                      GROUP  
                      {  
                          COLUMNS 2;  
                      
                          BITMAPBUTTON AM_PROFILE_PREVIEW { FIT_H; BORDER; ICONID1 1034215; }  
                          REAL AM_TRUNK_VAR { FIT_H;SCALE_H; MIN 0.0; MAX 100.0; UNIT PERCENT; CUSTOMGUI REALSLIDER; }  
                          STATICTEXT DUMMY1 { }  
                          REAL AM_TRUNK_SEED { FIT_H;SCALE_H; MIN 0.0; MAX 100.0; UNIT PERCENT; CUSTOMGUI REALSLIDER; }  
                      
                      }  
                      
                    Best wishes  
                    Martin  
                    [CODE]  
                    
                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      Helper
                      last edited by

                      On 12/12/2014 at 17:40, xxxxxxxx wrote:

                      Didn't work 😞
                      I mean, the error is gone, but I need all the numerical fields at the side of the BITMAPBUTTON (that is 100x100 pixels).
                      Using that method, I will get one numerical field at the right of the BITMAPBUTTON but then all other numerical fiels will be at the right of the BITMAPBUTTON but also, below it.

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

                        On 12/12/2014 at 18:28, xxxxxxxx wrote:

                        Hi Rui,

                        Try using SCALE_H; on your sliders instead of FIT_H;
                        This should extend your slider gizmos to the edge of the master C4D window. And it will scale them on the left so they always stay next to your bitmap button gizmo if you change the size of the AM window(the AM border that's next to the materials manager & scene window).

                        -ScottA

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

                          On 12/12/2014 at 18:48, xxxxxxxx wrote:

                          Hello Scott,

                          as I mentioned the LAYOUTGROUP flag don´t let you scale the gizmos anymore.
                          SCALE_H won´t work either.
                          My other suggestion only works with checkboxes and stuff that has a "normal" size, not 100 pixels high.
                          I give up on that, sorry guys. Good night
                          Martin

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

                            On 13/12/2014 at 04:20, xxxxxxxx wrote:

                            Well, I will have to give up on this too. There seems to be no way to do what I would like to do 😞
                            Thank you all.

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

                              On 13/12/2014 at 05:23, xxxxxxxx wrote:

                              Hi Rui,

                              at first I want to apologize. It was late yesterday, and I didn't watch the details closely enough. Sorry.

                              You are right, my suggestion with SCALE_H; FIT_H; works for dialogs, only (and not for descriptions). My first mistake.
                              And then I did not pay enough attention to your desired layout. My second mistake.

                              Now, I have set up a test case here and can acknowledge, it does not work straight forward (which you already know). Although I have no solution yet, I'll try to find one. I'll come back to you as soon as I have any news. This probably won't happen before Monday, though.

                              Sorry for the inconvenience.

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

                                On 13/12/2014 at 05:52, xxxxxxxx wrote:

                                You are welcome, Andreas.
                                And thank you in advance.
                                It is mainly a aesthetic issue but, since I'm a designer that likes to code (and not a coder that likes design), layouts are a big issue to me 🙂

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

                                  On 15/12/2014 at 10:02, xxxxxxxx wrote:

                                  Rui,
                                  I have to admit, I found no way to pull this off.
                                  In a dialog this is possible, but in a description resource it currently seems impossible. If I stumble over a solution, I'll get back to you, promised. But for now, I'm afraid you have to fall back to a simpler layout.
                                  Sorry 😢

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

                                    On 15/12/2014 at 10:34, xxxxxxxx wrote:

                                    Thank you for checking this out, Andreas.
                                    I hope this gets a fix, soon.

                                    Rui Batista

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

                                      On 08/01/2015 at 13:16, xxxxxxxx wrote:

                                      You might want to investigate the resource file for the Motion Camera tag as on the Motion tab is seems to have sliders like you want.

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

                                        On 09/01/2015 at 02:39, xxxxxxxx wrote:

                                        Thank you for your suggestion, Donovan. However, it is not what I want 😞
                                        I can easily span gizmos along the whole width of the Attribute Manager.
                                        But what I want is to have them beside a User Area and still span. And that seems to be impossible 😞

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