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

    R25 - Modal dialog's Color Chooser issue

    Bugs
    python
    2
    3
    858
    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.
    • A
      aturtur
      last edited by Manuel

      Hello. I recently hopped from R21 to R25 and noticed some weird behaviors with R25.

      If I create a modal dialog with a color field in it and try to open the color picker window by clicking the color field, it doens't open in R25. This works in R21.

      dialog_modal.jpg

      Code for the modal dialog setup:

      import c4d
      from c4d import gui
      from c4d.gui import GeDialog
      
      # Classes
      class Dialog(GeDialog):
          def __init__(self):
              super(Dialog, self).__init__()
              self.res = c4d.BaseContainer()
      
          # Create Dialog
          def CreateLayout(self):
              self.SetTitle("Dialog")
              self.GroupBegin(1000, c4d.BFH_CENTER, cols=1, rows=1, groupflags=1, initw=125, inith=0)
              self.GroupBorderSpace(5, 5, 5, 5)
              self.AddColorField(2002, c4d.BFH_FIT, initw=70, inith=13, colorflags=c4d.DR_COLORFIELD_POPUP)
              self.SetColorField(2003, c4d.Vector(0,0,0), 1, 1, c4d.DR_COLORFIELD_ENABLE_COLORWHEEL)
              self.GroupEnd()
              return True
      
      # Functions
      def main():
          dlg = Dialog() # Create dialog object
          dlg.Open(c4d.DLG_TYPE_MODAL, 0, -1, -1, 0, 0) # Open dialog
      
      # Execute main()
      if __name__=='__main__':
          main()
      

      When creating an asynchronous dialog, the color chooser window will pop up correctly.

      dialog_async.jpg

      Code for the async dialog setup:

      import c4d
      from c4d import gui
      from c4d.gui import GeDialog
      
      # Classes
      class Dialog(GeDialog):
          def __init__(self):
              super(Dialog, self).__init__()
              self.res = c4d.BaseContainer()
      
          # Create Dialog
          def CreateLayout(self):
              self.SetTitle("Dialog")
              self.GroupBegin(1000, c4d.BFH_CENTER, cols=1, rows=1, groupflags=1, initw=125, inith=0)
              self.GroupBorderSpace(5, 5, 5, 5)
              self.AddColorField(2002, c4d.BFH_FIT, initw=70, inith=13, colorflags=c4d.DR_COLORFIELD_POPUP)
              self.SetColorField(2003, c4d.Vector(0,0,0), 1, 1, c4d.DR_COLORFIELD_ENABLE_COLORWHEEL)
              self.GroupEnd()
              return True
      
      # Open async dialog
      dlg = Dialog() # Create dialog object
      dlg.Open(c4d.DLG_TYPE_ASYNC, 0, -1, -1, 0, 0) # Open dialog
      

      Is this a known bug or is something changed in the SDK that I should accomplish this an another way?

      Btw, also the color picker doesn't work in the R25's color chooser window.

      I'm running
      Cinema 4D R25.010
      Windows 10 (21H1)

      Cheers,
      Arttu

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hi,

        as we replaced the behaviour of the color chooser in R25 (it's no more a Modal dialog) you cannot open it from a Modal dialog anymore.

        This is a limitation/bug for now. I've opened a bug report.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • A
          aturtur
          last edited by

          Hi, thanks for the information. Hopefully it will get fixed in the future updates.

          Cheers,
          Arttu

          1 Reply Last reply Reply Quote 0
          • maxonM maxon moved this topic from Cinema 4D SDK on
          • First post
            Last post