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

    [Python API] - Foldable Group Bug Still?

    Cinema 4D SDK
    s26 python
    2
    5
    724
    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.
    • C
      clayton_krause
      last edited by

      Howdy everyone. First post, great to be here! I'm running on Windows w/ vR26

      I'm trying to get a group to fold, but seem to be unable to get it working. After poking around in the forum, I'm finding multiple posts about how this feature has been broken since ~2018.

      Reference Thread

      Would someone be able to provide confirmation that this is still a bug ~5 years later?

      This is as far as I was able to get - https://www.screencast.com/t/XntK6IqSS49

      Clearly not the intended functionality if my group is just going to zap out of existence.

      I have not attempted the suggested work around referenced here. I wanted to make sure it was still broken before sinking more time into it.

      Thank you,
      Clayton

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

        Hi,

        Is it possible to share the code you are using?

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        C 1 Reply Last reply Reply Quote 0
        • C
          clayton_krause @Manuel
          last edited by clayton_krause

          @m_magalhaes - Most definitely!

          This is a section of a general c4d.gui.GeDialog class inheritance under the "CreateLayout" class method.

          First attempt, only one that yielded a dropdown arrow -

                  self.GroupBegin(id=101, flags=c4d.BFH_CENTER, cols=1, rows=1,
                                          groupflags=c4d.BFV_BORDERGROUP_FOLD, title="Group", initw=200, inith=100)
                  self.GroupBorder(c4d.BORDER_NONE)
                  self.AddButton(102, flags=c4d.BFH_SCALE | c4d.BFH_FIT | c4d.BFV_SCALE | c4d.BFV_FIT, name="das_button")
                  self.GroupEnd()
          

          However, docs note that the "BFV_BORDERGROUP_FOLD" flag is deprecated. This example above was what the video in the original thread shows with the fold arrow icon disappearing w/ the group contents.

          From there I experimented with the "BFV_BORDERGROUP_FOLD2" and "BFV_BORDERGROUP_FOLD_OPEN" flags. Together, soloed, in different orders. None of which gave me a fold arrow icon.

          Let me know what you think. I'm only a month into C4D in general (API included), so I'm still getting a general foundation established.

          Appreciate you time and input. Thank you.

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

            hi,

            sorry for the delay. As you said the flag is marked deprecated. The issue is not easy to fix and will probably not.
            The way to do it is to create a button that will use LayoutFlush()/LayoutChanged to update the Layout of the GeDialog. That is a bit more complicated but doable.

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

            C 1 Reply Last reply Reply Quote 0
            • C
              clayton_krause @Manuel
              last edited by

              @m_magalhaes - All good! Just wanted to make certain that the issue hasn't been fixed yet (since 2018..).

              In the future I'll write a python class, extending a group that is collapsible using the workaround you mentioned.

              Thank you for getting back to me and looking into this! Cheers.

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