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

    COF dialog woes...

    SDK Help
    0
    4
    464
    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 16/06/2003 at 13:10, xxxxxxxx wrote:

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

      ---------
      Mmmh, it starts to get a little frustrating here...
      The dialog opens up correctly, but no value is set.

      What's wrong here? Any ideas?

        
           //create dialog  
           if (!gDial) gDial=new(mDialog);  
             
           //initialize  
           gDial->SetFloat(IDC_LIMIT_R,3.0,0.0,10000.0,1.0);  
           gDial->SetFloat(IDC_LIMIT_G, settings->GetFloat(1),0.0,10000.0,1.0);  
           gDial->SetFloat(IDC_LIMIT_B, settings->GetFloat(2),0.0,10000.0,1.0);  
           t1=settings->GetFloat(3);  
           t2=settings->GetFloat(4);  
           t3=settings->GetFloat(5);  
           temp=vector(t1,t2,t3);  
           gDial->SetColorChooser(IDC_COLOR1, temp, 1.0, 1.0, NO_BRIGHTNESS);  
        
           //... and open  
           gDial->Open(TRUE,-1,-1);  
      

      While I'm at it: How can I access the settings container from the dialog? I would like to update the settings when the values were changed in the dialog of course.

      Thanks

      Kabe

      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 16/06/2003 at 15:33, xxxxxxxx wrote:

        ? You should initialize the values in the overloaded dialog methods like Init.

        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 17/06/2003 at 04:42, xxxxxxxx wrote:

          Yep, I realized that in the meantime.

          To sum it up for later reference:
          Add the neccessary variables to the dialog class.

          Use these variables in mDialog::Init() to set the dialog controls, as Init() is called right before the dialog is actually opened.

          Considering this I think that the dialog methods for setting interface elements shouldn't be public anyway....

          Thanks!

          Kabe

          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 17/06/2003 at 04:45, xxxxxxxx wrote:

            ... and do not access settings from the dialog box either. Set the local variables of mDialog instead.

            Kabe

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