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

    ScrollGroup crash [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 266 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 04/08/2016 at 05:03, xxxxxxxx wrote:

      I'm currently using R17.048.
      Someone can confirm create a ScrollGroupBegin and call a LayoutFlushGroup into this group make C4D crash.
      If I only do LayoutFLushGroup no crash
      If I only do LayoutChanged no crash
      If I do LayoutFLushGroup  + LayoutChanged = crash

      import c4d
      class Dialog(c4d.gui.GeDialog) :
        
          def CreateLayout(self) :
        
              flags = c4d.SCROLLGROUP_HORIZ | c4d.SCROLLGROUP_VERT
              if self.ScrollGroupBegin(1001, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, flags, 100, 100) :
                  self.AddButton(1000, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT,100,50 , "Make it crash")
                  self.GroupEnd()  
        
              return True
        
          def Command(self, id, msg) :
              if id == 1000:
                  self.LayoutFlushGroup(1001)
                  self.LayoutChanged(1001)
              return True
        
      dlg = Dialog()
      dlg.Open(c4d.DLG_TYPE_ASYNC)
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 05/08/2016 at 08:01, xxxxxxxx wrote:

        Hello,

        it looks like the issue is related to the fact that the scroll group does not include a sub-group. Typically a scroll group includes another group. And this sub-group then hosts the actual elements (see this C++ example).

        So it will work if you include a sub-group and flush only this sub-group (instead of flushing the scroll group itself)

        Best wishes,
        Sebastian

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

          On 12/08/2016 at 13:49, xxxxxxxx wrote:

          Sorry for the late reply. 
          Thanks you for your message 🙂

          All is working as you described (but maybe it can be good to have something similar written in the sdk for other peoples ^^)

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