Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    number of dialog parameters restricted?

    SDK Help
    0
    8
    617
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 11/12/2006 at 09:00, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.6 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi,
      I have a strange problem and I can't seem to find a solution for it.
      I have made a dialog with quite a few parameters (20 to be exact). This worked fine till I added some more parameters. It seems, that until 21 everything is fine, but as soon as I add more, I get this error. Of course, I changed the class and dialog:dialog settings as well, so I am quite at a loss here.
      I there some way to define the max number of dialog parameters?
      Thanks for your help
      André

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 11/12/2006 at 09:45, xxxxxxxx wrote:

        Dialogs are unrestricted here - I have a main dialog which contains hundreds of 'parameters'.

        Couple questions:

        Dialog or 'Attributes Manager'? Different beasts, I'm afraid.

        Are you sure that you didn't miss something, repeat a gadget ID, miss a group terminator, etc.? Code to examine is always useful.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 11/12/2006 at 10:45, xxxxxxxx wrote:

          Robert,
          thank you for your prompt answer. I must admit, I am quite new to COFFEE, so maybe there is some really simple mistake, which I haven't noticed.
          The dialog is for an expression tag plugin.
          In the .cof file I have included the .col file in which the actual dialog is build. I have not used any enums or other files (don't quite understand them yet).
          As for the structure, here is a code sniplet (don't laugh, this is quite chaotic) from the .cof file:

            
          ...  
          ...  
          MyExpressionPluginTag::Edit()  
          {  
          var d=new(dialog,fade_in,anim_in,anim_start,anim_speed,anim_offset,move_x,move_y,move_z,pe_inx,pe_iny,pe_inz,rot_X,rot_Y,rot_Z,re_inx,re_iny,re_inz,extrude_amount,scalex,scaley);   
                if(d->Open(-1,-1))          
                {                           
               fade_in=d->fade_in;  
               anim_in=d->anim_in;  
               anim_start=d->anim_start;  
               anim_speed=d->anim_speed;  
               ...etc...}
          

          All variables used are globally declared.
          This is from the .col file:

            
          class dialog : GeModalDialog  
          {  
          public:  
              dialog(in_fade,in_anim,start_anim,speed_anim,offset_anim,_X,_Y,_Z,inx_pe,iny_pe,inz_pe,rot_X,rot_Y,rot_Z,inx_re,iny_re,inz_re,amount_extrude,x_scale,y_scale);   
              CreateLayout();  
              Command(id,msg);  
               var obj,T,anim_in,anim_out,anim_start,anim_speed,anim_offset,move_x,move_y,move_z;  
               var pe_inx,pe_iny,pe_inz,re_inx,re_iny,re_inz;  
               var rotate_x,rotate_y,rotate_z,fade_in,fade_out,extrude_amount;  
               var scalex,scaley,scalez,se_inx,se_iny,se_inz;  
          }  
            
          dialog::dialog(in_fade,in_anim,start_anim,speed_anim,offset_anim,_X,_Y,_Z,inx_pe,iny_pe,inz_pe,rot_X,rot_Y,rot_Z,inx_re,iny_re,inz_re,amount_extrude,x_scale,y_scale)   
          {  
          ...  
          ...etc.  
          

          If I take away the scaley- respectively the y_scale-variable/parameter, everything works like charm.
          I must admit, that I don't entirely understand why I have to declare all values twice (public and dialog:dialog), but that's another problem 😉
          As for a missing group terminator - that of course happened before, but mostly the only result was a messed up dialog box without any error messages.
          Maybe you have an idea, your help is greatly appreciated.
          If you need the files, I can post them, too.
          Thank you very much
          André

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 11/12/2006 at 12:14, xxxxxxxx wrote:

            I'd probably need to see the files as nothing of much concern can be seen in the given code.

            One unrelated thing you should do after the dialog open is then check the result before setting the global variables according to the dialog variable settings:

            if (d->Open(-1,-1))
            {
               if (d->GetResult())
               {
                  fade_in=d->fade_in;
                  ...
               }
            }

            This will let users cancel the change process and keep the original variable settings untouched.

            Look forward to checking the files.

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 11/12/2006 at 13:11, xxxxxxxx wrote:

              Robert,
              this is awefully nice of you. If you don't mind, I'd like to send the files via mail. If you do, I can also upload them to my server and post the link here.
              Again, thank you very much for taking the time.
              André

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 11/12/2006 at 20:02, xxxxxxxx wrote:

                You've got mail.
                André

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 12/12/2006 at 09:08, xxxxxxxx wrote:

                  Okay, I think that you were close to the problem but not quite. This doesn't look to be a limitation of the dialog, but of constructors in COFFEE. It appears that the new(class,...) can only accept 20 parameters (despite the ellipses).

                  Instead of using a long argument list, it may be best to use a struct to pass as argument instead. I'm emailing back with modified code attached for your examination.

                  ETA: It may also be possible to use another method instead of the constructor (add an InitMyDialog() to the dialog class) and provide the argument list there. Let me try that and see if the argument count is limited only to constructors or is more ubiquitous.

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 12/12/2006 at 09:58, xxxxxxxx wrote:

                    Robert,
                    I just got your modified files and you really made my day! Thank you so very much for helping me out.
                    André

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