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

    GeDialog.AddSeparatorH documentation

    Cinema 4D SDK
    python s24
    3
    8
    1.1k
    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.
    • C4DSC
      C4DS
      last edited by C4DS

      I had the following line in a plugin, which was working fine for R17 upto R23.

      self.AddSeparatorH(inith=5, flags=c4d.BFH_FIT);
      

      Suddenly with latest S24, a user reports following error in the Python console:

      TypeError:Required argument 'initw' (pos 1) not found
      

      Looking at the documentation I now notice why I used "inith", and since this is an horizontal separator one would expect to only provide the height.
      However, latest documentation indicates "initw" (initial width) should be used ... which does sound weird.

      69aff876-25ab-40d4-951e-7600048dba34-image.png

      I haven't older Python SDK documentation at hand, but my guess is this "initw" was erroneously introduced in S24.

      C4DSC 1 Reply Last reply Reply Quote 0
      • C4DSC
        C4DS @C4DS
        last edited by

        @c4ds
        Found some older documentation, and it seems this was present even in the days of R18 (probably earlier).

        dcbd3ee7-84af-4869-a1de-385eef00d7ce-image.png

        Still, why is Python engine only complaining about this since S24?

        1 Reply Last reply Reply Quote 0
        • M
          m_adam
          last edited by m_adam

          Hi Daniel, this was updated during S24, to match C++ convention.

          We will update the documentation for the parameter (should be inith). Thanks for pointing it.

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          C4DSC 1 Reply Last reply Reply Quote 0
          • C4DSC
            C4DS @m_adam
            last edited by

            @m_adam
            Hi Maxime,
            But what about the TypeError in the Python console. It seems to expect "initw" ?

            1 Reply Last reply Reply Quote 0
            • C4DSC
              C4DS
              last edited by C4DS

              According to C++ docs the AddSeparatorH takes a initw, and AddSeparatorV takes a inith.

              In my Python plugins I would thus expect to need an initw from S24 on, and an inith for R23 and previous releases (for the AddSeparatorH)

              1 Reply Last reply Reply Quote 0
              • M
                m_adam
                last edited by

                Sorry I was not clear but AddSeparatorH expect initw and AddSeparatorV expect inith in S24 like in C++.

                I will fix the Python documentation.
                Cheers,
                Maxime.

                MAXON SDK Specialist

                Development Blog, MAXON Registered Developer

                1 Reply Last reply Reply Quote 0
                • C4DSC
                  C4DS
                  last edited by

                  Thanks for the initw confirmation.

                  1 Reply Last reply Reply Quote 0
                  • mikeudinM
                    mikeudin
                    last edited by

                    I have a same issue. The problem solved by assigning argument without name:

                    self.AddSeparatorH(5, flags=c4d.BFH_FIT);

                    Checkout my python tutorials, plugins, scripts, xpresso presets and more
                    https://mikeudin.net

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